Requesty

codestral-latest

Codestral-latest is Mistral AI’s state-of-the-art open-weight language model built specifically for software development and code generation. It is fine-tuned to assist developers with code generation, completion, refactoring, and debugging across more than 80 programming languages.

Tool callingJSON schema

Specifications

Context window131K tokens
Max output
API typechat
AddedAug 12, 2024
Model IDmistral/codestral-latest
Data retentionYes (30 days)
Used for trainingNo
Provider location🇪🇺 EU

Benchmarks

Released 2023-12-11
GPQA Diamondreasoning
34.9%

Graduate-level physics, chemistry & biology questions designed to resist Googling.

Intelligence Indexreasoning
9.0%

Artificial Analysis Intelligence Index — a composite of multiple evaluations measuring overall model capability.

Scores are sourced from official model cards, Artificial Analysis, and public leaderboards. Benchmarks measure specific skills and do not capture every aspect of model quality — always test on your own workload.

Pricing

Input / 1M
$0.30
Output / 1M
$0.90
Cache write
Cache read
Estimated cost
100K input + 10K output$0.0390
1M input + 100K output$0.39
10M input + 1M output$3.90

Requesty charges exactly what the upstream provider charges — no markup, no per-request fees. Prompt caching and smart routing can reduce effective cost by 30-80%.

Quickstart

Drop-in compatible with the OpenAI SDK. Change the base URL, swap in your Requesty API key, and set the model to mistral/codestral-latest.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from openai import OpenAI client = OpenAI( api_key="YOUR_REQUESTY_API_KEY", base_url="https://router.requesty.ai/v1", ) response = client.chat.completions.create( model="mistral/codestral-latest", messages=[ {"role": "user", "content": "Explain quantum computing in one paragraph."}, ], ) print(response.choices[0].message.content)

Other Mistral AI SAS models

Frequently asked questions

How much does codestral-latest cost?
codestral-latest is priced at $0.30 per million input tokens and $0.90 per million output tokens when accessed via Requesty. Requesty charges exactly what the upstream provider charges — we don't add markup.
What is the context window of codestral-latest?
codestral-latest has a context window of 131K tokens. That's roughly 175 words of input you can fit in a single prompt.
How does codestral-latest perform on benchmarks?
codestral-latest scores 49.1% on MMLU Pro, 34.9% on GPQA Diamond, 11.8% on SciCode. See the full benchmark chart above for results across MMLU Pro, GPQA Diamond, SWE-Bench Verified, HumanEval, MATH, AIME, MMMU, and LiveBench.
What can codestral-latest do?
codestral-latest supports tool calling, structured outputs (JSON schema). You can call it through any OpenAI-compatible client by pointing base_url to Requesty.
How do I use codestral-latest with the OpenAI SDK?
Install the OpenAI SDK, set base_url to "https://router.requesty.ai/v1", set your API key to your Requesty key, and set the model to "mistral/codestral-latest". The Quickstart above shows Python, JavaScript and cURL snippets.

Access codestral-latest through Requesty

One API key, 400+ models, OpenAI-compatible. No markup on provider prices, automatic failover, and smart caching built-in.