Browse documentation

Send Image Input

Send images to vision models through nRouter: images ride in the message content as base64 data or a hosted URL, on models the catalog marks as multimodal.

Vision models read images alongside text — a screenshot to explain, a chart to summarise, a photo to classify. Through nRouter, an image rides inside the message content in one of two documented forms: base64 data, or a hosted image URL.

Pick a vision model

Not every model accepts images. The catalog marks the ones that do — the models reference lists multimodal models by provider (Meta's Llama 4 Scout is its vision example). Browse the live catalog on the Models page and choose a model listed as multimodal or vision-capable.

Send the image

On the Messages endpoint, a message's content can be an array of content blocks rather than a plain string — text blocks and image blocks together. The two image forms are the ones nRouter's own token counting documents: base64 image data, or a hosted image URL.

{
  "model": "<a vision model ID from the catalog>",
  "messages": [
    {
      "role": "user",
      "content": "Describe what is happening in this image."
    }
  ]
}

Describe the task in the text, attach the image as a content block in the same message, and the model's answer comes back as ordinary text. Keep the placeholder model honest: copy the exact ID of a vision model from the catalog — a text-only model cannot read the image.

How image input is metered

Images consume tokens by their dimensions — nRouter's token counting calculates visual token consumption from the image's size and tiling. The request then settles like any other: the exact cost lands in your request logs and the x-nr-request-cost response header. Very large images cost more tokens than small ones, so resize to the detail the task actually needs.

Frequently asked questions

Was this page helpful?