Mistral Codestral-2501 API

Mistral Codestral-2501 excels in code generation with advanced features like fill-in-the-middle completion and extensive language support.
Output

How to use Mistral Codestral-2501 API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to .

OpenAI-compatible — swap the base URL and it works with your existing SDK.

Mistral Codestral-2501 API Pricing

TypePrice
Input
Output

Mistral Codestral-2501 vs other models

ModelInputOutputContextBest for
$6.5 / 1M tokens
$39 / 1M tokens
1.05M tokens
Reasoning + agents
$2.6 / 1M tokens
$13 / 1M tokens
1M tokens
Balanced coding + agents
$3.9 / 1M tokens
$19.5 / 1M tokens
1M tokens
Long-context, multimodal & agentic workflows
$0.65 / 1M tokens
$3.9 / 1M tokens
1.05M tokens
Reasoning + agents

Frequently asked questions

Yes, Mistral Codestral-2501 can stream responses as they are generated.

Yes, Mistral Codestral-2501 supports both function calling and structured outputs.

Mistral Codestral-2501 was built by Mistral AI.

It is accessed through the v1/chat/completions endpoint.

Start building with Mistral Codestral-2501

Get API Key
1000+ models, one API.