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 are the largest bounds the endpoint accepts. A request with more than 100 images can be refused before processing with the same measured 400, naming the limit that applied, so the client can compact and retry.
Keep every image at most 2500 pixels on each side, in every placement (tool results and earlier turns included). A larger image can be rejected with a caller-fixable 400 whose message reads "An image in this request is too large. Resize it to at most 2500 pixels per side and send the request again." Resize screenshots to that size 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#
- 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.
Keiro validates and forwards 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.
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.