API pricing and cost
MAI Code 2 Flash pricing
MAI Code 2 Flash official API pricing is $0.05 per million input tokens and $0.25 per million output tokens. Current promotional Standard rates. Valid 2026-11-17 – 2027-05-16 · UTC. Standard input/output thereafter: $0.10 / $0.50 per million tokens.
Covers the 2026-11-17 MAI Code 2 Flash release.
$0.05
Official input / 1M
Standard tier
$0.25
Official output / 1M
Standard tier
$0.058
Blended / 1M
4:1 input/output, 90% input cached
$5.76
Example monthly cost
10K requests, 8K input + 2K output/request, 90% input cached
Token charges only; tool calls, taxes, and other non-token fees are excluded.
Official API pricing
Current effective USD / 1M text tokens · Standard · Effective from 2027-05-17 · Last verified 2026-11-18
- InputStandard text tier, per million tokens
- $0.05
- Cached inputInput served from the prompt cache
- $0.005
- OutputStandard text tier, per million tokens
- $0.25
Promotions & time-of-day pricing
The prices below apply only within the stated dates and times. Standard prices are used outside these windows.
GitHub Copilot launch offer · standard · input
$0.10$0.05 / 1,000,000 tokens50% offValid 2026-11-17 – 2027-05-16 · UTC
GitHub Copilot launch offer · standard · Cache read
$0.01$0.005 / 1,000,000 tokens50% offValid 2026-11-17 – 2027-05-16 · UTC
GitHub Copilot launch offer · standard · output
$0.50$0.25 / 1,000,000 tokens50% offValid 2026-11-17 – 2027-05-16 · UTC
Standard list prices effective 2027-05-17: $0.10 input, $0.50 output, $0.01 cached input per million tokens. The estimates above use current rates; a full month at these rates is a budget scenario, not a bill spanning the change date.
API providers (1)
Published USD text API rates across hosting providers for MAI Code 2 Flash. Compare listed rates, effective dates, and service-tier notes for the same model.
| Provider | Input / 1M | Cached / 1M | Output / 1M | Additional tiers & notes |
|---|---|---|---|---|
| MicrosoftOfficialEffective from 2027-05-17 · Last verified 2026-11-18 | $0.10 | $0.01 | $0.50 | — |
What MAI Code 2 Flash costs to run
Four workloads costed at official standard rates. Cached-input share is an estimation assumption, not a provider guarantee; when no cached rate is published, all input is billed at the uncached rate. Non-token fees are excluded.
| Workload | Per request | Monthly tokens | Input | Output | Per month |
|---|---|---|---|---|---|
| Chatbotshort turns | 1,500 in · 500 out× 100,000 requests | 150M in · 50M out | $7.50 | $12.50 | $20.00$0.0002 / request |
| Assistant8K context · 90% cached | 8,000 in · 2,000 out× 10,000 requests | 80M in · 20M out | $0.76 | $5.00 | $5.76$0.000576 / request |
| RAGlong input, cached · 50% cached | 24,000 in · 800 out× 20,000 requests | 480M in · 16M out | $13.20 | $4.00 | $17.20$0.00086 / request |
| Coding agentlong output · 70% cached | 15,000 in · 4,000 out× 20,000 requests | 300M in · 80M out | $5.55 | $20.00 | $25.55$0.001278 / request |
Monthly cost
$5.76
on MAI Code 2 Flash
Per request
$0.000576
80M in · 20M out a month
Split
$0.76 + $5.00
input + output
The same workload costs $4.94 on Ling-3.0-flash, the cheapest of the comparable models below.
- Ling-3.0-flashAnt Group · $0.049 / 1M blended$4.94
- gpt-oss-20bOpenAI · $0.052 / 1M blended$5.20
- Nemotron 3.5 LightningNVIDIA · $0.058 / 1M blended$5.84
- Inkling 2 SmallThinking Machines Lab · $0.246 / 1M blended$24.56
- DeepSeek-V4.1-Flash-1017DeepSeek-AI · $0.268 / 1M blended$26.83
- MAI Code 2Microsoft · $0.558 / 1M blended$55.80
MAI Code 2 Flash against comparable models
Benchmark-overlap peers and price-comparable same-type models, costed on the assistant workload above. All figures use the same workload and caching rule; lower price does not imply equivalent capability or service terms.
| Model | Basis | Blended / 1M | Per month | vs MAI Code 2 Flash |
|---|---|---|---|---|
| Ling-3.0-flashAnt Group | Lower-cost option | $0.049 | $4.94 | 14%cheaper |
| gpt-oss-20bOpenAI | Lower-cost option | $0.052 | $5.20 | 9.7%cheaper |
| MAI Code 2 FlashMicrosoft · this model | This model | $0.058 | $5.76 | — |
| Nemotron 3.5 LightningNVIDIA | Similar price | $0.058 | $5.84 | 1.4%dearer |
| Inkling 2 SmallThinking Machines Lab | Shared benchmark coverage | $0.246 | $24.56 | 326%dearer · 4.3× |
| DeepSeek-V4.1-Flash-1017DeepSeek-AI | Shared benchmark coverage | $0.268 | $26.83 | 366%dearer · 4.7× |
| MAI Code 2Microsoft | Shared benchmark coverage | $0.558 | $55.80 | 869%dearer · 9.7× |
Catalog price position: #15 cheapest of 252 active priced models in the LLMLearner catalog (cheaper than 94% at the 4:1 mix with 90% of input assumed cached where published; official headline rates).
MAI Code 2 Flash pricing questions
- How much does MAI Code 2 Flash cost per million tokens?
- MAI Code 2 Flash official API pricing is $0.05 per million input tokens and $0.25 per million output tokens. Cached input is billed at $0.005 per million tokens. At the default 4:1 input-to-output mix with 90% of input assumed cached, that is $0.058 per million blended tokens. Current promotional Standard rates. Valid 2026-11-17 – 2027-05-16 · UTC. Standard input/output thereafter: $0.10 / $0.50 per million tokens.
- What does MAI Code 2 Flash cost per month, and what is included?
- On the example Assistant workload (10,000 requests/month, 8,000 input and 2,000 output tokens/request, 90% input cached), MAI Code 2 Flash costs about $5.76/month ($0.000576/request). This includes token charges at the official rate only; tool calls, off-peak or batch tiers, and taxes are excluded.
- Is there a cheaper alternative to MAI Code 2 Flash?
- Among the comparable models shown on this page, Ling-3.0-flash is cheaper at $0.049 per million blended tokens vs $0.058 for MAI Code 2 Flash. Compare benchmarks before switching, as a lower rate does not guarantee equivalent quality or service terms. Across all 252 active priced models in the LLMLearner catalog, MAI Code 2 Flash ranks 15th cheapest (cheaper than 94% at the default 4:1 mix).
- Does MAI Code 2 Flash charge for cached input?
- Yes, at a discount: $0.005 per million cached input tokens against $0.05 uncached.