Cheapest AI models for coding
For autocomplete, small edits and high-volume code tasks, smaller models give most of the value at a fraction of the price.
Ordered from lowest price
Live TokenRex prices. Per 1M tokens for chat and embeddings; per unit for media.
| # | Model | Input | Output / unit | Web search / 1K |
|---|---|---|---|---|
| 1 | GPT-5 Nano gpt-5-nano | $0.05 | $0.40 | $10.00 |
| 2 | Gemini 2.5 Flash Lite gemini-2.5-flash-lite | $0.10 | $0.40 | $14.00 |
| 3 | GPT-6 Luna gpt-6-luna | $0.10 | $0.50 | $10.00 |
| 4 | GPT-5.6 Luna gpt-5.6-luna | $0.20 | $1.20 | $10.00 |
| 5 | GPT-5.4 Nano gpt-5.4-nano | $0.20 | $1.25 | $10.00 |
| 6 | Gemini 3.1 Flash Lite gemini-3.1-flash-lite | $0.25 | $1.50 | $14.00 |
| 7 | GPT-5 Mini gpt-5-mini | $0.25 | $2.00 | $10.00 |
| 8 | Gemini 2.5 Flash gemini-2.5-flash | $0.30 | $2.50 | $14.00 |
| 9 | Gemini 3 Flash gemini-3-flash-preview | $0.50 | $3.00 | $14.00 |
| 10 | Gemini 3.6 Flash gemini-3.6-flash | $0.75 | $3.75 | $14.00 |
| 11 | Gemini 3.7 Flash gemini-3.7-flash | $0.75 | $3.75 | $14.00 |
| 12 | Gemini 3.8 Flash gemini-3.8-flash | $0.75 | $3.75 | $14.00 |
How to choose
- Route simple edits to a small model and escalate only hard tasks.
- Keep prompts short and cache your system prompt.
Try it with one API key
curl https://tokenrex.ai/api/public/v1/chat/completions \
-H "Authorization: Bearer $TOKENREX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5-nano","messages":[{"role":"user","content":"Hello"}]}'Head-to-head comparisons
Questions
- How are these budget coding models ranked?
- Models are listed from the live TokenRex catalog and ordered by current price. We do not publish invented quality scores; open a model page for source-linked benchmarks where they exist.
- Can I switch models later?
- Yes. Every model uses the same TokenRex API key and endpoint, so switching is a one-line change to the model ID.
- Do prices include a markup?
- Prices shown are the live TokenRex rates billed from your wallet. They update automatically when provider prices change.