YepAPI

Command Palette

Search for a command to run...

MistralText Generation/v1/ai/chat

Devstral 2

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.

No credit card required. Takes 30 seconds.

2,400+

Developers

1.2M+

API calls served

100+

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

Context Window

262K tokens

Max Output

8K tokens

Input Price

$0.56 / 1M tokens

Output Price

$2.80 / 1M tokens

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);

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.56 / $2.80 per 1M tokens

Devstral 2 costs $0.56 per 1M input tokens and $2.80 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.

Try Devstral 2 free

New YepAPI accounts get $5 in free credit with no card required. At Devstral's low rates that covers a lot of code — enough to point a coding agent at it and judge generation, debugging, and refactoring quality before you pay.

Start generating in 30 seconds

$5 free credit on signup. No credit card required. Pay per call.

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.

Input tokens cost $0.56 per 1M tokens and output tokens cost $2.80 per 1M tokens through YepAPI. No monthly minimums — you only pay for what you use.

Sign up for a free API key, then send requests to the /v1/ai/chat endpoint.

Devstral 2 supports a 262K token context window with up to 8K output tokens per request.

Ready to use Devstral 2?

$5 free credit on signup. No credit card required. Pay per call.

Explore more models