> Keiro Labs API documentation - Images and Vision
> Page: https://docs.keirolabs.ai/images-vision.html
> Markdown: https://docs.keirolabs.ai/images-vision.md
> Agent index: https://docs.keirolabs.ai/llms.txt
> API base URL: https://api.keirolabs.ai/v1
> Auth: send "Authorization: Bearer <api-key>" with a key created in the
> Keiro console (https://console.keirolabs.ai/api-keys). Use credentials saved by
> `keiro setup`, or resolve the key from a secret manager or an owner-only
> secret file and pass it to the client explicitly. Never read another
> provider's variable, and never put raw key material in environment
> variables, code, docs, or logs.

# 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.

## Send an image with Responses

```bash
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

- Put images in user message content.
- Do not put image content in a tool message or function output.
- Messages `tool_result` blocks support textual results, not image blocks.
- Keep the text instruction next to the image so the requested analysis is
  explicit.

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](data-retention.md) and [subprocessor](subprocessors.md)
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.

## Related pages

- [Models](models.md)
- [API reference](api-reference.md)
- [Errors](errors.md)
- [Data retention](data-retention.md)
