API pricing and cost
MAI Code 2 pricing
MAI Code 2 official API pricing is $0.50 per million input tokens and $2.50 per million output tokens. Current promotional Standard rates. Valid 2026-11-17 – 2027-05-16 · UTC. Standard input/output thereafter: $1.00 / $5.00 per million tokens.
Covers the 2026-11-17 MAI Code 2 release.
$0.50
Official input / 1M
Standard tier
$2.50
Official output / 1M
Standard tier
$0.558
Blended / 1M
4:1 input/output, 90% input cached
$55.80
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.50
- Cached inputInput served from the prompt cache
- $0.025
- OutputStandard text tier, per million tokens
- $2.50
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
$1.00$0.50 / 1,000,000 tokens50% offValid 2026-11-17 – 2027-05-16 · UTC
GitHub Copilot launch offer · standard · Cache read
$0.05$0.025 / 1,000,000 tokens50% offValid 2026-11-17 – 2027-05-16 · UTC
GitHub Copilot launch offer · standard · output
$5.00$2.50 / 1,000,000 tokens50% offValid 2026-11-17 – 2027-05-16 · UTC
Standard list prices effective 2027-05-17: $1.00 input, $5.00 output, $0.05 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. 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 | $1.00 | $0.05 | $5.00 | — |
What MAI Code 2 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 | $75.00 | $125.00 | $200.00$0.0020 / request |
| Assistant8K context · 90% cached | 8,000 in · 2,000 out× 10,000 requests | 80M in · 20M out | $5.80 | $50.00 | $55.80$0.00558 / request |
| RAGlong input, cached · 50% cached | 24,000 in · 800 out× 20,000 requests | 480M in · 16M out | $126.00 | $40.00 | $166.00$0.0083 / request |
| Coding agentlong output · 70% cached | 15,000 in · 4,000 out× 20,000 requests | 300M in · 80M out | $50.25 | $200.00 | $250.25$0.01 / request |
Monthly cost
$55.80
on MAI Code 2
Per request
$0.00558
80M in · 20M out a month
Split
$5.80 + $50.00
input + output
The same workload costs $5.76 on MAI Code 2 Flash, the cheapest of the comparable models below.
- MAI Code 2 FlashMicrosoft · $0.058 / 1M blended$5.76
- Inkling 2 SmallThinking Machines Lab · $0.246 / 1M blended$24.56
- DeepSeek-V4.1-Flash-1017DeepSeek-AI · $0.268 / 1M blended$26.83
- Gemini 2.5 FlashGoogle Deep Mind · $0.546 / 1M blended$54.56
- GLM-4.5Zhipu AI · $0.567 / 1M blended$56.72
- GPT-Realtime-2.1 MiniOpenAI · $0.571 / 1M blended$57.12
MAI Code 2 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 |
|---|---|---|---|---|
| MAI Code 2 FlashMicrosoft | Shared benchmark coverage | $0.058 | $5.76 | 90%cheaper · 9.7× |
| Inkling 2 SmallThinking Machines Lab | Shared benchmark coverage | $0.246 | $24.56 | 56%cheaper · 2.3× |
| DeepSeek-V4.1-Flash-1017DeepSeek-AI | Shared benchmark coverage | $0.268 | $26.83 | 52%cheaper · 2.1× |
| Gemini 2.5 FlashGoogle Deep Mind | Lower-cost option | $0.546 | $54.56 | 2.2%cheaper |
| MAI Code 2Microsoft · this model | This model | $0.558 | $55.80 | — |
| GLM-4.5Zhipu AI | Similar price | $0.567 | $56.72 | 1.6%dearer |
| GPT-Realtime-2.1 MiniOpenAI | Similar price | $0.571 | $57.12 | 2.4%dearer |
Catalog price position: #102 cheapest of 252 active priced models in the LLMLearner catalog (cheaper than 60% at the 4:1 mix with 90% of input assumed cached where published; official headline rates).
MAI Code 2 pricing questions
- How much does MAI Code 2 cost per million tokens?
- MAI Code 2 official API pricing is $0.50 per million input tokens and $2.50 per million output tokens. Cached input is billed at $0.025 per million tokens. At the default 4:1 input-to-output mix with 90% of input assumed cached, that is $0.558 per million blended tokens. Current promotional Standard rates. Valid 2026-11-17 – 2027-05-16 · UTC. Standard input/output thereafter: $1.00 / $5.00 per million tokens.
- What does MAI Code 2 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 costs about $55.80/month ($0.00558/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?
- Among the comparable models shown on this page, MAI Code 2 Flash is cheaper at $0.058 per million blended tokens vs $0.558 for MAI Code 2. 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 ranks 102nd cheapest (cheaper than 60% at the default 4:1 mix).
- Does MAI Code 2 charge for cached input?
- Yes, at a discount: $0.025 per million cached input tokens against $0.50 uncached.