YepAPI
MistralText Generation/v1/ai/chat

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 typePrice
Input$0.59 / 1M tokens
Output$2.95 / 1M tokens
Context window262K tokens
What it costsPer jobPer 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.

POST/v1/ai/chat

Maximum tokens in the response.

Real-time tokens

Hit "Send Request" to see the response

Devstral 2 specs

ProviderMistral
Model IDmistralai/devstral-2512
Endpoint/v1/ai/chat
TypeText Generation
Context window262K tokens
Max output8K tokens
ReasoningNo
OpenAI-compatibleYes — /v1/ai/chat/completions

How to get a Devstral 2 API key

  1. 1

    Create an account

    Sign up at yepapi.com with Google or email. It takes about 30 seconds.

  2. 2

    Create an API key

    Open the dashboard, go to API Keys and create a key. Copy it — it starts with yep_sk_.

  3. 3

    Call Devstral 2

    Send a request to /v1/ai/chat with the x-api-key header and model "mistralai/devstral-2512".

  4. 4

    Pay as you go

    Usage is billed per request from your balance. Top up any amount; there is no subscription.

Strengths

✓
Coding specialist

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.

✓
Code generation & review

Strong at writing new code and reviewing existing code, trained specifically on software-engineering tasks across many languages and frameworks.

✓
Debugging & refactoring

Tuned for finding and fixing bugs and restructuring code while preserving behavior, the kind of iterative work coding agents rely on.

✓
262K context

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.

ModelProviderPriceContext
Devstral 2Mistral$0.59 in / $2.95 out per 1M262K
Mistral Small 4Mistral$0.22 in / $0.89 out per 1M262K
Mistral Large 4Mistral$2.01 in / $6.17 out per 1M1.0M
Mistral Medium 3.5Mistral$2.22 in / $11.08 out per 1M262K
Nemotron 3 SuperNVIDIA$0 in / $0 out per 1M262K
Qwen3.7 FlashQwen$0.04 in / $0.19 out per 1M1M
Solar Mini 4Upstage$0.07 in / $0.30 out per 1M524K
Nemotron 3.5 LightningNVIDIA$0.10 in / $0.30 out per 1M262K

Why use Devstral 2 through YepAPI?

✓One API key for all models — no separate accounts
✓OpenAI SDK compatible — just change the base URL
✓No monthly minimums — pay per token
✓Switch models with one line of code
✓Full provider passthrough — citations, search results, and all extras included
✓Streaming and non-streaming support on every model
✓Works with Cursor, Claude, LangChain, and any LLM tool
✓Unified billing across all providers

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.

Start generating in 30 seconds

Pay per call, no subscriptions.

What developers say

“Switched from SerpAPI and cut our SERP costs by 80%. Same data quality, way simpler billing.”

Marcus T.

SEO Platform Founder

“One API key for AI models, SERP data, and web scraping. Saved us from managing 4 separate providers.”

Priya S.

Full-Stack Developer

“The $5 free credit let us prototype our entire rank tracking feature before committing. No other API does that.”

Jake R.

Indie Hacker

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.

Ready to use Devstral 2?

Pay per call, no subscriptions.

Explore more models