// guides

Vision

Models with image input can read screenshots, photos, charts and documents alongside text.

Models with image input

  • GLM 5.3 Flash · z-ai/glm-5.3-flash
  • Kimi K3 · moonshotai/kimi-k3
  • Qwen 3.8 Max · qwen/qwen3.8-max
  • DeepSeek V4.1 Flash 1017 · deepseek/deepseek-v4.1-flash-1017
  • DeepSeek V4.1 Flash · deepseek/deepseek-v4.1-flash-paid
  • GLM 5.3 Flash · z-ai/glm-5.3-flash-paid
  • Kimi K3.1 Pro · moonshotai/kimi-k3.1-pro
  • MiniMax M3.1 Flash · minimax/minimax-m3.1-flash

Sending an image

Make content an array of parts: a text part and one or more image_url parts. The URL can be a public https:// link or a base64 data URL.

reply = client.chat.completions.create(
    model="nvidia/nemotron-lightning-3.5-30b-a3b",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "What's in this image?"},
            {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}},
        ],
    }],
    max_tokens=300,
)

Local files

Encode the file as base64 and send it as a data URL:

Python
import base64

with open("chart.png", "rb") as f:
    data = base64.b64encode(f.read()).decode()

image_part = {"type": "image_url", "image_url": {"url": f"data:image/png;base64,{data}"}}

Billing

Images are turned into input tokens and billed at the model's input price, like text.