Microsoft AI FRONTIER API · Context: 1.05M tokens (per Microsoft via AI Ping)

Microsoft MAI Code 2 Flash

Microsoft's high-volume coding model: comparable to GPT-6 Luna at 65% and Claude Haiku 5.5 at 20% of their prices on DeepSWE 1.1, Terminal Bench 2.1 and SWE-Atlas (vendor-reported, promo pricing).

Provider
Microsoft AI (Proprietary API)
Architecture
Proprietary lightweight coding model (text + image in, text out); architecture undisclosed
Parameters
Proprietary Lightweight Coding Model
Context Window
1.05M tokens (per Microsoft via AI Ping) (Max Output: 128,000 tokens)
API Pricing
Input: $0.05 / 1M · Cached: $0.01 / 1M · Output: $0.25 / 1M
Hardware Target
Cloud API Only

Interactive Token Cost Estimator (MAI Code 2 Flash)

Est. API Cost (0% Cache): --/mo | With 70% Prompt Cache: --/mo
Compare all 12 models →

Architectural Strengths & Target Workloads

  • Among the cheapest capable coding models in Copilot ($0.05 / $0.25 promo)
  • Available on Copilot Free and Student plans
  • Good fit for cheap subagent / explanation / quick-fix work

Primary Engineering Workloads: Code Explanations · Targeted Edits & Routine Fixes · Cheap Subagent Work.

Frequently Asked Questions (MAI Code 2 Flash)

How much does Microsoft MAI Code 2 Flash cost per 1M tokens?

Microsoft MAI Code 2 Flash is priced at $0.05 per 1M uncached input tokens, $0.01 per 1M cached input tokens, and $0.25 per 1M output tokens (GitHub Copilot (all plans incl. Free and Student) at 50% promo rates until May 17, 2027; then $0.10 / $0.01 / $0.50 per 1M. Limited preview in Microsoft Foundry. Max output not published (128K placeholder).).

What is the context window of Microsoft MAI Code 2 Flash?

It supports up to 1.05M tokens (per Microsoft via AI Ping) (1,050,000 tokens) and a maximum generation output of 128,000 tokens.

Full TechPulse Engineering Analysis

MAI Code 2 and Code 2 Flash: Microsoft's In-House Coding Models Land in GitHub Copilot at $0.50 / $2.50 and $0.05 / $0.25

At Ignite 2026, Microsoft AI released seven models built for price-performance rather than the frontier. The two that matter most to developers are already in Copilot's model picker. Microsoft says it gets near GPT-6.1 Sol on everyday coding at 40% of the price, and the Flash model is free-tier eligible.

Read Full Technical Dispatch (5 min read) →
Risograph-style illustration of a long wooden workbench holding a row of small blocks in terracotta, slate, ochre and sage, with a large pale many-windowed building fading into the background behind it