MAI Code 2 Flash
Budgetby Microsoft
As of November 19, 2026, MAI Code 2 Flash by Microsoft costs $0.05 per 1M input tokens and $0.25 per 1M output tokens, with a 1.05M-token context window.
MAI Code 2 Flash is the cheap half of the pair Microsoft AI introduced at Ignite on November 17, 2026, and it undercuts the model it replaces by a wide margin. GitHub lists it at a promotional $0.05 per million input tokens, $0.005 on a cached read, and $0.25 output through May 17, 2027, then $0.10, $0.01, and $0.50, which even at the standard rate is half of what MAI-Code-1.1-Flash charges at $0.20 and $1.20. The model card it shares with MAI Code 2 gives a 1,050,000 token context length, 922,000 input and 128,000 output tokens, text and image input, and text output. It is generally available in GitHub Copilot on every plan including Free and Student, and unlike the larger model it also reaches Microsoft Foundry, as a limited-access preview called through the OpenAI-compatible Responses API with standard Azure authentication, quotas, and content filtering. Microsoft's table has Flash doing better against its intended rivals than MAI Code 2 does against its own: at maximum reasoning it averages 61 percent across four coding evaluations against 55.1 for GPT-6 Luna and 53.9 for Claude Haiku 5.5, with DeepSWE 1.1 at 59.9 percent against 59.6 and 46, Terminal-Bench 2.1 at 78.3 against 69.3 and 73.4, and SWE-Atlas at 44.8 against 36.4 and 42.1. Microsoft puts average cost per task at $0.052 against $0.080 for GPT-6 Luna and $0.319 for Claude Haiku 5.5. All of it is vendor-reported from runs inside Copilot, and no independent evaluator has published a score.
Input Price
$0.05
per 1M tokens
Output Price
$0.25
per 1M tokens
Context Window
1.1M
tokens
Released
2026-11
API access
Capabilities
Key Strengths
- ✓Promotional $0.05/$0.25 per 1M tokens through May 17, 2027, then $0.10/$0.50
- ✓Half the standard rate of MAI-Code-1.1-Flash even after the promotion ends
- ✓Microsoft-reported 61 percent average against 55.1 for GPT-6 Luna and 53.9 for Claude Haiku 5.5
- ✓1,050,000 token context with text and image input
- ✓The only one of the two on Microsoft Foundry, in limited-access preview
- ✓Available on Copilot Free and Student as well as every paid plan
Best For
- ▸High-volume Copilot completions and routine edits
- ▸Cheap subagent and routing work inside coding harnesses
- ▸Foundry prototypes that need a low-cost coding endpoint
- ▸Budget replacement for MAI-Code-1.1-Flash workloads
Pricing Details
Input tokens
$0.05
per 1M tokens
Output tokens
$0.25
per 1M tokens
Estimated cost per 1K requests
$0.17
~1K input + ~500 output tokens avg
Prices are subject to change. Check the official documentation for current pricing. See the cost calculator for detailed estimates.
Quick answers
- How much does MAI Code 2 Flash cost?
- As of November 19, 2026, MAI Code 2 Flash costs $0.05 per 1M input tokens and $0.25 per 1M output tokens on the Microsoft API.
- What is the context window of MAI Code 2 Flash?
- MAI Code 2 Flash has a 1.05M-token context window (1,050,000 tokens).