What is MAI Code 2 Flash?

MAI Code 2 Flash is a compact, high-efficiency artificial intelligence coding model developed by Microsoft AI for everyday software engineering, automated code generation, and agent-assisted programming. Released as part of the MAI Code 2 model family, it prioritizes fast response times, lower inference costs, and reliable performance on frequently encountered development tasks. The model uses a decoder-only transformer architecture with sparse Mixture-of-Experts layers and an integrated vision encoder, containing approximately 398 billion total parameters and 12 billion active parameters. Its context window supports approximately 1.05 million tokens, including up to 922,000 input tokens and 128,000 output tokens, enabling analysis of large source repositories and extensive technical documentation. MAI Code 2 Flash accepts text and image inputs, allowing developers to use written instructions and visual information within supported programming workflows. The model is optimized for code explanations, targeted modifications, routine bug fixes, refactoring, and rapid iterative development rather than highly complex scientific research or exceptionally long-running autonomous tasks. Its agentic capabilities support multi-file changes, repository-level question answering, debugging, test-driven verification, and interaction with development tools. Configurable reasoning effort levels, including low, medium, high, extra-high, and maximum, enable applications to balance response quality against latency and computational expense. Microsoft reports that MAI Code 2 Flash achieved performance comparable to GPT-6 Luna and Claude Haiku 5.5 across DeepSWE 1.1, Terminal Bench 2.1, and SWE-Atlas while costing approximately 65% and 20% as much, respectively, based on promotional pricing.

Pricing

Price Starts At:
$0.05 per 1M tokens (input)
Price Overview:
$0.05 per 1M input tokens, $0.005 per 1M cached input tokens, and $0.25 per 1M output tokens

Integrations

Offers API?:
Yes, MAI Code 2 Flash provides an API

Screenshots and Video

MAI Code 2 Flash Screenshot 1

Company Facts

Company Name:
Microsoft AI
Date Founded:
2024
Company Location:
United States
Company Website:
microsoft.ai/

Product Details

Deployment
SaaS
Training Options
Documentation Hub
Support
Web-Based Support

Product Details

Target Company Sizes
Individual
1-10
11-50
51-200
201-500
501-1000
1001-5000
5001-10000
10001+
Target Organization Types
Mid Size Business
Small Business
Enterprise
Freelance
Nonprofit
Government
Startup
Supported Languages
English

MAI Code 2 Flash Categories and Features