Mistral
9 params
Mistral Codestral 2508 API parameters
These are the API parameters modelparams.dev tracks for Mistral Codestral 2508 — the settings you send in a request. Each row gives the type, default, valid range or values, and the conditions that gate it. It's the same data the JSON API serves.
After the parameter count instead — how many weights Codestral 2508 has? That's a different number, and we don't track it. Here's the difference.
Length
2 params
| Parameter | Type | Default | Description | Condition |
|---|---|---|---|---|
|
Max tokens
max_tokens
|
integer (1…+∞) | — | Maximum number of tokens to generate in the completion. | — |
|
Stop sequence
stop
|
string | — | Stops generation when this string is detected. | — |
Sampling
5 params
| Parameter | Type | Default | Description | Condition |
|---|---|---|---|---|
|
Temperature
temperature
|
number (0…1.5 step 0.1) | — | Controls randomness. Lower values make outputs more focused; higher values make them more varied. | — |
|
Top P
top_p
|
number (0…1 step 0.01) | 1 | Controls nucleus sampling by limiting generation to tokens within the selected cumulative probability. | — |
|
Random seed
random_seed
|
integer (0…+∞) | — | Seed used for deterministic sampling when reproducible outputs are desired. | — |
|
Presence penalty
presence_penalty
|
number (-2…2 step 0.1) | 0 | Penalizes repeated words or phrases to encourage a wider variety of generated content. | — |
|
Frequency penalty
frequency_penalty
|
number (-2…2 step 0.1) | 0 | Penalizes words based on how often they already appear in the generated text. | — |
Output
1 param
| Parameter | Type | Default | Description | Condition |
|---|---|---|---|---|
|
Response format
response_format.type
|
enum (text | json_object) | "text" | Controls whether the model returns normal text or JSON mode output. | — |
Metadata
1 param
| Parameter | Type | Default | Description | Condition |
|---|---|---|---|---|
|
Safe prompt
safe_prompt
|
boolean | false | Controls whether Mistral injects its safety prompt before the conversation. | — |
Mistral Codestral 2508 API parameters in brief
Mistral Codestral 2508 documents 9 API parameters, grouped by what they control:
-
Length:
max_tokensminimum 1;stop. -
Sampling:
temperaturerange 0–1.5;top_pdefaults to 1, range 0–1;random_seedminimum 0;presence_penaltydefaults to 0, range -2–2;frequency_penaltydefaults to 0, range -2–2. -
Output:
response_format.typedefaults to "text", accepts "text", "json_object". -
Metadata:
safe_promptdefaults to false.
Frequently asked questions
- Which API parameters does Mistral Codestral 2508 support?
- Mistral Codestral 2508 accepts 9 API parameters in the request body: max_tokens, stop, temperature, top_p, random_seed, presence_penalty, and more.
- What is the default top_p for Mistral Codestral 2508?
- The default top_p for Mistral Codestral 2508 is 1, within a valid range of 0 to 1.
Resources
Other Mistral models
Codestral Latest
9 params
View
Devstral 2512
9 params
View
Devstral Latest
9 params
View
Magistral Medium Latest
10 params
View
Magistral Small Latest
10 params
View
Ministral 14B Latest
9 params
View
Ministral 3B Latest
9 params
View
Ministral 8B Latest
9 params
View
Mistral Large Latest
9 params
View
Mistral Medium 3.5
9 params
View
Mistral Medium Latest
9 params
View
Mistral NeMo
9 params
View
Mistral Small Latest
9 params
View