---
title: "Vision (image input)"
description: "Send images to vision-capable models using the content parts format."
---

> Documentation Index
> Fetch the complete documentation index at: https://truememory-docs.mvstg.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Vision (image input)

You can send images to vision-capable models through [chat completions](/ai-gateway/chat-completions/) by using the content parts format instead of a plain string for `content`. This follows the [OpenAI Vision API](https://platform.openai.com/docs/guides/vision) format.

Each message's `content` can be either:
- A **string** (text-only, the default)
- An **array of content parts** mixing text and images

## Content part types

| Type | Fields | Description |
|------|--------|-------------|
| `text` | `text` | A text segment |
| `image_url` | `image_url.url`, `image_url.detail` | An image, either as a direct URL or base64 data URI |

The `detail` parameter controls image resolution processing:

| Value | Description |
|-------|-------------|
| `auto` | Let the model decide (default) |
| `low` | Faster, lower resolution, fewer tokens |
| `high` | Higher resolution, more tokens |

## Sending an image URL

```bash
curl -X POST https://your-tie-host/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "model": "anthropic/claude-sonnet-4-5",
    "messages": [
      {
        "role": "user",
        "content": [
          { "type": "text", "text": "What is in this image?" },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://example.com/photo.jpg",
              "detail": "auto"
            }
          }
        ]
      }
    ]
  }'
```

## Sending a base64-encoded image

```bash
curl -X POST https://your-tie-host/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "model": "anthropic/claude-sonnet-4-5",
    "messages": [
      {
        "role": "user",
        "content": [
          { "type": "text", "text": "Describe this image." },
          {
            "type": "image_url",
            "image_url": {
              "url": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
              "detail": "low"
            }
          }
        ]
      }
    ]
  }'
```

:::note
Vision support depends on the underlying model. Models like `anthropic/claude-sonnet-4-5`, `openai/gpt-5.1`, and `vertexai/gemini-2.5-flash` support image input. If a model does not support vision, the provider will return an error.
:::

Source: https://truememory-docs.mvstg.com/ai-gateway/features/vision/index.mdx
