Bonus: Top up now and we'll double your first deposit — get x2 credits instantly.

Devstral 2 API: Endpoint & Pricing

Deprecated 22 May 2026

Devstral 2 2512 is a 123B-parameter open-source large language model from Mistral AI, optimized for agentic coding and long-context software engineering workflows.

What is Devstral 2 2512?

Devstral 2 2512 is a 123B-parameter dense transformer model by Mistral AI specializing in agentic coding with a roughly 256K–262K token context window. It is primarily used for software engineering agents that can explore large codebases, orchestrate changes across multiple files, and handle tasks like bug fixing or modernizing legacy systems while maintaining architecture-level context. It is also applied to general coding assistance, complex reasoning over long technical documents, and workflows that integrate external tools and APIs. Devstral 2 belongs to Mistral’s Devstral family of open-weight code-focused models, following earlier Devstral and Devstral Small/Medium releases.


Can you self-host Devstral 2 2512?

No. We found no public weights for Devstral 2 2512 on Hugging Face, so there is nothing to download, quantize or serve on your own GPUs: no VRAM budget, no vLLM or GGUF build to plan for. The only way to run it is over an API.

Skip the deploy — use LLM.API as your endpoint

No GPUs, no quantization trade-offs. Same model, OpenAI-compatible, up to 30% below list price.

Providers

Different companies host the same model. OpenRouter routes your request to one of them based on the routing mode you pick — Balanced (price + speed), Nitro (fastest), or Exacto (highest tool-calling accuracy).

List price by provider

InputOutput
mistral$0.4 in
$2 out

Provider list prices; the LLM.API discount applies on top.

Provider Input Output Cache read /M Latency Throughput Uptime
mistralin $0.4; out $2 per 1M tokens262K tokenstools, streaming, JSON, structured

Prices and availability from the LLMAPI catalogue, updated nightly. Last updated 8 Oct 2026.

Try this model

Test Devstral 2 2512 right here — free to start.

Devstral 2 2512
Hi! Want to test the model?

Suggestions for your first prompt

Code snippet

Call the model through the OpenAI-compatible API.

Switching from OpenAI? Change 2 lines.

- base_url="https://api.openai.com/v1"
- api_key="YOUR_OPENAI_KEY"
+ base_url="https://api.llmapi.ai/v1"
+ api_key="YOUR_LLMAPI_KEY"

Everything else stays the same — SDK, message format, tools, streaming. Set model to devstral-2512 and the call runs unchanged.

bash
curl https://api.llmapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $LLMAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "devstral-2512",
    "messages": [
      {"role": "user", "content": "Give me three crisp launch checklist items."}
    ]
  }'
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_LLMAPI_KEY",
    base_url="https://api.llmapi.ai/v1",
)

resp = client.chat.completions.create(
    model="devstral-2512",
    messages=[
        {"role": "system", "content": "You are a precise product assistant."},
        {"role": "user", "content": "Give me three crisp launch checklist items."},
    ],
)
print(resp.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.LLMAPI_KEY,
  baseURL: "https://api.llmapi.ai/v1",
});

const resp = await client.chat.completions.create({
  model: "devstral-2512",
  messages: [
    { role: "user", content: "Give me three crisp launch checklist items." },
  ],
});

console.log(resp.choices[0].message.content);
stream = client.chat.completions.create(
    model="devstral-2512",
    messages=[{"role": "user", "content": "Write a haiku about latency."}],
    stream=True,
)

for chunk in stream:
    delta = chunk.choices[0].delta.content
    if delta:
        print(delta, end="", flush=True)
{
  "model": "devstral-2512",
  "messages": [
    {"role": "system", "content": "You are a precise product assistant."},
    {"role": "user", "content": "Give me three crisp launch checklist items."}
  ]
}

Supported endpoints & features

Base URL https://api.llmapi.ai/v1 · model ID devstral-2512 · OpenAI-compatible.

  • POST /v1/chat/completionsChat Completions — supported
