Mai Code 2 Flash
API id
mai-code-2-flashInput / 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.
| Tier | Input / 1M | Output / 1M | |
|---|---|---|---|
| Standard | $0.05 | $0.25 | |
| Cached input 90% off input | $0.005 | 90% off input |
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
Where to run it
0 hosts serve Mai Code 2 Flash. The comparison is on blended price, 3 parts input to 1 part output.
| Host | In / out per 1M | Model id | |
|---|---|---|---|
GitHub CopilotSubscription mai-code-2-flash | In the subscription | mai-code-2-flash |
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
Other frontier labs
Open-weight picks
Model line
Newer and older versions, at each lab's own price.
- UndatedMai Code 2 FlashLatest$0.05 / $0.25
- 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
}