Codestral 2508
Mistral's cutting-edge language model for coding released end of July 2025.
- Context Window
- 256K
- In
- $0.334per million tokens
- Out
- $1.00per million tokens
Mistral
mistralai/ codestral-2508Specifications
In$0.334
Out$1.00
- Context Window
- 256K
- Modalities
- text
- Price
- $0.334 in · $1.00 out, per million tokens
- Model ID
- mistralai/codestral-2508
Quick start
mistralai/codestral-2508
$0.334 in · $1.00 out, per million tokens
import OpenAI from 'openai'
const client = new OpenAI({
apiKey: process.env.HANZO_API_KEY,
baseURL: 'https://api.hanzo.ai/v1'
})
const response = await client.chat.completions.create({
model: 'mistralai/codestral-2508',
messages: [{ role: 'user', content: 'Hello!' }]
})
console.log(response.choices[0].message.content)
from openai import OpenAI
client = OpenAI(
api_key=os.environ["HANZO_API_KEY"],
base_url="https://api.hanzo.ai/v1"
)
response = client.chat.completions.create(
model="mistralai/codestral-2508",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
curl https://api.hanzo.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HANZO_API_KEY" \
-d '{
"model": "mistralai/codestral-2508",
"messages": [{"role": "user", "content": "Hello!"}]
}'
package main
import (
"context"
"fmt"
"os"
"github.com/sashabaranov/go-openai"
)
func main() {
cfg := openai.DefaultConfig(os.Getenv("HANZO_API_KEY"))
cfg.BaseURL = "https://api.hanzo.ai/v1"
client := openai.NewClientWithConfig(cfg)
resp, _ := client.CreateChatCompletion(context.Background(),
openai.ChatCompletionRequest{
Model: "mistralai/codestral-2508",
Messages: []openai.ChatCompletionMessage{
{Role: openai.ChatMessageRoleUser, Content: "Hello!"},
},
},
)
fmt.Println(resp.Choices[0].Message.Content)
}
More from Mistral
View all Mistral models →$5.34Bill a month
Codestral 2508 costs 1.8× more for this mix.
Codestral 2508$5.34256K
Mistral Small 4$3.01262K
- Devstral 2 2512 Devstral 2 is a state-of-the-art open-source model by Mistral AI specializing in agentic coding. It is a 123B-parameter dense transformer model supporting a 256K context window. Devstral 2 supports exploring...
- Ministral 3 14B 2512 The largest model in the Ministral 3 family, Ministral 3 14B offers frontier capabilities and performance comparable to its larger Mistral Small 3.2 24B counterpart. A powerful and efficient language...
- Ministral 3 3B 2512 The smallest model in the Ministral 3 family, Ministral 3 3B is a powerful, efficient tiny language model with vision capabilities.
- Ministral 3 8B 2512 A balanced model in the Ministral 3 family, Ministral 3 8B is a powerful, efficient tiny language model with vision capabilities.
- Mistral Large This is Mistral AI's flagship model, Mistral Large 2 (version `mistral-large-2407`). It's a proprietary weights-available model and excels at reasoning, code, JSON, chat, and more. Read the launch announcement [here](https://mistral.ai/news/mistral-large-2407/)....
- Mistral Large 2407 This is Mistral AI's flagship model, Mistral Large 2 (version mistral-large-2407). It's a proprietary weights-available model and excels at reasoning, code, JSON, chat, and more. Read the launch announcement [here](https://mistral.ai/news/mistral-large-2407/)....
Use Codestral 2508 via Hanzo AI
One API key. Every major model. OpenAI-compatible. Start free.