FeatureStatusHow to set it
Function calling (tools)Supportedtools, tool_choice
Parallel tool callsNot supportedparallel_tool_calls
JSON modeSupportedresponse_format: {"type": "json_object"}
Structured outputsSupportedresponse_format: {"type": "json_schema", …}
StreamingSupportedstream: true
Vision (image input)Not supportedimage_url content parts
Web searchNot supportedweb_search

Errors & fallback routing

CodeWhat it meansWhat to do
401Missing or invalid API key.Send Authorization: Bearer YOUR_LLMAPI_KEY and check the key is active.
429Rate limited, or the upstream provider is throttling the request.Back off and retry with jitter; the gateway also retries the request on another provider where one is available.
5xxUpstream provider error or timeout.Retry; fallback routing sends the retry to the next healthy provider for this model.

When a provider fails or throttles, the request is routed to the next provider serving this model — the ones listed in the providers table above.

Devstral 2 in production

What the model is good at.

  • General Assistance

    Engages in multi-turn conversations, answering questions, explaining concepts, and following instructions across many everyday and technical topics.

  • Code Reasoning

    Understands and generates source code, explains programming concepts, and helps debug or refactor snippets in common programming languages.

  • Text Translation

    Translates between multiple natural languages while preserving meaning, tone, and important domain-specific terminology when possible.

  • Image Analysis

    Interprets images to identify objects, scenes, and visual relationships, and provides concise natural-language descriptions of visual content.

  • Text Extraction

    Reads text from images or documents, extracting machine-usable content from screenshots, scans, or photos of printed materials.

What you get when you call Devstral 2 through LLM.API.

  • Unified AI Routing

    Dynamically route each request across multiple providers and models based on cost, latency, and quality—without changing your integration code.

    One endpoint, every model
  • Cost-Aware Optimization

    Control spend with per-route cost policies, automatic model downshifts, and clear usage insights so you never overpay for simple workloads.

    Cut costs, not coverage
  • Resilient Fallback Logic

    Define automatic failover chains so if a provider is down, rate-limited, or slow, your requests seamlessly retry against alternative models.

    Stay online, automatically
  • End-to-End Observability

    Trace every request across models and providers with logs, metrics, and latency breakdowns to debug issues and tune performance in production.

    See every token hop
  • Task-Native Abstractions

    Use high-level task APIs—chat, tools, RAG, workflows—instead of provider-specific primitives, so you can swap or compose models without refactoring.

    Code to tasks, not vendors
  • High-Throughput Batch

    Process massive job queues with async, fault-tolerant batch execution, smart chunking, and automatic retries to fully utilize model capacity.

    Scale from 10 to millions

When to Use — When NOT to Use

Use it if...

  • You need a strong general-purpose LLM from Mistral for versatile application prototyping.
  • You need good balance between reasoning, coding, and language tasks in one model.
  • Your use case involves integrating with the Mistral ecosystem and existing Devstral tooling.
  • You need an LLM suitable for typical chatbot, assistant, and productivity-style applications.
  • Your use case involves experimenting with newer Mistral releases to evaluate capability improvements.

Avoid if...

  • You need guaranteed best-in-class reasoning beyond what standard frontier Mistral models offer.
  • Your workload requires strict, audited compliance certifications that Devstral 2 2512 may not hold.
  • You need a tiny, on-device model optimized for mobile or embedded deployments.
  • Your workload requires a fully open-weights model for self-hosting and offline control.
  • You need long-term model stability with frozen behavior rather than frequently updated variants.

LLM API rating for Devstral 2

★ 2.4/ 5.0LLM API rating
50% production adoption · 30% category benchmark · 20% tooling & value
✓ Verified benchmark · Artificial Analysis
2.5Production adoptionNot yet tracked — no public usage data for this release
1.3Benchmark qualityArtificial Analysis Intelligence Index 8.6
3.5Developer ecosystemContext window, tool and JSON support, price against the category median
Reasoning & chat 2.4Coding 2.4Tool & function calling 4.2Long context 3.1
How is this rating calculated?

