> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trynito.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Image input

> Sending images to a vision-capable model, with upload and URL limits.

The model must support image inputs; find them with `GET /v1/models?supports=image_inputs`.

## The `image_url` Part

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "role": "user",
  "content": [
    { "type": "text", "text": "What is in this image?" },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.org/photo.jpg",
        "detail": "auto"
      }
    }
  ]
}
```

| Field | Type | Required | Notes |
| - | - | - | - |
| `type` | string | yes | `"image_url"`. |
| `image_url.url` | string | yes | A `https://` URL or a `data:` URL. |
| `image_url.media_type` | string | no | Used when supplying raw base64; the gateway assembles `media_type` + base64 into a data URL. |
| `image_url.detail` | string | no | Optional detail hint passed through to the provider. |

Supply the bytes as an `https://` URL, a full `data:` URL, or raw base64 plus `media_type`. `file_id` is not supported; there is no Files API.

## Example

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl "https://app.trynito.ai/v1/chat/completions" \
  -H "Authorization: Bearer z_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3.8-27b",
    "messages": [
      {
        "role": "user",
        "content": [
          { "type": "text", "text": "Describe this picture." },
          { "type": "image_url", "image_url": { "url": "https://example.org/photo.jpg" } }
        ]
      }
    ]
  }'
```

## Multipart Limits

Chat completions also accept `multipart/form-data`: a `request` JSON part plus image files referenced as `attachment://<id>`.

| Limit | Value |
| - | - |
| Accepted formats | PNG, JPEG, WebP only |
| Max images per request | 10 |
| Max size per image | 5 MiB |
| Max combined size | 50 MiB |
| Max long edge | 2048 px |

## URL Rules

Image URLs must use `https`, carry no credentials, and not resolve to a private or loopback host. Violations return `400`. Audio and video inputs are rejected.

## Related

* [PDF and document input](/api/api-reference/multimodal/pdf-input)
* [Request format](/api/api-reference/overview/request-format)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.