Back to Models

Codestral

mistralmistral/codestral

Mistral's specialized coding model. Optimized for code generation, completion, and analysis.

Context Length
256K
Max Output
16K
Input Price
$0.360/ 1M tokens
Output Price
$1.08/ 1M tokens

Modalities

texttext

Pricing Breakdown

TypeRate
Input$0.360 / 1M tokens
Output$1.08 / 1M tokens

Supported Parameters

temperaturemax_tokenstop_ptoolstool_choiceresponse_formatstop

API Usage Examples

cURL
curl https://api.therouter.ai/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer $THE_ROUTER_API_KEY"   -d '{
    "model": "mistral/codestral",
    "messages": [
      {"role": "user", "content": "Summarize the key points from this input."}
    ]
  }'