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.

#ModelInputOutput / unitWeb search / 1K
1GPT-5 Nano
gpt-5-nano
$0.05$0.40$10.00
2Gemini 2.5 Flash Lite
gemini-2.5-flash-lite
$0.10$0.40$14.00
3GPT-6 Luna
gpt-6-luna
$0.10$0.50$10.00
4GPT-5.6 Luna
gpt-5.6-luna
$0.20$1.20$10.00
5GPT-5.4 Nano
gpt-5.4-nano
$0.20$1.25$10.00
6Gemini 3.1 Flash Lite
gemini-3.1-flash-lite
$0.25$1.50$14.00
7GPT-5 Mini
gpt-5-mini
$0.25$2.00$10.00
8Gemini 2.5 Flash
gemini-2.5-flash
$0.30$2.50$14.00
9Gemini 3 Flash
gemini-3-flash-preview
$0.50$3.00$14.00
10Gemini 3.6 Flash
gemini-3.6-flash
$0.75$3.75$14.00
11Gemini 3.7 Flash
gemini-3.7-flash
$0.75$3.75$14.00
12Gemini 3.8 Flash
gemini-3.8-flash
$0.75$3.75$14.00

How to choose

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.

Practical questions answered

More guides