mistralai

Mistral: Codestral 2508

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](https://mistral.ai/news/codestral-25-08)

Context
256k tokens
Input / 1M tokens
$0.30
Output / 1M tokens
$0.90
Benchmark

Pricing

Input tokens$0.30 per 1M tokens
Output tokens$0.90 per 1M tokens
Cache read$0.03 per 1M tokens

Technical details

Model IDmistralai/codestral-2508
Context window256k tokens
Input modalitiestext, file
Output modalitiestext
TokenizerMistral

Use with MegaBrain

import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://getmegabrain.com/api/gateway/v1',
  apiKey: process.env.MEGABRAIN_API_KEY,
})

const response = await client.chat.completions.create({
  model: 'mistralai/codestral-2508',
  messages: [{ role: 'user', content: 'Hello!' }],
})

Ready to use Mistral: Codestral 2508?

Get an API key and start making requests in minutes.

Get an API key