---
last_updated: 2026-11-27
source_url: https://opper.ai/mistral/codestral-2508
title: "Codestral by Mistral"
description: "Mistral Codestral 25.08: code-optimized model for fill-in-the-middle completion and fast code generation, 128k context."
---

# Codestral

By [Mistral](https://opper.ai/mistral).

Released 30 Jul 2025, 15 days after [Voxtral Small](https://opper.ai/mistral/voxtral-small-2507) · [Announcement](https://docs.mistral.ai/models/codestral-25-08) · [All Mistral releases](https://opper.ai/model-releases/mistral)

Codestral 25.08 is Mistral's code-completion model, released at the end of July 2025 and tuned for high-frequency engineering tasks including fill-in-the-middle (FIM) and code generation. It supports a wide range of programming languages and a 128k token context window, and it can be self-deployed across cloud, VPC, or on-premises environments without architectural changes.

The model is built for production engineering workflows and powers IDE integrations. Mistral reports meaningful gains over earlier Codestral versions, including a higher rate of accepted completions and more retained code after a suggestion, validated on real production codebases.

Codestral 25.08 sits within Mistral's broader coding stack alongside the Devstral code agents and the Codestral Embed retrieval model, serving as the foundation for code completion and generation workflows.

## Available routes

Codestral runs on 2 different routes through the Opper gateway. Prices are per 1M tokens. In the EU it is served by Mistral. [See every Mistral model hosted in the EU](https://opper.ai/models/eu/mistral). Its routes and prices, live from the catalogue, are public JSON with no API key needed at https://api.opper.ai/v3/models?q=codestral-2508.

| Provider | Model id | Region | Zero data retention | Training | Input | Output | Cache read |
| --- | --- | --- | --- | --- | --- | --- | --- |
| [Mistral](https://opper.ai/provider/mistral) | `mistral/codestral-2508` | EU | Yes | No | $0.33 | $0.99 | $0.03 |
| [Mistral](https://opper.ai/provider/mistral) | `mistral:global/codestral-2508` | Multi-region | Yes | No | $0.30 | $0.90 | $0.03 |

## Key info

- Model id: `codestral-2508` (routes across Mistral)
- Input: Text
- Output: Text
- Features: Tools, Structured output
- Context window: 128K
- Max output: 8K
- Input price: $0.33 per 1M tokens ($0.03 cache read)
- Output price: $0.99 per 1M tokens
- Released: 30 Jul 2025
- EU residency available on Mistral
- Zero data retention on pay-as-you-go
- No training by default

## Data handling per route

Each route hosting Codestral has its own privacy posture, residency, and GDPR terms. Postures are maintained by Opper with a last-verification timestamp.

### Mistral — EU

Zero data retention: nothing is logged, held for abuse monitoring or used for training. No training on customer data. EU.

- Zero data retention: Yes. Nothing is logged, held for abuse monitoring or used for training.
- Training: No training on customer data.
- Logging: None
- Abuse monitoring: No classifier
- Caching: Prompt cache
- Transfer mechanism: Not applicable — data stays in EU

Verified by Opper on 2026-10-08.

### Mistral — Multi-region

Zero data retention: nothing is logged, held for abuse monitoring or used for training. No training on customer data. GLOBAL; SCCs.

- Zero data retention: Yes. Nothing is logged, held for abuse monitoring or used for training.
- Training: No training on customer data.
- Logging: None
- Abuse monitoring: No classifier
- Caching: Prompt cache
- Transfer mechanism: SCCs

Verified by Opper on 2026-10-08.

## Get started

Call Codestral through the Opper gateway with one API key. Opper is drop-in compatible with the OpenAI, Anthropic and Google AI SDKs.

Codestral is a premium model on Opper. Sign up needs no credit card: you get an API key straight away and the free models work in the playground and the API. Add a card to use premium models, pay-as-you-go with no minimum.

### Set it up with your agent

Paste this into a coding agent like Claude Code, Cursor or Codex and it will wire up Opper for you:

```text
Use curl to download, read and follow: https://skills.opper.ai Call Codestral
```

### Or call it directly

OpenAI:

```javascript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.OPPER_API_KEY,
  baseURL: "https://api.opper.ai/v3/compat",
});

const completion = await client.chat.completions.create({
  model: "codestral-2508",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(completion.choices[0].message.content);
```

Anthropic:

```javascript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env.OPPER_API_KEY,
  baseURL: "https://api.opper.ai/v3/compat",
});

const message = await client.messages.create({
  model: "codestral-2508",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Hello" }],
});
console.log(message.content);
```

Gemini:

```javascript
import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({
  apiKey: process.env.OPPER_API_KEY,
  httpOptions: { baseUrl: "https://api.opper.ai/v3/compat" },
});

const response = await ai.models.generateContent({
  model: "codestral-2508",
  contents: "Hello",
});
console.log(response.text);
```

cURL:

```bash
curl https://api.opper.ai/v3/compat/chat/completions \
  -H "Authorization: Bearer $OPPER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "codestral-2508",
    "messages": [{ "role": "user", "content": "Hello" }]
  }'
```

## Use Codestral in your apps

Pick your tool to see how to run it on Codestral through Opper.

- [Claude Code](https://opper.ai/apps/claude-code/codestral-2508)
- [Claude Cowork](https://opper.ai/apps/claude-cowork/codestral-2508)
- [Codex](https://opper.ai/apps/codex/codestral-2508)
- [DeepSeek Harness](https://opper.ai/apps/deepseek-harness/codestral-2508)
- [GitHub Copilot CLI](https://opper.ai/apps/github-copilot-cli/codestral-2508)
- [Aider](https://opper.ai/apps/aider/codestral-2508)
- [Goose](https://opper.ai/apps/goose/codestral-2508)
- [Droid](https://opper.ai/apps/droid/codestral-2508)
- [OpenCode](https://opper.ai/apps/opencode/codestral-2508)
- [Pi](https://opper.ai/apps/pi/codestral-2508)
- [OpenClaw](https://opper.ai/apps/openclaw/codestral-2508)
- [Hermes](https://opper.ai/apps/hermes/codestral-2508)
- [Copilot for Obsidian](https://opper.ai/apps/obsidian-copilot/codestral-2508)
- [OmniRoute](https://opper.ai/apps/omniroute/codestral-2508)
- [Cursor](https://opper.ai/apps/cursor/codestral-2508)
- [Cline](https://opper.ai/apps/cline/codestral-2508)
- [Continue](https://opper.ai/apps/continue/codestral-2508)
- [Kilo Code](https://opper.ai/apps/kilo-code/codestral-2508)
- [GitHub Copilot](https://opper.ai/apps/github-copilot/codestral-2508)
- [Zed](https://opper.ai/apps/zed/codestral-2508)
- [JetBrains AI Assistant](https://opper.ai/apps/jetbrains-ai-assistant/codestral-2508)
- [Voidleap Code](https://opper.ai/apps/voidleap-code/codestral-2508)
- [n8n](https://opper.ai/apps/n8n/codestral-2508)
- [LibreChat](https://opper.ai/apps/librechat/codestral-2508)
- [Open WebUI](https://opper.ai/apps/open-webui/codestral-2508)
- [See all apps](https://opper.ai/apps)

## Other models from Mistral

- [Mistral Large 4](https://opper.ai/mistral/mistral-large-4)
- [Mistral Medium 3.5](https://opper.ai/mistral/mistral-medium-3-5)
- [Mistral Small 4](https://opper.ai/mistral/mistral-small-2603)
- [Mistral Large 3](https://opper.ai/mistral/mistral-large-3)
- [Voxtral TTS 3](https://opper.ai/mistral/voxtral-mini-tts-3-0)
- [Timestral 5M](https://opper.ai/mistral/timestral-5m)
