impulse

Mai Code 2 Flash

API id mai-code-2-flash
Input / 1M
$0.05
at GitHub Copilot
Output / 1M
$0.25
at GitHub Copilot
Context window
128K
tokens
Max output
128K
tokens per reply
Hosts
0
1 listings
Released
-
date not published

Pricing

List prices at GitHub Copilot, in US dollars per million tokens.

TierInput / 1MOutput / 1M
Standard$0.05$0.25
Cached input
90% off input
$0.005

What it costs a month

At GitHub Copilot list prices, 30 days.

  • Chat assistant5,000 requests a day, 2K in / 0.5K out, cached$29.70
  • RAG over documents2,000 requests a day, 8K in / 0.6K out, cached$22.20
  • Coding agent1,000 requests a day, 40K in / 2K out, cached$37.20
  • Overnight batch20,000 requests a day, 4K in / 0.4K out$180
Use your own numbers

Where to run it

0 hosts serve Mai Code 2 Flash. The comparison is on blended price, 3 parts input to 1 part output.

HostIn / out per 1M
GitHub CopilotSubscription
mai-code-2-flash
In the subscription

Capabilities

Core

  • Streaming
  • Function calling
  • JSON mode
  • Structured outputs

Multimodal

  • Vision
  • Image input
  • Audio
  • Image generation
  • Video

Advanced

  • Reasoning
  • Tool calling
  • MCP
  • Prompt caching
  • Batch API
  • Embeddings
Takes in
TextImages
Produces
Text
Features
Parallel tool calls

Similar models

This model has no listed price, so these are current models with similar capabilities.

Smaller Microsoft models

  • Mai Thinking 1
    Microsoft · on Azure AI Foundry
    $2.00 / $8.00
    Lacks vision, structured

Other frontier labs

  • GPT-6.2 Astra
    OpenAI · on OpenAI
    $8.00 / $40.00
    Has every key capability
  • Claude Fable 5.2
    Anthropic · on Anthropic
    $8.00 / $40.00
    Has every key capability
  • Gemini 4 Carbon
    Google · on Google AI Studio
    $2.00 / $10.00
    Has every key capability
  • Grok 4.7
    xAI · on xAI
    $2.00 / $6.00
    Has every key capability

Open-weight picks

  • Command A Plus
    Cohere · on AIHubMix
    $2.50 / $10.00
    Has every key capability
  • Kimi K3.1 Pro
    Moonshot AI · on Databricks
    $2.00 / $10.00
    Has every key capability
  • Qwen4 Max
    Alibaba Qwen · on Together AI
    $1.43 / $4.28
    Has every key capability
  • Inkling
    Independent · on DeepInfra
    $0.95 / $4.05
    Has every key capability

Model line

Newer and older versions, at each lab's own price.

  1. UndatedMai Code 2 FlashLatest$0.05 / $0.25
  2. UndatedMai Code 1.1 Flash$0.20 / $1.20

Call it

Using GitHub Copilot's API.

Python
from litellm import completion

response = completion(
    model="github_copilot/mai-code-2-flash",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

Quick answers

What is Mai Code 2 Flash's context window?

128K tokens, with up to 128K tokens in one reply.

Is there a newer version of Mai Code 2 Flash?

No. Mai Code 2 Flash is the newest model in its line.

What is Mai Code 2 Flash's API model id?

Use mai-code-2-flash with GitHub Copilot.

Sources

Raw catalog entry for mai-code-2-flash on GitHub Copilot
{
  "cache_read_input_token_cost": 5e-9,
  "input_cost_per_token": 5e-8,
  "litellm_provider": "github_copilot",
  "max_input_tokens": 128000,
  "max_output_tokens": 128000,
  "mode": "responses",
  "output_cost_per_token": 2.5e-7,
  "source": "https://docs.github.com/en/copilot/reference/copilot-billing/models-and-pricing",
  "supported_endpoints": [
    "/v1/responses"
  ],
  "supports_function_calling": true,
  "supports_parallel_function_calling": true,
  "supports_reasoning": true,
  "supports_response_schema": true,
  "supports_vision": true
}