Image 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
"claude-opus-4-7"
User prompt, up to 100,000 characters.
100000"Describe this image in one sentence."
Array of image sources (1–10 images). Each element accepts one of the following two forms:
- Publicly reachable HTTP/HTTPS URL
data:image/<type>;base64,<payload>data URI (base64 inline)
Model constraints: the maximum count is determined by the upstream behind the selected model; when a model supports only a single image but the request passes multiple, the routing layer returns 422 model_rule_violation (the specific rules are maintained in app/relays/llm_router/model_rules.py, covering "model-intrinsic" constraints beyond channel configuration).
Base64 data is not size-validated; oversized payloads may trigger 422.
1 - 10 elements[
"https://fal.media/files/lion/AOtzfcyHpx-MOITAUeMrK.jpeg"
]Synchronous mode (see llm-text schema).
false
Whether to stream (see llm-text schema).
false
Generation token limit. Optional.
x >= 164
Sampling temperature, range [0, 2]. Optional.
0 <= x <= 20.3
System instruction. Optional.
10000"You are a vision assistant."
Whether to include reasoning tokens. Some thinking models require this to be set to true.
Response
Task created (async mode) / full response (sync mode)
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. In sync=true, stream=false mode, the endpoint directly returns the full OpenAI ChatCompletion JSON.
Task ID, formatted as task-llmrouter-{timestamp}-{8random}.
"task-llmrouter-1776874565-yq3szvcu"
llm.generation.task "llm.generation.task"
llm "llm"
The model name submitted by the client (echoed verbatim)
"claude-opus-4-7"
pending "pending"
0
1776874565
Returns {url: ...} when stream=true; null when stream=false.
Fixed at null during submit; returned via GET /v1/tasks/{task_id} after the task completes — results[0] is the full OpenAI ChatCompletion response.
null
Fixed at null during submit; returned via GET /v1/tasks/{task_id} when the task fails.
null