How image input works
Send images in the messages array as image_url content blocks. The URL can be a data: URL with base64 bytes, or an http(s) URL. Use /v1/chat/completions. The /v1/responses endpoint does not accept images yet.
- Automatic routing: when a request contains an image, the router uses only vision models. It ignores text-only models for that request.
- Failover: when one vision provider hits its limit, the router tries the next vision model in your chain.
- Clear error: when no vision model is enabled, you get error 422 with
code: "no_vision_model". The image is never silently dropped.
Free vision models today
The table shows the strongest free models with image input in the catalog today. It comes from the live catalog. One row can list several providers that serve the same model.
| Model | Free on | Context | Free limits (best offer) | Tools | Vision |
|---|---|---|---|---|---|
| GLM 5.3 Flash | UnoRouter | 1M | 1 req/min 1 req/min per model | Yes | Yes |
| Gemini 3.8 Flash | Google AI Studio | 1M | Recurring provider quota | Yes | Yes |
| Gemini Flash (latest alias) | Google AI Studio | - | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| Qwen3.8 Flash | ElectronHub | 1M | $0.25/week shared recurring credit | Yes | Yes |
| Gemini 3.7 Flash | Google AI Studio | 1M | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| GPT-5.6 Luna | ElectronHub | 1M | $0.25/week shared recurring credit | Yes | Yes |
| Dots3 Note Preview | Kilo Gateway, OpenRouter | 512K | 20 req/min 50 req/day 50 req/day account-wide (1,000 after a $10 purchase) | Yes | Yes |
| Qwen3.8 27B | ElectronHub, Groq | 262K | 30 req/min 250 req/day 70,000 tokens/min ~6M | Yes | Yes |
| Gemini 3.6 Flash | Google AI Studio | 1M | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| Qwen 3.8 27B | Cloudflare Workers AI | 262K | Shared 10k neurons/day | Yes | Yes |
| Gemini 3.5 Flash | Google AI Studio | 1M | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| Gemini 3.8 Live | Google AI Studio | - | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| Gemini 3.8 Live Extended Thinking | Google AI Studio | - | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| Moondream 3.1 9B A2B | Cloudflare Workers AI, Moondream | 33K | ~10-20M | No | Yes |
| Moondream 3 Preview | Moondream | - | $5/month shared workspace usage credits | No | Yes |
Showing 15 of 67 matching free models. See all models.
Live data from the FreeLLMAPI catalog (version 2026.11.19, checked 19 November 2026). Free limits change often. The catalog is checked every day.
Gemini models give the largest context and accept many images. Qwen 3.8 27B on Groq and Cloudflare is a fast choice outside Google. Moondream is made for image tasks, but its output is limited to 4,096 tokens.
Step 1: Install FreeLLMAPI and add keys
FreeLLMAPI is open source. It runs on your computer in Docker. Your provider keys stay on your computer.
Install (macOS or Linux)
curl -fsSL https://freellmapi.co/install.sh | bashOpen the dashboard at http://localhost:3001. Add a Google AI Studio key and one more key on the Keys page. On the Fallback Chain page, vision models have a Vision badge. Make sure that at least one is enabled. Copy your unified key from the Keys page.
Step 2: Send an image
curl: image from a URL
curl http://localhost:3001/v1/chat/completions \
-H "Authorization: Bearer <unified-key>" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "Describe this image in two sentences."},
{"type": "image_url", "image_url": {"url": "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png"}}
]
}]
}'Python: local file as base64
import base64
from openai import OpenAI
client = OpenAI(base_url="http://localhost:3001/v1", api_key="<unified-key>")
with open("receipt.jpg", "rb") as fh:
b64 = base64.b64encode(fh.read()).decode()
resp = client.chat.completions.with_raw_response.create(
model="auto", # the router selects a vision model
messages=[{
"role": "user",
"content": [
{"type": "text", "text": "List each item and price on this receipt as JSON."},
{"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{b64}"}},
],
}],
)
print("Routed via:", resp.headers.get("x-routed-via"))
print(resp.parse().choices[0].message.content)Use a correct MIME type in the data URL, for example image/png or image/jpeg. To send more than one image, add more image_url blocks to the same message.
Image limits by provider
| Provider | Limit (official) | What to do |
|---|---|---|
| Google Gemini | Total request size with inline images: 20 MB. Formats: PNG, JPEG, WEBP, HEIC, HEIF | Make large photos smaller before you send them |
| Google Gemini | An image up to 384x384 pixels costs 258 tokens. Larger images are cut into 768x768 tiles of 258 tokens each | A 960x540 image uses 6 tiles, about 1,548 tokens |
| Groq (Qwen 3.8 27B) | Maximum 3 images for each request. Maximum 20 MB for a request with an image URL | Send at most 3 images to Groq models |
| Moondream | Base64 data URLs only. Remote image URLs are not supported | Send the image bytes, not a link |
Image tokens count against the tokens-per-minute limit of the free tier. A request with five large images can be larger than the limit of a small provider. Make images smaller, for example 1024 pixels on the long side, when you do not need fine detail.
Prompts that work for image tasks
- One task for each request: ask one clear question about the image. Several questions in one prompt give shorter and less exact answers.
- Structured output: for receipts and forms, name the fields that you want, for example
item,priceandtotal. Ask for JSON only. - Unreadable values: tell the model to write
nullwhen it cannot read a value. Then it does not guess. - Crop first: cut the image to the part that you need. A smaller image uses fewer tokens and gives better detail.
- Stable answers: set
temperatureto 0 for extraction tasks. - Check numbers: compare totals and dates with the image. Vision models can misread small text and similar digits.
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
Error 422 no_vision_model | No vision model is enabled in your chain | Enable a model with the Vision badge on the Fallback Chain page |
| The model says that it cannot see an image | The request went to /v1/responses | Use /v1/chat/completions |
| Error 400 on a remote URL | The provider cannot download the URL | Send the image as a base64 data URL |
| Error 413 or 400 on large files | The image or request is too large | Make the image smaller, or send fewer images |
| Error 429 on image requests | Image tokens used the tokens-per-minute limit | Make images smaller, or add keys from more vision providers |
Frequently asked questions
Is there a free vision API?
Yes. Google AI Studio, Groq, Cloudflare, NVIDIA, OpenRouter and other providers give free models with image input. FreeLLMAPI has 78 free vision model offers behind one OpenAI-compatible key.
How do I send an image to a free LLM API?
Add an image_url content block to the user message. Use a base64 data URL or an https URL, and send it to /v1/chat/completions.
How many tokens does an image use?
On Gemini, an image of 384x384 pixels or smaller uses 258 tokens. A larger image is cut into 768x768 tiles, and each tile uses 258 tokens.
Can I send several images in one request?
Yes. Add more image_url blocks to the message. Some providers limit the number. For example, Groq allows 3 images for each request on Qwen 3.8 27B.
Which free vision model is best for reading documents?
Use a Gemini model for receipts, charts and scanned pages. It has a large context window and accepts many images. Check the answer against the image for numbers, because vision models can misread small text.
Related guides
- Free image generation API
- free gemini api
- free qwen api
- free gemma api
- Free LLM API with function calling
Sources
- FreeLLMAPI docs: Vision and image input (checked 20 November 2026)
- Google AI Studio docs: Image understanding (checked 20 November 2026)
- Groq docs: Vision (checked 20 November 2026)
- Moondream OpenAI-compatible API docs (checked 20 November 2026)