🚀 One API for every frontier model on FastInfra

Browse models

Transparent per-token pricing → compare providers on FastInfra

View pricing

OpenAI-compatible chat completions → start in minutes

Read the docs

⚡ Server Auction → Enterprise bare metal from $78.15/mo (173 in stock)

Browse deals

Codestral 2508 API pricing

Codestral 2508 is a language model from Mistral with a 256K-token context window. On FastInfra it costs $0.32 per million input tokens and $0.97 per million output tokens, billed per token from prepaid credit with no subscription. It supports tool calling and structured JSON output. It was released in August 2025. Call it as "codestral-2508" from any OpenAI SDK by changing the base URL and API key.

Input $0.32 / 1M Output $0.97 / 1M 256K context

Prices synced December 1, 2026 · Model ID codestral-2508

At a glance

Codestral 2508 specs and pricing

Input price
$0.32
per 1M tokens
Output price
$0.97
per 1M tokens
Context window
256K
256,000 tokens
Max output
200K
204,800 tokens per response
Released
Aug 2025
by Mistral
Input
text, file
output: text
Pricing

Codestral 2508 API pricing per token

You pay for prompt tokens at the input rate and generated tokens at the output rate. No subscription, seat fee or minimum — credit never expires.

Rate Input / 1M tokens Output / 1M tokens Input / 1K tokens
Standard (real-time) $0.32 $0.97 $0.000324
Batch (async) · mistralai/codestral-2508:batch $0.16 $0.49 $0.000162

What Codestral 2508 costs in practice

Worked examples at the standard rate above. Real token counts depend on your prompts.

WorkloadTokensCost
1,000 chatbot replies 1,500 input + 400 output tokens each $0.87
Summarise a 100-page report ≈60,000 input + 1,500 output tokens $0.02
RAG answers over your docs, 10,000 queries 4,000 input + 300 output tokens each $15.88
Coding-agent session ≈250,000 input + 25,000 output tokens $0.11
1M input + 1M output tokens the per-million list rates combined $1.30
Calculator

Codestral 2508 cost calculator

Enter your traffic to estimate daily and monthly spend at the live FastInfra rate.

Per request—
Per day—
Per month (30 days)—
Compute ladder

Run Codestral 2508 on your own GPU

Same model, same OpenAI-compatible API, on a pod only you use. The configurator opens pre-filled with the vLLM image and command; the pod is billed per minute while it exists.

Starting tier
2× A40
96 GB VRAM · bf16 weights
Pod price
from $1.59/hr
≈ $1,164/month if left running
Weights
see model card
parameter count is not in the model id; large MoE checkpoints need several H200s, pick the tier in the configurator
vllm/vllm-openai:latest
--model mistralai/codestral-2508 --host 0.0.0.0 --port 8000 --served-model-name mistralai/codestral-2508 --max-model-len 32768 --gpu-memory-utilization 0.90 --tensor-parallel-size 2

The pod serves mistralai/codestral-2508 on port 8000 behind a VLLM_API_KEY generated for you in the pod's environment. Weights download from Hugging Face on first start, so the first boot takes a few minutes; gated repos need an HF_TOKEN in the environment variables. GPU sizing uses 80% of VRAM for weights and the rest for KV cache; long contexts or big batches need a larger tier.

Integration

How to call the Codestral 2508 API

Works with the official OpenAI SDKs — change the base URL and API key only. One key covers every model on FastInfra.

Field Value
Model ID codestral-2508
Capability Chat (vision)
Base URL https://api.fastinfra.ai/v1
Primary endpoint POST https://api.fastinfra.ai/v1/chat/completions
Auth Authorization: Bearer YOUR_API_KEY
OpenAI Chat SDK Yes — set base_url to the Base URL
Validate model id GET https://api.fastinfra.ai/v1/models/codestral-2508
Docs Integration reference

Use multimodal message content (image_url). Same base URL as text chat.

Python

from openai import OpenAI

client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.fastinfra.ai/v1")

stream = client.chat.completions.create(
    model="codestral-2508",
    messages=[{"role": "user", "content": "Explain vector databases in two sentences."}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

Node.js

import OpenAI from "openai";

const client = new OpenAI({ apiKey: process.env.FASTINFRA_API_KEY, baseURL: "https://api.fastinfra.ai/v1" });

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

curl

curl https://api.fastinfra.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "codestral-2508",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Served over 2 independent routes. Requests go to the lowest-cost healthy route and fail over automatically if one is unavailable. Live latency and uptime are on the status page.

Alternatives

Codestral 2508 vs alternatives

Live FastInfra prices per 1M tokens. Every model uses the same API key, so switching is a one-line change.

ModelInputOutputContext
Codestral 2508 (this page) $0.32 $0.97 256K
Claude Opus 5 $5.00 $25.00 1M Compare
Claude Sonnet 5 $2.00 $10.00 1M Compare
Claude Haiku 5.5 $0.10 $0.50 1M Compare
Claude Fable 5.1 $10.00 $50.00 1M Compare
GPT-5.5 $5.00 $30.00 1.05M Compare
Mistral Nemo $0.03 $0.03 128K Compare
Mistral Small 24B Instruct 2501 $0.05 $0.09 32K Compare
FAQ

Codestral 2508 API — frequently asked questions

How much does the Codestral 2508 API cost?

On FastInfra, Codestral 2508 (codestral-2508) costs $0.324/1M input, $0.972/1M output tokens. Billing is per token used from prepaid credit, with no subscription or minimum spend.

What is the Codestral 2508 context window?

Codestral 2508 accepts up to 256,000 tokens of context (about 256K) and can generate up to 204,800 output tokens per response. Prompt and response tokens share that window.

Is there a cheaper batch price for Codestral 2508?

Yes. The batch variant mistralai/codestral-2508:batch costs $0.162/1M input and $0.486/1M output tokens for asynchronous jobs that do not need an immediate answer.

Is Codestral 2508 compatible with the OpenAI SDK?

Yes. Point the OpenAI Python or Node SDK at https://api.fastinfra.ai/v1, use a FastInfra API key and set model to "codestral-2508". Chat completions, streaming, tool calling and JSON structured output use the same request shape.

Does Codestral 2508 support tool calling and vision?

Codestral 2508 supports tool (function) calling and JSON structured output. It accepts text input only.

What is a cheaper alternative to Codestral 2508?

Claude Haiku 5.5 costs $0.1/1M input and $0.5/1M output tokens on FastInfra. Both use the same API key, so switching is a one-line change to the model string.

What happens if a Codestral 2508 route goes down?

Codestral 2508 is served over 2 independent routes. FastInfra sends each request to the lowest-cost healthy route and fails over automatically, so your code does not change.

Start using Codestral 2508 today

Create an account, add credit from $5 and make your first Codestral 2508 request in under five minutes. Compare every model on the pricing page.