About
Mistral's cutting-edge language model for coding released end of July 2025. Codestral specializes in low-latency, high-frequency tasks such as fill-in-the-middle (FIM), code correction and test generation.
Blog Post
Pricing
| Input | $0.42 | per 1M prompt tokens |
|---|---|---|
| Output | $1.26 | per 1M generated tokens, reasoning included |
| Cached input | $0.04 | per 1M tokens read back from the prompt cache |
What a request costs
| Typical request | Each | Per 1,000 |
|---|---|---|
| Short chat reply1,500 in · 400 out | $0.0011 | $1.13 |
| Question over a long document40,000 in · 800 out | $0.018 | $17.81 |
| Agent tool step20,000 in · 1,200 out | $0.0099 | $9.91 |
At the developer-API rate, before any provider promotion or prompt-cache saving. In the app, the model picker shows what a message costs on your plan before you send it.
Benchmarks
Head-to-head rankings
- #1073DModel arenaElo 102045% wins
- #110UI componentsModel arenaElo 101647% wins
- #111Data vizModel arenaElo 101941% wins
- #121CodeModel arenaElo 100939% wins
- #122Game devModel arenaElo 97136% wins
- #124WebsitesModel arenaElo 101438% wins
Rankings from Design Arena head-to-head votes. Published by OpenRouter alongside its catalogue.
Call it from code
OpenAI-compatible: point any OpenAI SDK at https://api.privateer.pro/v1 and set
model. Keys are created in the app under Settings.
curl https://api.privateer.pro/v1/chat/completions \
-H "Authorization: Bearer $PRIVATEER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mistralai/codestral-2508",
"messages": [{ "role": "user", "content": "Hello" }]
}'
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.privateer.pro/v1",
api_key=os.environ["PRIVATEER_API_KEY"],
)
reply = client.chat.completions.create(
model="mistralai/codestral-2508",
messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.privateer.pro/v1",
apiKey: process.env.PRIVATEER_API_KEY,
});
const reply = await client.chat.completions.create({
model: "mistralai/codestral-2508",
messages: [{ role: "user", content: "Hello" }],
});
console.log(reply.choices[0].message.content);
Parameters this model accepts
frequency_penaltymax_tokenspredictionpresence_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_p