impulse

Mai Code 2

API id mai-code-2
Input / 1M
$0.50
at GitHub Copilot
Output / 1M
$2.50
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.50$2.50
Cached input
95% off input
$0.025

What it costs a month

At GitHub Copilot list prices, 30 days.

  • Chat assistant5,000 requests a day, 2K in / 0.5K out, cached$295
  • RAG over documents2,000 requests a day, 8K in / 0.6K out, cached$216
  • Coding agent1,000 requests a day, 40K in / 2K out, cached$351
  • Overnight batch20,000 requests a day, 4K in / 0.4K out$1,800
Use your own numbers

Where to run it

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

HostIn / out per 1M
GitHub CopilotSubscription
mai-code-2
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

Call it

Using GitHub Copilot's API.

Python
from litellm import completion

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

Quick answers

What is Mai Code 2's context window?

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

What is Mai Code 2's API model id?

Use mai-code-2 with GitHub Copilot.

Sources

Raw catalog entry for mai-code-2 on GitHub Copilot
{
  "cache_read_input_token_cost": 2.5e-8,
  "input_cost_per_token": 5e-7,
  "litellm_provider": "github_copilot",
  "max_input_tokens": 128000,
  "max_output_tokens": 128000,
  "mode": "responses",
  "output_cost_per_token": 0.0000025,
  "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
}