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-capable models process images alongside text prompts via base64 data URIs or hosted HTTPS URLs, enabling multimodal document inspection, scene understanding, and OCR.
Sending Images
Pass image payloads using hosted HTTPS URLs or base64 data URIs via the Messages endpoint:
{
"model": "meta/llama-4-scout",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "Describe what is happening in this image."},
{"type": "image_url", "image_url": {"url": "https://example.com/diagram.png"}}
]
}]
}Identify multimodal models in the models reference and the live Models catalog. Images consume visual tokens calculated from resolution and tiling via token counting, settling at list price in x-nr-request-cost. Related guides: Generate Images, Reasoning Models, and Structured Output.
Frequently asked questions
URL or base64 — which should I use?
Use hosted URLs for CDN or web assets; use base64 data URIs for local files, private uploads, and screenshots.
Can I send documents like PDFs the same way?
Convert document pages into images before submitting, as the endpoint specifically processes image blocks.
Which models accept images?
Models flagged as multimodal in the catalog (e.g., Llama 4 Scout); check current models on the Models page.