Every model gets a separate 1.0–5.0 score for each category it can be used in, so a model can rate high for coding and lower for vision. The score combines three parts:

  1. Production adoption — 50%. How widely the model is actually used in production: provider traffic, LiteLLM and gateway usage, open-weight downloads and its LMArena rank. Proven, widely used models score highest.
  2. Category benchmark — 30%. The public benchmark that matters for that category — the Artificial Analysis Intelligence Index and LMArena Elo for reasoning, LMArena coding Elo for coding, image and document support plus vision Elo for vision, tool and JSON support for function calling, measured speed for voice.
  3. Tooling & value — 20%. Context window, support for tools, structured outputs and streaming, and price compared with the category median.

Scores of 4.0 and above are shown in green, 3.0–3.9 in yellow, below 3.0 in red. When a model has no public data for a part, it gets a neutral value instead of an invented number.

A “Verified benchmark” mark (✓) means an independent lab — LMArena or Artificial Analysis — has actually tested that model, and the source figure is shown. Models without that mark are labelled “Estimated from published specs”: the score comes from the published context window, tool and schema support, price and adoption only, because no independent lab has tested them yet.

One exception: a brand-new top-tier model that scores very high on the independent benchmarks but has no usage history yet is rated on the benchmark (60%) and tooling & value (40%) alone, so a missing adoption figure can't hold it back. All inputs come from public sources and are refreshed weekly.

Adoption and benchmark inputs come from public sources — LMArena, Artificial Analysis Intelligence Index and published model specs. Updated weekly.

What developers say about Devstral 2 2512

LMArena—Speed—Sources: LMArena, Artificial Analysis

Summarised from public developer discussions and write-ups. Opinions are the sources’, not LLM.API’s.

  • Developers report that the model is highly effective for tasks requiring strict adherence to schemas and JSON formatting, citing its perfect internal scores for structured output and constrained rewriting.
  • Technical users observe that while initial output generation can feel slower, the model often reduces total rework cycles by producing more consistent, deliberate plans for complex architecture and debugging tasks.
  • Engineers note a practical limitation where the 262K context window effectively handles approximately 80K tokens of actual code before reaching functional performance limits for multi-file repository analysis.

Frequently Asked Questions

  • What is Devstral 2 2512?

    Devstral 2 2512 is a Mistral language model accessible via LLM.API, designed for general-purpose text generation and reasoning workloads.

  • What is Devstral 2 2512 best suited for?

    Devstral 2 2512 is best for building chatbots, code assistants, and knowledge retrieval tools that require strong reasoning and instruction-following.

  • How is Devstral 2 2512 priced on LLM.API?

    Devstral 2 2512 uses LLM.API’s unified token-based pricing; check your LLM.API dashboard or pricing docs for current per-token input and output rates.

  • What context window does Devstral 2 2512 support?

    Devstral 2 2512 supports a context window defined by LLM.API’s Mistral configuration; refer to the model card in LLM.API for the exact token limit.

  • How fast is Devstral 2 2512 on LLM.API?

    Typical latency is low and suitable for interactive applications, but exact speeds depend on your region, load, and chosen LLM.API deployment options.

  • Which modalities does Devstral 2 2512 support?

    Devstral 2 2512 is exposed on LLM.API as a text-only model, accepting and returning UTF-8 text content.

  • How do I call Devstral 2 2512 through LLM.API?

    Use the standard LLM.API chat or completion endpoint, specifying the model identifier for Devstral 2 2512 and including your messages array.

  • How does Devstral 2 2512 compare to other Mistral models on LLM.API?

    Devstral 2 2512 targets strong general-purpose performance, while lighter Mistral variants may be cheaper or faster but somewhat less capable.

  • What are the main limitations of Devstral 2 2512?

    Devstral 2 2512 can hallucinate, lacks real-time knowledge, and should not be used as the sole basis for safety-critical or legal decisions.

  • Does Devstral 2 2512 support streaming responses on LLM.API?

    Yes, you can enable streaming via the LLM.API request parameters to progressively receive Devstral 2 2512’s output tokens.

Get one key to every model

Swap your API key. Keep your code.