/v1/chat/completions endpoint accepts images the same way OpenAI’s API does - as an image_url content part on a message. You don’t set a flag or pick a vision model yourself; attaching an image is what tells Routor the request needs one.
How It Works
A normal text-only request sendscontent as a plain string. To attach an image, send content as an array of parts instead - one text part for your question, one image_url part per image:
image_url.url can be a data: URI (base64-encoded, for a local file) or a plain https:// URL Routor can fetch.
The moment Routor sees an image_url part, it filters the candidate model pool down to vision-capable models before anything else - the same difficulty scoring still happens (a one-word caption request and a “explain everything happening in this diagram” request won’t land on the same tier), but only within the models that can actually read images. You’ll see category: "vision" in the routing decision on the response.
Example - Node.js
Multiple Images, One Message
Add moreimage_url parts to the same content array - useful for “compare these two” or “here’s the policy, and here’s my receipt” style requests where the answer depends on more than one image together:
Attachment Limits
Vision-capable models have per-model caps on image count and payload size (Routor enforces these silently and picks a model that fits your request). If you’re sending several large images, keep an eye on total request size - very large payloads add real upload time before Routor’s routing decision even starts.Where to Go Next
- Build your first app - the text-only starting point this guide builds on
- How routing decisions are made - the general scoring mechanics
- Set up a routing profile - require vision capability on every request through a given key, instead of relying on it being detected per-message