Images and vision
Keiro accepts image input on Responses, Chat Completions, and Messages when the requested public model and account path support vision. Image input is for analysis and understanding; this page does not describe image generation.
On this page 1 of 6
Send an image with Responses#
printf 'Keiro API key: '
IFS= read -rs KEIRO_BEARER
printf '\n'
curl -sS https://api.keirolabs.ai/v1/responses \
-H "Content-Type: application/json" \
-d '{
"model": "eb1-preview",
"input": [
{
"role": "user",
"content": [
{
"type": "input_text",
"text": "Describe this image and transcribe any visible text."
},
{
"type": "input_image",
"image_url": "https://keirolabs.ai/assets/og-card.png",
"detail": "auto"
}
]
}
]
}' \
-H @- <<<"Authorization: Bearer $KEIRO_BEARER"
Remote images must be reachable through an HTTPS URL. For private data, use a short-lived access URL approved by your organization's data policy or an inline base64 data URL. Never put credentials in the image URL.
Surface shapes#
| Surface | User image content |
|---|---|
| Responses | {"type":"input_image","image_url":"https://..."} |
| Chat Completions | {"type":"image_url","image_url":{"url":"https://..."}} |
| Messages | {"type":"image","source":{"type":"url","url":"https://..."}} or a base64 source |
For Responses, detail may be auto, low, or high. Use auto unless your workload has measured a need for another value.
Request limits#
Image requests fail with a caller-fixable 400 when they exceed these ingress bounds:
| Limit | Maximum |
|---|---|
| Images per request (every placement, tool results included) | 600 images |
| Remote image URL length | 8 KiB |
| Encoded data per inline image | 10 MB (10,000,000 bytes) |
| Total encoded inline media per request (images and PDFs together) | 24 MiB |
These bounds are the largest every image-capable model behind the endpoint accepts. The model selected for a request can accept fewer (a 200k-context Claude model accepts 100 images per request); such a request is refused before dispatch with the same measured 400, naming that model's limit, so the client can compact and retry.
Requests that carry more than 20 images (tool results and earlier turns included) are also subject to a per-image dimension rule on Claude models: every image must be at most 2000 pixels on each side, and a larger image is rejected with a 400 whose message refers to many-image requests. Keiro does not decode image dimensions, so that rejection is not rewritten into the measured N images > M maximum form; resize screenshots to at most 2000 pixels per side before returning them as tool output.
Inline images must be valid base64. Non-data image URLs must use HTTPS and must not contain surrounding whitespace. Over-limit requests are refused while the body is scanned, before the full conversion runs.
Placement rules#
Keiro validates and routes the image reference but does not turn it into a public file store. Retention and sensitive-workload approval still follow the data-retention and subprocessor postures.
- Put images in user message content.
- Tool results may carry images: Responses
function_call_output.outputas an array ofinput_textandinput_imageparts, and Messagestool_resultblocks withimageblocks. Chat Completions tool-role content stays text-only. - Keep the text instruction next to the image so the requested analysis is explicit.
Capability errors#
A model that cannot preserve image input fails closed instead of dropping the image. If a request is rejected, confirm that the model is available to the key, reduce the image payload if it exceeds a bound, and contact support before changing a sensitive workload's model selection.