Skip to content

Vision (image input)

Send images to vision-capable models using the content parts format.

Updated View as Markdown

You can send images to vision-capable models through chat completions by using the content parts format instead of a plain string for content. This follows the OpenAI Vision API 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

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

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"
            }
          }
        ]
      }
    ]
  }'
Navigation

Type to search…

↑↓ navigate↵ selectEsc close