Inference API
Base URL and keys
Every instance is served at:
https://chat.syndicai.dev/<your-instance>/v1
The name is shown on the instance page. Authenticate with an API key you create there:
Authorization: Bearer your-api-key
The model field is the model the instance serves, shown on the instance page (for example zai-org/GLM-OCR). GET /v1/models lists it. An instance serves one model.
Chat and vision: POST /v1/chat/completions
The standard OpenAI chat completions request, with streaming ("stream": true). See the API reference for the common fields.
curl https://chat.syndicai.dev/support-bot/v1/chat/completions \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-oss-120b",
"messages": [{"role": "user", "content": "Summarize this ticket in two lines."}],
"max_tokens": 200
}'
/v1/completions and the Anthropic-style /v1/messages are served too.
Embeddings: POST /v1/embeddings
On an embedding instance:
curl https://chat.syndicai.dev/search-embed/v1/embeddings \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"model": "Qwen/Qwen3-Embedding-0.6B", "input": ["first text", "second text"]}'
The response has one vector per input in data[i].embedding, in the order you sent them. Send several inputs per request to use the GPU well. Embedding instances answer only embeddings requests; chat models answer only chat requests.
Images and OCR
Image input uses image content parts in a chat request. Give the image as an HTTPS URL or as a base64 data URL.
curl https://chat.syndicai.dev/ocr-pages/v1/chat/completions \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "zai-org/GLM-OCR",
"messages": [{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": "data:image/png;base64,<BASE64>"}},
{"type": "text", "text": "Read this page and return it as markdown."}
]
}]
}'
For a URL, use {"url": "https://example.com/page.png"}. OCR models read page images, so convert a PDF to one image per page first. The model returns text, usually markdown.
Image limits
| Image input | Must be on for the instance (always on for OCR models; on by default for inference instances) |
| Request body with image input on | Up to 64 MiB. With it off, 20 MiB and image requests are not accepted. |
| Images per request | Up to 4 |
| Cost of an image | About 280 tokens on Gemma 4, whatever its resolution. Other models differ, and OCR pages cost more because they are read in detail. |
| Large bodies | A body over 8 MiB is passed to the model as sent, without the instance's default request settings (for example the thinking token budget). Put such settings in the request itself. |
Image errors
| Case | Response |
|---|---|
| More than 64 MiB | 413 with "code": "payload_too_large" |
| An image sent to an instance with image input off | 400, "code": "image_input_disabled": turn image input on in the instance settings (the instance restarts to apply it) |
| An image sent to a text-only model | 400, "code": "image_input_not_supported": send text only or use a vision model |
| More images than the limit | A client error from the model naming the limit |
Errors
Errors use the OpenAI envelope: {"error": {"message", "type", "code"}}. See Inference Limits for 429 and 503, and Billing for what happens when credit runs out.