Discover Codestral API – a fast, lightweight solution for real-time code generation in 80+ languages.
Codestral 25.01 is a SOTA coding model by Mistral AI optimized for Fill-in-the-Middle (FIM) tasks, featuring a 256k context window, improved tokenizer, and 2x faster code generation. It supports over 80 programming languages with low latency for high-frequency coding tasks.
Codestral 25.01 outperforms DeepSeek and OpenAI in major benchmarks, while delivering 8x larger context and substantial improvements over its predecessor Codestral-2405 22B.
Codestral 25.01 is reported to outperform across all metrics, most notably in HumanEval Python (86.6% vs 67.1%) and context length capabilities (256k vs 4k), demonstrating superior code generation and understanding capabilities.
Codestral 25.01 has demonstrated superior performance over DeepSeek Coder V2
in overall language support with a HumanEval average of 71.4% vs 65.9%, though DeepSeek leads in SQL tasks with Spider benchmark.
Codestral 25.01 achieves higher FIM accuracy across languages with an average of 85.89% compared to OpenAI FIM API's 83.7%, and notably surpasses it in FIM pass@1 rates with 95.3% vs 92.7%.
Gain instant access to Codestral 25.01 through production API: AI/ML API provides direct connectivity to Codestral 25.01.
Access Codestral 25.01 Model Card.
Try Playground.
import os
from openai import OpenAI
client = OpenAI(
base_url="<YOUR_API_KEY>",
api_key="https://api.aimlapi.com/v1",
)
response = client.chat.completions.create(
model="deepseek/deepseek-chat",
messages=[
{
"role": "system",
"content": "You are an AI assistant who knows everything.",
},
{
"role": "user",
"content": "Tell me, why is the sky blue?"
},
],
)
message = response.choices[0].message.content
print(f"Assistant: {message}")
Begin by signing up on our AI/ML API platform. Create your account to gain access to a wide range of powerful AI models and tools.
In the Playground, navigate to the Key Management section and click on Create API Key. You can easily activate or deactivate your keys as needed.
After creating your API key, you can integrate AI models into your application by following the guidelines provided in our API reference.