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 |
|---|---|
| Image parts per request | 8 |
| Remote image URL length | 8 KiB |
| Encoded data per inline image | 5 MiB |
| Total encoded inline image data per request | 10 MiB |
Inline images must be valid base64. Non-data image URLs must use HTTPS and must not contain surrounding whitespace.
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.
- Do not put image content in a tool message or function output.
- Messages
tool_resultblocks support textual results, not image blocks. - 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.