Mistral: Codestral 2508 (batch) API
Mistral: Codestral 2508 (batch) is a text-generation model from mistralai. In ServerNet, its chat route accepts conversation messages and returns a generated answer; the price separates input and output tokens.
PreparingToman per million tokens
Sale prices will appear after provider configuration is complete.
- API model ID
- or-mistralaicodestral-2508batch-fe6322fa4e
- Model developer
- mistralai
- Service type
- Text chat
- Current availability
- Preparing
- Configured context limit
- 256,000 tokens
- Gateway output cap
- 4,096 tokens
Model features
Tool calling ✓
What is Mistral: Codestral 2508 (batch)?
Use the public identifier or-mistralaicodestral-2508batch-fe6322fa4e for Mistral: Codestral 2508 (batch) in ServerNet. The gateway uses this identifier to select the configured route; the developer is mistralai.
For Mistral: Codestral 2508 (batch), measure whether the generated code passes your project tests. A plausible explanation alone does not verify program behaviour.
Where to use Mistral: Codestral 2508 (batch)
- Add Mistral: Codestral 2508 (batch) to a support assistant that receives the relevant conversation as text.
- Test Mistral: Codestral 2508 (batch) on summaries and extraction using your own documents, with a small output limit first.
- Compare answer quality, total token usage and cost per completed task before choosing Mistral: Codestral 2508 (batch) for production.
Model description
Original catalogue description in English. It describes the model; the gateway limits and availability on this page define what you can request here.
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](
How to evaluate this model
This gateway lists a context limit of 256,000 tokens and an output cap of 4,096 tokens for Mistral: Codestral 2508 (batch). Keep instructions, history and the requested response within the applicable limits.
Before you integrate
- Use a representative test set and check factual accuracy, format and failure cases.
- Keep the first request bounded. Follow the operation-specific example and its API scope.
- Record response time and usage in your own environment before setting a production budget.
Conversation & code
Compare output limits, tool calling and streaming on representative prompts.
Compare models ↗Build your integration
Send system and user messages, set max_tokens and store X-Request-Id with your usage record. Stream only when this route supports it. Function calls describe actions for your application to run; the gateway does not execute your tools.
Inputs and service limits
The current chat route accepts text only and one completion per request. Images, audio and hosted paid tools are not enabled by the source model’s capabilities. The configured context and output limits may be below the developer’s maximum. Test language quality on your own dataset.
Connect to Mistral: Codestral 2508 (batch) API
Enable ai:chat on your key and ai:models:read to check availability. Set SERVERNET_API_KEY in your server environment. Change the idempotency key for each new request; keep it unchanged only for an identical retry.
This example documents the request format. Send it only after this model appears in GET /v1/models.
curl https://servernet.cloud/v1/chat/completions \
-H "Authorization: Bearer $SERVERNET_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: CHANGE_FOR_EACH_NEW_REQUEST' \
-d '{
"model": "or-mistralaicodestral-2508batch-fe6322fa4e",
"messages": [
{
"role": "user",
"content": "Hello"
}
],
"max_tokens": 128
}'import json, os, urllib.request
from uuid import uuid4
body = json.loads("{\n \"model\": \"or-mistralaicodestral-2508batch-fe6322fa4e\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Hello\"\n }\n ],\n \"max_tokens\": 128\n}")
request = urllib.request.Request(
"https://servernet.cloud/v1/chat/completions",
data=json.dumps(body).encode(),
headers={
"Authorization": "Bearer " + os.environ["SERVERNET_API_KEY"],
"Content-Type": "application/json",
"Idempotency-Key": str(uuid4()),
},
method="POST",
)
with urllib.request.urlopen(request) as response:
print(json.load(response))import { randomUUID } from 'node:crypto';
const response = await fetch('https://servernet.cloud/v1/chat/completions', {
method: 'POST',
headers: {
Authorization: 'Bearer ' + process.env.SERVERNET_API_KEY,
'Content-Type': 'application/json',
'Idempotency-Key': randomUUID(),
},
body: JSON.stringify({
"model": "or-mistralaicodestral-2508batch-fe6322fa4e",
"messages": [
{
"role": "user",
"content": "Hello"
}
],
"max_tokens": 128
}),
});
if (!response.ok) throw new Error('HTTP ' + response.status);
console.log(await response.json());Use the same Idempotency-Key when retrying an identical request. Successful responses are replayed without a second charge for 24 hours. Do not automatically retry when x-should-retry:false is present. The key is shown once. Store it in a server environment variable. Keep it out of browser code, GitHub and logs.
Keys, budgets and usage reportsFrequently asked questions
Is Mistral: Codestral 2508 (batch) available through ServerNet?
Mistral: Codestral 2508 (batch) is currently unavailable for API use. A catalogue listing does not activate billing or access. Choose an available related model or check this page again after the route is verified.
Which model ID and API endpoint should I use for Mistral: Codestral 2508 (batch)?
Use or-mistralaicodestral-2508batch-fe6322fa4e as the model field, the endpoint shown below and the matching key scope. ServerNet keys are project-specific; an SDK also needs https://servernet.cloud/v1 as its base URL.
How is Mistral: Codestral 2508 (batch) usage charged?
Input and output tokens use separate tariffs. Reported reasoning tokens, where supported, count towards output consumption. Cached input receives a discount only when a verified cached tariff exists. The dashboard records consumption for each request.
What should I check before using Mistral: Codestral 2508 (batch) in production?
The current chat route accepts text only and one completion per request. Images, audio and hosted paid tools are not enabled by the source model’s capabilities. The configured context and output limits may be below the developer’s maximum. Test language quality on your own dataset.
Compare models for the same task
Mistral: Codestral 2508
Available Text chatConfigured context limit: 256,000 tokens
Mistral: Mistral Small 3.2 24B
Available Text chatConfigured context limit: 256,000 tokens
Mistral: Devstral 2 2512
Available Text chatConfigured context limit: 262,144 tokens
Mistral: Ministral 3 14B 2512
Available Text chatConfigured context limit: 262,144 tokens
Mistral: Ministral 3 8B 2512
Available Text chatConfigured context limit: 262,144 tokens
Mistral: Mistral Large 3 2512
Available Text chatConfigured context limit: 262,144 tokens