Devstral 2 2512 overview
Devstral 2 2512 specs
- Model ID
mistralai/devstral-2512- Developer
- Mistral AI
- Context window
- 262,144 tokens
- Input
- Text
- Output
- Text
- API
- OpenAI-compatible, base URL
https://api.aimlapi.com/v1
Coding and code review
Generate, debug, and review code across languages, reading whole files or repos in a single prompt.
Agentic and multi-step workflows
Reliable tool-calling and instruction-following suit agent loops that plan, call tools, and iterate.
Complex reasoning
Extended reasoning improves reliability on multi-step math, logic, and technical analysis.
Long-document analysis
Summarize and extract from contracts, papers, and reports without aggressive chunking.
Use cases
Software engineering tasks: the model is documented as a frontier code agents model for solving software engineering tasks, with emphasis on using tools to explore codebases, edit multiple files, and power software engineering agents.
Document question answering: the documentation lists Document QnA as a stated use case for the model.
AI code assistants: the model is described as suitable for AI code assistants, alongside agentic coding and software engineering tasks.
Agentic coding and tool-calling workflows: it is documented as excelling at using tools to explore codebases and as supporting agentic, instruction-based SWE tasks.
Capabilities
- Function calling
- Streaming
- Structured outputs
- File input
Devstral 2 2512 API pricing
| Usage | Price | Unit |
|---|---|---|
| Input | $0.4655 | 1M tokens |
| Output | $2.33 | 1M tokens |
| Cached input | $0.0466 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
Devstral 2 2512 vs other models: token prices
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $0.4655 | $2.33 | |
| $0.1984 | $0.7935 | |
| $0.529 | $2.27 | |
| $1.36 | $4.18 | |
| $1.59 | $7.93 |
How to use the Devstral 2 2512 API
View docsBuild with your agent
Give your agent the model details, code and documentation.
1Get your API key
Create API keyexport AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"2Make your first request
curl 'https://api.aimlapi.com/v1/chat/completions' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "mistralai/devstral-2512",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "mistralai/devstral-2512",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "mistralai/devstral-2512",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Related articles
Devstral 2 2512 FAQ
What is the context window of Devstral 2 2512?
Devstral 2 2512 has a 262,144 tokens context window.
What inputs and outputs does Devstral 2 2512 support?
Devstral 2 2512 takes text as input and returns text.
What is the model ID for Devstral 2 2512?
Use mistralai/devstral-2512 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
How much does Devstral 2 2512 cost?
Devstral 2 2512 costs $0.4655 input and $2.33 output per 1M tokens on AI/ML API, billed as you go with no subscription.
Does Devstral 2 2512 support streaming?
Yes, Devstral 2 2512 can stream responses as they are generated.
Can Devstral 2 2512 read images?
Yes, Devstral 2 2512 accepts image input alongside text.
Who created Devstral 2 2512?
Devstral 2 2512 was built by Mistral AI.

