OpenRouter¶
OpenRouter is a meta-provider that exposes 200+ AI models from every major lab (Anthropic, OpenAI, Google, Meta, Mistral, Qwen, DeepSeek, Cohere, and many more) behind a single API key. In Whittl it's the most flexible backend by a wide margin — you can switch between models mid-project, access free-tier variants with rate limits, and use niche models not otherwise available in Whittl.
This page covers setup, the Models dialog, capability chips, routing options, vision model specifics, and cost-saving patterns.
Setup¶
- Go to openrouter.ai and create an account.
- Add credit to your account — $5 minimum is fine for experimentation. You can top up anytime.
- Navigate to Keys in the dashboard and create an API key. It starts with
sk-or-v1-.... - In Whittl, open Edit → Preferences → API Keys (or use the cog icon next to the backend dropdown).
- Paste the key into the OpenRouter API Key field. Whittl validates it before saving.
Once validated, switch the backend dropdown to OpenRouter. The model indicator in the chat panel will show whichever model is currently selected (defaults to openrouter/auto on first use).
The Models dialog¶
Click the Models button next to the backend dropdown to open the Models dialog. This is the single most-used OpenRouter UI in Whittl.
What you see¶
| Column | Meaning |
|---|---|
| Favorite star () | Click to star. Starred models bubble to the top of the model dropdown. |
| Model name + ID | Human-readable name on top, full provider/model-id underneath |
| Capability chips | [Tools] [Thinks] [Long] [Vision] — which features the model supports |
| Context window | Max input tokens (128K, 1M, etc.) |
| Input / Output price | Per-million-token cost, OpenRouter's final price including their margin |
Filter dropdown¶
The filter dropdown above the list narrows the view:
- All — every model OpenRouter exposes
- ★ Favorites — only starred models
- Supports Tools — models that handle tool-use (Whittl's modify path uses this)
- Vision — vision-capable models (for screenshot-to-app)
- Long context — 128K+ context windows
- Cheap — budget tier
- Premium — top-tier models regardless of provider
Sort order¶
Default sort: starred models → by capability count → alphabetical by name. This puts the best-value models you care about at the top consistently.
Capability chips explained¶
Four chips appear per model. Each is either filled (capability supported) or grayed out (not supported).
[Tools]— the model accepts OpenAI-format tool definitions and emits tool calls. Required for Whittl's surgical-edit pipeline (the fast-and-cheap mode); without this, Whittl falls back to full-file regeneration.[Thinks]— the model supports explicit reasoning / thinking mode (o1-style reasoning chains, Claude's extended thinking, DeepSeek R1 reasoning). Whittl exposes this through the Think toggle in the chat panel for applicable backends.[Long]— context window is 128K+ tokens. For big projects or agent sessions with lots of history.[Vision]— accepts image inputs. Required for the Screenshot to App feature.
Chips are populated from OpenRouter's own supported_parameters metadata, so they reflect what the model actually does, not a marketing claim.
Routing options¶
openrouter/auto (meta-model)¶
Selecting openrouter/auto as your model tells OpenRouter to pick the best available model automatically for each request. It balances:
- Model quality
- Current latency per provider
- Your account's credit balance
- The specific prompt shape
When to use it:
- You're experimenting and don't want to pick a model for every request
- Your task isn't particularly sensitive to model choice (small modifications, cleanup tasks)
When NOT to use it:
- You need vision (auto sometimes picks non-vision models and drops the image silently)
- You care about a specific cost ceiling (auto can route to premium models)
- You're doing Agent Mode work (pick a specific tier-S model)
Specific model IDs¶
Most experienced Whittl users pick an explicit model. Common picks:
| Use case | Model ID |
|---|---|
| Cheap coding, fast iteration | qwen/qwen3-coder |
| Best-quality budget option | anthropic/claude-haiku-4-5 |
| Premium general-purpose | anthropic/claude-sonnet-4-5 |
| Free-tier long context | deepseek/deepseek-r1-0528:free |
| Free-tier coding | qwen/qwen-2.5-coder-32b-instruct:free |
| Vision (budget) | google/gemini-2.5-flash-lite |
| Vision (premium) | anthropic/claude-opus-4 |
| Agent Mode (tier-S) | anthropic/claude-sonnet-4-5 or google/gemini-2.5-pro |
Free-tier models¶
OpenRouter offers several models free of charge with rate limits:
qwen/qwen3-coder:free— coding-optimized, 32K context, ~20 req/mindeepseek/deepseek-r1-0528:free— reasoning model, 64K context, rate-limitedmeta-llama/llama-3.3-70b-instruct:free— general purpose, 128K contextgoogle/gemma-3-27b-it:free— vision-capable free model- More appear and disappear as providers update their free offerings
:free suffix isn't optional
The free versions of models have an explicit :free suffix on their ID (e.g. qwen/qwen3-coder:free). The suffix-less version is the paid variant. Whittl's Models dialog marks free versions clearly, but if you type a model ID manually, double-check.
Mix free and paid
A common Whittl setup: star qwen/qwen3-coder:free (free, cheap iteration) AND anthropic/claude-sonnet-4-5 (paid, quality). Use the free one by default, switch to Sonnet for the hard problem you hit once an hour. Drops your monthly AI spend to a few dollars without sacrificing ability to solve hard problems.
Vision-capable models¶
For Screenshot to App, you need a vision-capable model. OpenRouter's current vision-capable set (filter the Models dialog to Vision for the live list):
| Model | Provider | Typical cost per screenshot generation |
|---|---|---|
google/gemini-2.5-flash-lite |
~$0.01 | |
qwen/qwen-2-vl-7b-instruct |
Alibaba | ~$0.02 |
google/gemini-2.5-flash |
~$0.02 | |
openai/gpt-4o-mini |
OpenAI | ~$0.03 |
anthropic/claude-haiku-4-5 |
Anthropic | ~$0.05 |
google/gemma-3-27b-it |
~$0.05 | |
meta-llama/llama-3.2-90b-vision-instruct |
Meta | ~$0.10 |
mistralai/pixtral-large-2411 |
Mistral | ~$0.15 |
openai/gpt-4o |
OpenAI | ~$0.30 |
anthropic/claude-sonnet-4-5 |
Anthropic | ~$0.40 |
anthropic/claude-opus-4 |
Anthropic | ~$1.50 |
For most screenshot-to-app work, google/gemini-2.5-flash-lite is the cheapest option that works reliably. Jump to Claude Haiku or Sonnet when you need more design fidelity.
Cost compared to direct providers¶
OpenRouter adds roughly 5–10% margin on top of each provider's direct pricing. So:
- Claude via OpenRouter ≈ 5% more expensive than Claude API direct
- Gemini via OpenRouter ≈ 5–10% more expensive than Gemini API direct
- DeepSeek via OpenRouter ≈ 5% more expensive than DeepSeek API direct
In exchange you get a single consolidated bill, access to models you couldn't otherwise use, automatic fallback if a provider has an outage, and free models alongside paid ones.
Rule of thumb: if you exclusively use one provider, use their API directly. If you use two or more, OpenRouter's margin is outweighed by the flexibility.
Rate limits and credits¶
OpenRouter rate limits depend on your account credit balance:
- No credit — severely rate-limited (~10 req/min across all free models)
- $5+ credit — normal free-model rate limits (~20 req/min per model)
- $10+ credit — elevated limits on paid models
Credits persist until used; no expiry. $5 typically lasts a month of casual Whittl usage on mid-tier models.
Troubleshooting¶
Model returns 'Deprecated' error
OpenRouter occasionally deprecates models when providers pull them. Whittl's update-checker surfaces the error with a pointer back to the Models dialog. Just pick a new model; your project state is unaffected.
Image silently ignored with vision model
Two causes:
- You picked
openrouter/autoand auto routed to a non-vision model. Switch to an explicit[Vision]model. - The model claims vision but doesn't handle it well. Gemma 3 27B is notably spottier than Claude or Gemini 2.5 on complex UIs. Try a higher-tier model.
Favorites disappeared
This was a v2.2 bug where the update-checker racing with favorites writes would clobber them. Fixed in v2.3. If you're running v2.2 or earlier, upgrade.
Sudden cost spike in OpenRouter dashboard
If you recently switched Agent Mode on and a tier-S model ran a long unbounded loop, you can burn a lot of credit fast. The v2.3 hard round cap (5 rounds) prevents this, but check Settings → Agent Mode is configured the way you expect.
What's next¶
- Screenshot to App — vision-model workflow using OpenRouter
- Agent Mode — which OpenRouter models qualify for which tier
- Auto-fix Rules — how Whittl's local layer compensates for cheaper models' mistakes