API pricing and cost

MAI Code 2 Flash pricing

MAI Code 2 Flash official API pricing is $0.05 per million input tokens and $0.25 per million output tokens. Current promotional Standard rates. Valid 2026-11-17 – 2027-05-16 · UTC. Standard input/output thereafter: $0.10 / $0.50 per million tokens.

Covers the 2026-11-17 MAI Code 2 Flash release.

$0.05

Official input / 1M

Standard tier

$0.25

Official output / 1M

Standard tier

$0.058

Blended / 1M

4:1 input/output, 90% input cached

$5.76

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.05
Cached inputInput served from the prompt cache
$0.005
OutputStandard text tier, per million tokens
$0.25

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

    $0.10$0.05 / 1,000,000 tokens50% off

    Valid 2026-11-17 – 2027-05-16 · UTC

  • GitHub Copilot launch offer · standard · Cache read

    $0.01$0.005 / 1,000,000 tokens50% off

    Valid 2026-11-17 – 2027-05-16 · UTC

  • GitHub Copilot launch offer · standard · output

    $0.50$0.25 / 1,000,000 tokens50% off

    Valid 2026-11-17 – 2027-05-16 · UTC

Standard list prices effective 2027-05-17: $0.10 input, $0.50 output, $0.01 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 Flash. Compare listed rates, effective dates, and service-tier notes for the same model.

Published USD API provider rates for MAI Code 2 Flash
ProviderInput / 1MCached / 1MOutput / 1MAdditional tiers & notes
Microsoft⁠OfficialEffective from 2027-05-17 · Last verified 2026-11-18$0.10$0.01$0.50—

What MAI Code 2 Flash 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.

Estimated monthly cost of four workloads on MAI Code 2 Flash
WorkloadPer requestMonthly tokensInputOutputPer month
Chatbotshort turns1,500 in · 500 out× 100,000 requests150M in · 50M out$7.50$12.50$20.00$0.0002 / request
Assistant8K context · 90% cached8,000 in · 2,000 out× 10,000 requests80M in · 20M out$0.76$5.00$5.76$0.000576 / request
RAGlong input, cached · 50% cached24,000 in · 800 out× 20,000 requests480M in · 16M out$13.20$4.00$17.20$0.00086 / request
Coding agentlong output · 70% cached15,000 in · 4,000 out× 20,000 requests300M in · 80M out$5.55$20.00$25.55$0.001278 / request
Start from

Monthly cost

$5.76

on MAI Code 2 Flash

Per request

$0.000576

80M in · 20M out a month

Split

$0.76 + $5.00

input + output

MAI Code 2 Flash 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.

Blended price and monthly cost of MAI Code 2 Flash and comparable models
ModelBasisBlended / 1MPer monthvs MAI Code 2 Flash
Ling-3.0-flashAnt GroupLower-cost option$0.049$4.9414%cheaper
gpt-oss-20bOpenAILower-cost option$0.052$5.209.7%cheaper
MAI Code 2 FlashMicrosoft · this modelThis model$0.058$5.76—
Nemotron 3.5 LightningNVIDIASimilar price$0.058$5.841.4%dearer
Inkling 2 SmallThinking Machines LabShared benchmark coverage$0.246$24.56326%dearer · 4.3×
DeepSeek-V4.1-Flash-1017DeepSeek-AIShared benchmark coverage$0.268$26.83366%dearer · 4.7×
MAI Code 2MicrosoftShared benchmark coverage$0.558$55.80869%dearer · 9.7×

Catalog price position: #15 cheapest of 252 active priced models in the LLMLearner catalog (cheaper than 94% at the 4:1 mix with 90% of input assumed cached where published; official headline rates).

MAI Code 2 Flash pricing questions

How much does MAI Code 2 Flash cost per million tokens?
MAI Code 2 Flash official API pricing is $0.05 per million input tokens and $0.25 per million output tokens. Cached input is billed at $0.005 per million tokens. At the default 4:1 input-to-output mix with 90% of input assumed cached, that is $0.058 per million blended tokens. Current promotional Standard rates. Valid 2026-11-17 – 2027-05-16 · UTC. Standard input/output thereafter: $0.10 / $0.50 per million tokens.
What does MAI Code 2 Flash 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 Flash costs about $5.76/month ($0.000576/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 Flash?
Among the comparable models shown on this page, Ling-3.0-flash is cheaper at $0.049 per million blended tokens vs $0.058 for MAI Code 2 Flash. 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 Flash ranks 15th cheapest (cheaper than 94% at the default 4:1 mix).
Does MAI Code 2 Flash charge for cached input?
Yes, at a discount: $0.005 per million cached input tokens against $0.05 uncached.