PriceIndex

AI model rankings · Code & SLMs

Cheapest Coding AI Models

Phi-4 is the cheapest of the 35 general-purpose Code & SLMs models we track at $0.088 blended per 1M tokens ($0.070 input, $0.14 output).

Safety classifiers, image, audio and translation models are left out because their prices aren't comparable with chat models. Retired models are hidden by default. The cheapest model with AA Intelligence 30 or higher is GPT-6 Luna at $0.20.

8 of the top 35 have no published AA Intelligence score; they show "—" and are never estimated. The 9 providers listed bill per token, so your real cost depends on how long your prompts and responses are.

Updated December 2026 · 35 models · 9 providers · prices per 1M tokens

Cheapest models that are actually good

The 10 lowest blended prices among models with AA Intelligence 30 or higher.

  1. 1GPT-6 LunaAA 38.1$0.200
  2. 2GPT-5.6 LunaAA 37.3$0.450
  3. 3Gemini 3.7 FlashAA 39.1$1.50
  4. 4Gemini 3.8 FlashAA 40.9$1.65
  5. 5GPT-6 SolAA 47.6$4.00
  6. 6GPT-5.6 TerraAA 42.1$4.50
  7. 7GPT-5.3 CodexAA 32.5$4.81
  8. 8GPT-5.2AA 30.4$4.81
  9. 9GPT-5.6 SolAA 47$11.25
  10. 10GPT-6 AstraAA 52.7$20.00

Top 3 Code & SLMs Models

  1. #1Microsoft

    Phi-4

    $0.088

    Blended price /1M

    Input
    $0.07
    Context
    16K
  2. #2Qwen

    Qwen3 Coder 30B A3B Instruct

    $0.123

    Blended price /1M

    Input
    $0.07
    Context
    262K
  3. #3OpenAI

    GPT-6 Luna

    $0.200

    Blended price /1M

    Input
    $0.1
    Context
    1.1M

Code & SLMs Models Ranking

35 of 35
Input /1M
$0.07
Output /1M
$0.14
Context
16K
AA Intelligence
5.9
DesignArena Elo
—
Arena Elo
1123
MMLU-Pro
60.7
Blended
$0.09
Trend
-16%
Input /1M
$0.1
Output /1M
$0.5
Context
1.1M
AA Intelligence
38.1
DesignArena Elo
1265
Arena Elo
1211
MMLU-Pro
75.4
Blended
$0.20
Trend
0%
Input /1M
$0.12
Output /1M
$0.8
Context
262K
AA Intelligence
9.2
DesignArena Elo
—
Arena Elo
—
MMLU-Pro
—
Blended
$0.29
Trend
0%
Input /1M
$0.195
Output /1M
$0.975
Context
1M
AA Intelligence
—
DesignArena Elo
—
Arena Elo
—
MMLU-Pro
—
Blended
$0.39
Trend
0%
Input /1M
$0.3
Output /1M
$0.9
Context
256K
AA Intelligence
—
DesignArena Elo
1005
Arena Elo
—
MMLU-Pro
—
Blended
$0.45
Trend
0%
Input /1M
$0.2
Output /1M
$1.2
Context
1.1M
AA Intelligence
37.3
DesignArena Elo
1229
Arena Elo
1189
MMLU-Pro
71.8
Blended
$0.45
Trend
0%
Input /1M
$0.2574
Output /1M
$1.0287
Context
164K
AA Intelligence
8.5
DesignArena Elo
—
Arena Elo
1211
MMLU-Pro
75.4
Blended
$0.45
Trend
-3%
Input /1M
$0.3
Output /1M
$1
Context
262K
AA Intelligence
—
DesignArena Elo
—
Arena Elo
—
MMLU-Pro
—
Blended
$0.47
Trend
0%
Input /1M
$0.25
Output /1M
$2
Context
400K
AA Intelligence
20.4
DesignArena Elo
1092
Arena Elo
—
MMLU-Pro
—
Blended
$0.69
Trend
0%
Input /1M
$0.4
Output /1M
$1.6
Context
1M
AA Intelligence
10.2
DesignArena Elo
992
Arena Elo
1167
MMLU-Pro
68.1
Blended
$0.70
Trend
0%
Input /1M
$0.5
Output /1M
$3
Context
262K
AA Intelligence
—
DesignArena Elo
—
Arena Elo
—
MMLU-Pro
—
Blended
$1.13
Trend
0%
Input /1M
$0.7
Output /1M
$2.5
Context
64K
AA Intelligence
13.1
DesignArena Elo
—
Arena Elo
1239
MMLU-Pro
80
Blended
$1.15
Trend
3%

Showing 15 of 35

Compare the leaders

How this ranking works

Benchmark is an aggregate 0–100 quality score. Blended price assumes a 3:1 input-to-output token mix. Trend compares the latest blended price with the oldest in our 6-month history.

This page sorts by blended price /1m. Use the panel on the right to switch ranking or category — every combination has its own page.

Frequently asked questions

By Artificial Analysis Intelligence Index, GPT-6 Astra from OpenAI ranks first with an AA Intelligence score of 52.7. It costs $10 per 1M input tokens.

Phi-4 is the cheapest at $0.07 per 1M input tokens and $0.14 per 1M output tokens.

GPT-6 Luna supports 1.1M tokens of context, the most in this category.

Dividing quality score by blended price, GPT-6 Luna gives the most quality per dollar (score 38.1 at $0.20 per 1M tokens).

Blended price assumes a typical 3:1 input-to-output token mix: 75% of the input price plus 25% of the output price, per 1M tokens.

Find models by API capability