Mixed Understanding
Use the returned task ID to query the task for the final result.
Authorizations
All endpoints require Bearer Token authentication. Add to the request header:
Authorization: Bearer YOUR_API_KEY
YOUR_API_KEY is the API Token (sk-... format).
Body
Request body in messages[] form (OpenAI Chat compatible). Apart from the fields listed below, other OpenAI-compatible parameters (temperature, top_p, stop, frequency_penalty, etc.) are used per the OpenAI Chat spec.
"claude-opus-4-7"
OpenAI Chat format messages array. messages[*].content may be a string or an array; array element type ∈ {text, image_url, video_url, audio_url, file_url}. A type the model does not support returns 422 model_not_support_capability.
Typical content shapes:
- Plain text (string content, simplest form):
- Plain text (array content, the unified format when mixing with multimodal):
- text + image:
- text + video:
- text + file:
- Multi-turn conversation (system + multiple user/assistant turns):
- Mixed attachments of all types (a single user message containing 2 each of
image_url/video_url/audio_url/file_url):
Inline base64 (asynchronous mode only, when sync is omitted or false): In image_url / video_url / audio_url / file_url blocks, inline base64 in the {"url": ...} object form (data: URI, or at least 4096 encoded characters whose decoded content matches a known media signature) is uploaded to file storage and replaced with a URL before the request is persisted or submitted upstream; the original base64 is not stored. Shorter raw base64 or content with an unrecognized signature is passed through unchanged and is not size-validated. Limits apply only to inline base64 items (public HTTP(S) URLs are not limited): decoded size ≤ 5 MB per item, ≤ 5 inline items per array, ≤ 10 MB total per request, and ≤ 20 inline items per request. An invalid data: prefix or payload that decodes to zero bytes returns 422; exceeding a limit also returns 422. Use /v1/files/upload first and pass the resulting URL instead.
When sync: true, the request is not stored as a task and the rules above do not apply: inline base64 is submitted upstream unchanged without size or count validation.
Shapes outside the coverage scope: input_audio.data / file.file_data, and the direct string form {"type":"image_url","image_url":"data:..."} (where the value is not a {"url": ...} object). Inline base64 in these shapes is passed through unchanged.
Whether to stream.
Behavior differences:
false
Generation token limit. Family-level constraints: claude-* required; gpt-* usually ≥ 16; gemini-* optional.
64
Sampling temperature.
Nucleus sampling.
Stop sequences.
Response
Task created
Submit response, conforming to the unified task standard shape. results / error are fixed at null during submit; they are returned via GET /v1/tasks/{task_id} after the task completes or fails
Task ID, formatted as task-llm-{timestamp}-{8random}. Used for GET /v1/tasks/{task_id} queries or GET /v1/llm/generations/{task_id}/stream SSE subscriptions
"task-llm-1776874565-yq3szvcu"
Object type, fixed at llm.generation.task
llm.generation.task "llm.generation.task"
Media type, fixed at llm
llm "llm"
The model name submitted by the client (echoed verbatim)
"claude-opus-4-7"
Task status, fixed at pending during submit
pending "pending"
Progress 0-100, fixed at 0 during submit
0
Creation time (Unix seconds)
1776874565
Returns {url: ...} when stream=true; null when stream=false. The client uses this to decide whether to connect to SSE
Fixed at null during submit; obtained via GET /v1/tasks/{task_id} after the task completes — results[0] is the full OpenAI ChatCompletion response.
Known limitation: a thinking model's reasoning content (reasoning_content) appears only in the SSE stream's delta and is not accumulated into results[0].message.content
null
Fixed at null during submit; returned via GET /v1/tasks/{task_id} when the task fails
null