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

# Vision

> Send images to vision-capable models in the OpenAI content-parts format.

> [!NOTE]
>
> Use a current public model ID from [Models](https://nomask.ai/models) or `GET /models`. Example IDs and options must match the selected model's advertised capabilities and limits.

Vision-capable models accept images inside messages, in the standard OpenAI content-parts format.

## Sending images

Turn a message's `content` from a string into an array of parts, mixing `text` and `image_url` parts:

```json theme={"system"}
{
  "model": "mimo-v2.5",
  "messages": [{
    "role": "user",
    "content": [
      {"type": "text", "text": "What color is this square?"},
      {"type": "image_url", "image_url": {"url": "data:image/png;base64,iVBORw0KG..."}}
    ]
  }]
}
```

Multiple image parts per message are fine, and images can be combined with every other feature (streaming and reasoning).

## Accepted formats

* **Data URIs**: `data:image/png;base64,...` (also jpeg, webp, gif).
* **Public http(s) URLs**: fetched at request time.

## Which models support vision

Check `capabilities.vision` on `GET /models`, or the model cards on the [models page](https://nomask.ai/models). Sending an image to a non-vision model fails fast with `400 model_lacks_vision` before anything is billed, and the error names the exact content part at fault.

## How images are billed

Images are tokenized by the model and counted inside `prompt_tokens`: there is no separate image fee. The response's `usage` object and `nomask.cost_usd` reflect the real total.

## Image errors

| Code | Meaning |
| - | - |
| `model_lacks_vision` | The selected model cannot process images. Pick a vision-capable model from `GET /models`. |
| `invalid_image` | The image is corrupted, too small, too large, or not a supported content type. |


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