mistralai logo
mistralai

Mistral: Codestral 2508 (batch)

Source description (English)

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

Overview

Model specifications

Context
256,000 tokens
Maximum output
204,800 tokens
Architecture
text+file->text
Tokenizer
Mistral
Knowledge cutoff
2025-03-31
Moderated
No
OPENROUTER

Complete pricing

Synchronized OpenRouter rates. Token prices are shown per one million tokens.

Input
$0.15
per 1M tokens
Output
$0.45
per 1M tokens
Cache read
$0.015
per 1M tokens
API

Model configuration

Default parameters

temperature
0.3
API

Quick start

Set OPENROUTER_API_KEY locally. Python requires requests; JavaScript runs in Node.js. Keep the key on the server.

This submits an asynchronous batch using the base model ID. A job ID confirms submission, not completion.

API documentation

curl --fail-with-body https://openrouter.ai/api/beta/batches \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"endpoint":"/v1/chat/completions","model":"mistralai/codestral-2508","requests":[{"custom_id":"request-1","body":{"messages":[{"role":"user","content":"Hello!"}]}}]}'

# Replace JOB_ID with the returned id to check progress.
curl --fail-with-body "https://openrouter.ai/api/beta/batches/JOB_ID" \
  -H "Authorization: Bearer $OPENROUTER_API_KEY"
Capabilities

InputOutput

Input
textfile
Output
text
API

Supported API parameters

frequency_penaltymax_tokenspredictionpresence_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_p
Available providers

1 Provider

Checked: September 10, 2026

Live providers on OpenRouter

Provider availability, latency, throughput and routing can change continuously. Open the source page for current operational data.

OpenRouter

Mistral

Not provided
Context
256K
Maximum output
205K
Input
$0.15
Output
$0.45
Cache read
$0.015
Cache write
Not provided
mistralai

4 models

All models