Devstral 2 API
Access Devstral 2 through one API key. Mistral's coding-specialized model for developers.
Mistral's coding-specialized model. Purpose-built for software development with strong code generation, debugging, and refactoring abilities.
Takes 30 seconds.
Devstral 2 API pricing
Pay per request from your YepAPI balance — no subscription, no monthly minimum. Prices updated October 23, 2026.
| Token type | Price |
|---|---|
| Input | $0.59 / 1M tokens |
| Output | $2.95 / 1M tokens |
| Context window | 262K tokens |
| What it costs | Per job | Per 1,000 |
|---|---|---|
| Chat reply1K input + 500 output tokens | $0.0021 | $2.07 |
| RAG answer8K input + 800 output tokens | $0.0071 | $7.08 |
| Agent step with tools30K input + 2K output tokens | $0.024 | $23.60 |
| Long document summary100K input + 2K output tokens | $0.065 | $64.90 |
4,900+
Developers
2.3M+
API calls served
184
Endpoints
$0.01
Per call
Yep, that's it.
Try it live
Send a message and see Devstral 2 respond in real time.
Maximum tokens in the response.
Real-time tokens
Devstral 2 specs
| Provider | Mistral |
|---|---|
| Model ID | mistralai/devstral-2512 |
| Endpoint | /v1/ai/chat |
| Type | Text Generation |
| Context window | 262K tokens |
| Max output | 8K tokens |
| Reasoning | No |
| OpenAI-compatible | Yes — /v1/ai/chat/completions |
How to get a Devstral 2 API key
- 1
Create an account
Sign up at yepapi.com with Google or email. It takes about 30 seconds.
- 2
Create an API key
Open the dashboard, go to API Keys and create a key. Copy it — it starts with yep_sk_.
- 3
Call Devstral 2
Send a request to /v1/ai/chat with the x-api-key header and model "mistralai/devstral-2512".
- 4
Pay as you go
Usage is billed per request from your balance. Top up any amount; there is no subscription.
Strengths
Mistral's coding-specialized model, purpose-built for software development rather than general chat, with a 262,144-token context window and up to 8,192 output tokens.
Strong at writing new code and reviewing existing code, trained specifically on software-engineering tasks across many languages and frameworks.
Tuned for finding and fixing bugs and restructuring code while preserving behavior, the kind of iterative work coding agents rely on.
A 262,144-token context window holds large multi-file code spans at once, so it can reason across a sizeable portion of a repository in a single request.
Quick start
Copy this snippet and start making calls with Devstral 2.
const res = await fetch('https://api.yepapi.com/v1/ai/chat', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"model": "mistralai/devstral-2512",
"messages": [
{
"role": "user",
"content": "Explain API gateways in 2 sentences."
}
],
"maxTokens": 256
}),
});
const { data } = await res.json();
console.log(data.message.content);Devstral 2 vs similar models
Every model below runs on the same API key — switch by changing the model ID.
| Model | Provider | Price | Context |
|---|---|---|---|
| Devstral 2 | Mistral | $0.59 in / $2.95 out per 1M | 262K |
| Mistral Small 4 | Mistral | $0.22 in / $0.89 out per 1M | 262K |
| Mistral Large 4 | Mistral | $2.01 in / $6.17 out per 1M | 1.0M |
| Mistral Medium 3.5 | Mistral | $2.22 in / $11.08 out per 1M | 262K |
| Nemotron 3 Super | NVIDIA | $0 in / $0 out per 1M | 262K |
| Qwen3.7 Flash | Qwen | $0.04 in / $0.19 out per 1M | 1M |
| Solar Mini 4 | Upstage | $0.07 in / $0.30 out per 1M | 524K |
| Nemotron 3.5 Lightning | NVIDIA | $0.10 in / $0.30 out per 1M | 262K |
Why use Devstral 2 through YepAPI?
Devstral 2 API — pricing, context window & access
Devstral 2 is Mistral's coding-specialized model, purpose-built for software development with strong code generation, debugging, and refactoring. It carries a 262,144-token context window and up to 8,192 output tokens, focused squarely on engineering work.
YepAPI serves Devstral 2 over an OpenAI-compatible endpoint with one key that also reaches Mistral Medium 3.5, Mistral Small 4, Claude, Gemini, Grok, Qwen, and Perplexity Sonar, plus SEO, SERP, and scraping APIs.
What is Devstral 2?
Devstral 2 is Mistral's developer-focused model, specialized for software engineering rather than general-purpose chat. It is tuned for the core loop of coding work — generating code, reviewing it, finding and fixing bugs, and refactoring while keeping behavior intact — across many languages and frameworks. It carries a 262,144-token context window, enough to hold large multi-file spans of a codebase, and returns up to 8,192 output tokens. For agentic coding tools and developer assistants, it offers focused coding ability at a low price.
Build with Devstral 2 via YepAPI
Call Devstral 2 through YepAPI's OpenAI-compatible /v1/ai/chat endpoint with the model set to devstral-2512. Existing OpenAI SDK code works after a base-URL and model-name change. A common setup routes coding requests to Devstral 2 and general chat to Mistral Small or Claude — a one-string switch. The same key reaches every model plus SEO, SERP, and scraping endpoints, so a coding agent and its tools share one integration.
Devstral 2 API pricing — $0.59 / $2.95 per 1M tokens
Devstral 2 costs $0.59 per 1M input tokens and $2.95 per 1M output tokens on YepAPI. For a dedicated coding model with a 256K-token window those rates are very low, which matters for agentic workflows that read large code context and iterate over many turns. The cheap input rate especially helps when you feed substantial repository context per request. Billing is per token with no minimums.
Devstral 2 for coding agents and developer tools
Devstral 2 is built for the work it names: powering coding agents, IDE assistants, automated code review, and refactoring pipelines. Its specialization means it focuses compute on engineering quality rather than broad chat, and its 256K-token window lets an agent load several files at once to reason across them. For developers who want strong, affordable coding throughput, it is a focused alternative to general flagships.
What developers say
“Switched from SerpAPI and cut our SERP costs by 80%. Same data quality, way simpler billing.”
“One API key for AI models, SERP data, and web scraping. Saved us from managing 4 separate providers.”
“The $5 free credit let us prototype our entire rank tracking feature before committing. No other API does that.”
Frequently asked questions
Mistral's coding-specialized model. Purpose-built for software development with strong code generation, debugging, and refactoring abilities.
Devstral 2 costs $0.59 per 1M input tokens and $2.95 per 1M output tokens through YepAPI, billed per request with no monthly fee. For example, a chat reply (1K input + 500 output tokens) costs about $0.0021.
Sign up at yepapi.com (Google or email, about 30 seconds), open the dashboard and create an API key. The same key works for Devstral 2 and every other model — no separate Mistral account or waitlist.
Use "mistralai/devstral-2512" as the model on /v1/ai/chat. The short alias "devstral" also works.
Yes. Point the OpenAI SDK at https://api.yepapi.com/v1/ai with your YepAPI key and set model to "mistralai/devstral-2512". Streaming works the same way, so existing OpenAI code only needs the base URL and key changed.
Devstral 2 supports a 262K token context window with up to 8K output tokens per request.
Explore more models
Mistral Small 4
MistralAccess Mistral Small 4 through one API key. Europe's leading AI model at a great price.
Mistral Medium 3.5
MistralAccess Mistral Medium 3.5 through one API key. Mistral's balanced mid-tier model.
Mistral Large 4
MistralAccess Mistral Large 4 through one API key. Mistral Mistral Frontier Multimodal.
GPT-5.6 Luna
OpenAIAccess GPT-5.6 Luna through one API key. OpenAI GPT-5.6 Fast & Low-Cost.
Qwen3.7 Plus
QwenAccess Qwen3.7 Plus through one API key. Qwen Cost-Effective Qwen3.7.
GPT-5.2 Chat
OpenAIAccess GPT-5.2 Chat through one API key. Reliable chat model.
More Text Generation models
- Qwen3.8 Max (0902) API · Qwen
- DeepSeek V4 Pro API · DeepSeek
- Claude Haiku 4.5 API · Anthropic
- Mercury 3 API · Inception
- Claude Haiku 5.5 API · Anthropic
- Ember-1 API · Fireworks
- Step 5 Preview API · StepFun
- MiMo-V2.6-Pro-UltraSpeed API · Xiaomi
- MiniMax M3 API · MiniMax
- GPT-6 Luna Pro API · OpenAI
- Claude Fable 5 API · Anthropic
- MiMo-V2.6-Flash API · Xiaomi