API pricing and cost

MAI Code 2 pricing

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

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

$0.50

Official input / 1M

Standard tier

$2.50

Official output / 1M

Standard tier

$0.558

Blended / 1M

4:1 input/output, 90% input cached

$55.80

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

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

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

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

  • GitHub Copilot launch offer · standard · Cache read

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

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

  • GitHub Copilot launch offer · standard · output

    $5.00$2.50 / 1,000,000 tokens50% off

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

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

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

What MAI Code 2 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
WorkloadPer requestMonthly tokensInputOutputPer month
Chatbotshort turns1,500 in · 500 out× 100,000 requests150M in · 50M out$75.00$125.00$200.00$0.0020 / request
Assistant8K context · 90% cached8,000 in · 2,000 out× 10,000 requests80M in · 20M out$5.80$50.00$55.80$0.00558 / request
RAGlong input, cached · 50% cached24,000 in · 800 out× 20,000 requests480M in · 16M out$126.00$40.00$166.00$0.0083 / request
Coding agentlong output · 70% cached15,000 in · 4,000 out× 20,000 requests300M in · 80M out$50.25$200.00$250.25$0.01 / request
Start from

Monthly cost

$55.80

on MAI Code 2

Per request

$0.00558

80M in · 20M out a month

Split

$5.80 + $50.00

input + output

MAI Code 2 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 and comparable models
ModelBasisBlended / 1MPer monthvs MAI Code 2
MAI Code 2 FlashMicrosoftShared benchmark coverage$0.058$5.7690%cheaper · 9.7×
Inkling 2 SmallThinking Machines LabShared benchmark coverage$0.246$24.5656%cheaper · 2.3×
DeepSeek-V4.1-Flash-1017DeepSeek-AIShared benchmark coverage$0.268$26.8352%cheaper · 2.1×
Gemini 2.5 FlashGoogle Deep MindLower-cost option$0.546$54.562.2%cheaper
MAI Code 2Microsoft · this modelThis model$0.558$55.80—
GLM-4.5Zhipu AISimilar price$0.567$56.721.6%dearer
GPT-Realtime-2.1 MiniOpenAISimilar price$0.571$57.122.4%dearer

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

MAI Code 2 pricing questions

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