MAI Code 2
Last verified November 21, 2026 · Microsoft pricing ↗$0.500/1M input · $2.50/1M output · 1.1M context · Microsoft
MAI Code 2 costs $0.500 per 1M input tokens and $2.50 per 1M output tokens from Microsoft, with a 1.1M-token context window. A typical chat reply (1,500 tokens in, 400 out) costs $0.0018, or $17.50 per 10,000 requests. On that workload it is cheaper than 112 of the 182 other buyable models tracked here.
Count Tokens
Estimate Monthly Cost
Monthly Cost Estimator
Pick a preset above or enter custom usage
What MAI Code 2 Costs Per Request
At $0.500 per 1M input and $2.50 per 1M output tokens, before caching or batch discounts.
| Workload | Input / output tokens | Per request | Per 10,000 requests |
|---|---|---|---|
| Chat reply | 1,500 / 400 | $0.0018 | $17.50 |
| RAG answer over retrieved docs | 8,000 / 600 | $0.0055 | $55.00 |
| Coding-agent step | 30,000 / 2,000 | $0.020 | $200.00 |
MAI Code 2 vs Similarly Priced Models
Nearest buyable models by price, with the RAG answer above (8,000 in / 600 out) priced on each.
| Model | Input /1M | Output /1M | Context | RAG answer |
|---|---|---|---|---|
| MAI Code 2 Microsoft | $0.500 | $2.50 | 1.1M | $0.0055 |
| Grok Build 0.1 xAI | $1.00 | $2.00 | 256K | $0.0092 |
| Nemotron 3 Ultra 550B NVIDIA | $0.500 | $2.50 | 1.0M | $0.0055 |
| Nex-N2-Pro Nex AGI | $0.500 | $2.50 | 262K | $0.0055 |
Alternatives to MAI Code 2
Pricing Details
Scheduled price change
MAI Code 2 bills at $0.5 input / $2.50 output per 1M tokens through May 16, 2027. From May 17, 2027 the rate becomes $1.00 input / $5.00 output per 1M tokens, a 100% increase. Every figure on this page uses the rate in effect today.
Microsoft’s published pricing ↗Price History
Frequently Asked Questions
Common questions about MAI Code 2 pricing and usage