MCode

Explainer · MAI Code 2 Flash

What is MAI Code 2 Flash?

MAI Code 2 Flash is the smaller, faster and cheaper model in Microsoft AI’s MAI Code 2 family, released on November 17, 2026. It shares the training recipe of MAI Code 2 but runs with about 12 billion active parameters, and Microsoft built it for high-volume coding work: code explanations, targeted edits, routine fixes and quick iterations.

Try MAI Code 2 Flash

In short

  • Made by Microsoft AI and released on November 17, 2026, together with the larger MAI Code 2.
  • A sparse mixture-of-experts model with about 12 billion active parameters, against about 77 billion for MAI Code 2.
  • Its context window is 1,050,000 tokens; it reads text and images and writes up to 128,000 output tokens.
  • Available in GitHub Copilot and as a limited-access preview in Microsoft Foundry.
  • On this API it costs $0.30 per million input tokens and $1.50 per million output tokens, one tenth of MAI Code 2.

What Microsoft built it for

Microsoft’s model card describes MAI Code 2 Flash as the fast, cost-efficient model for everyday developer workflows, and MAI Code 2 as the larger model for complex, long-horizon software engineering in real repositories. Both were trained from scratch by Microsoft with the same architecture family and training recipe; the main difference is size.

  • Explaining unfamiliar code and answering questions about a repository.
  • Targeted edits, routine bug fixes and tests for a single function.
  • Fast iterations in an editor or a terminal agent, where latency matters.
  • Reading screenshots or mockups as input for front-end code.

MAI Code 2 Flash specs

These figures come from Microsoft’s model card for MAI Code 2 and MAI Code 2 Flash, dated November 17, 2026.

  • Architecture: a decoder-only transformer with sparse mixture-of-experts layers and a vision encoder.
  • Size: about 12 billion active and about 398 billion total parameters. Its predecessor, MAI Code 1.1 Flash, had 5 billion active.
  • Context: 1,050,000 tokens, with up to 922,000 input tokens and 128,000 output tokens.
  • Reasoning effort: low, medium, high, xhigh or max, trading speed and cost for quality.
  • Knowledge cutoff: August 2026. It is optimized for code written in English.

How well it codes

Microsoft reports these pass rates at maximum reasoning effort, measured on its own MSBench platform through the GitHub Copilot CLI. They are Microsoft’s results, not independent tests.

The model card also says Flash is less capable than MAI Code 2 on complex, long-horizon tasks and may need more guidance.

  • DeepSWE 1.1: 59.9% for MAI Code 2 Flash, 73.2% for MAI Code 2.
  • Terminal-Bench 2.1: 78.3% for MAI Code 2 Flash, 84.6% for MAI Code 2.
  • SWE Atlas: 44.8% for MAI Code 2 Flash, 43.1% for MAI Code 2.

Where to use MAI Code 2 Flash

Microsoft names two channels: the model picker in GitHub Copilot clients such as Copilot CLI and Visual Studio Code, and Microsoft Foundry, where it is in limited-access preview. You can also call it through an OpenAI-compatible API such as this one.

  1. Create a key. Sign in on maicode2.com and create an API key.
  2. Add balance. Pay $5 once; requests are billed by the tokens they use.
  3. Call mai-code-2-flash. Set the base URL https://maicode2.com/v1 in your SDK or editor and use the model mai-code-2-flash.

Frequently asked questions

Is MAI Code 2 Flash free?

Data Studios reports that GitHub offers MAI Code 2 Flash on every Copilot plan, including Copilot Free, under GitHub’s own limits. On this API there is no free tier: requests are paid from a balance you add once, from $5.

How is MAI Code 2 Flash different from MAI Code 2?

Same family and training recipe, different size. MAI Code 2 has about 77 billion active parameters and suits long agent runs and changes across many files; Flash has about 12 billion and is faster and cheaper for everyday edits.

What is the context window of MAI Code 2 Flash?

1,050,000 tokens, according to Microsoft’s model card. This API accepts up to 262,144 input tokens per request to keep each charge predictable.

Is maicode2.com run by Microsoft?

No. MAI Code 2 API is an independent service that forwards requests to the MAI Code 2 models through a hosted model provider. It is not affiliated with or endorsed by Microsoft or GitHub.

Sources

Updated 2026-12-01. MAI Code 2 API is an independent service and is not affiliated with or endorsed by Microsoft or GitHub. MAI, MAI Code 2 and MAI Code 2 Flash are names of Microsoft models, used here only to describe them. Model output can be wrong; review generated code before you run it.