modelparams.dev

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:

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

All Mistral models Glossary Full catalog

Codestral 2508 — JSON

The full model definition as served by the API. Copy it or open the endpoint directly.

{
  "$schema": "https://modelparams.dev/api/v1/schema.json",
  "provider": "mistral",
  "authType": "api_key",
  "model": "codestral-2508",
  "params": [
    {
      "path": "max_tokens",
      "label": "Max tokens",
      "description": "Maximum number of tokens to generate in the completion.",
      "group": "generation_length",
      "type": "integer",
      "range": {
        "min": 1
      }
    },
    {
      "path": "stop",
      "label": "Stop sequence",
      "description": "Stops generation when this string is detected.",
      "group": "generation_length",
      "type": "string"
    },
    {
      "path": "temperature",
      "label": "Temperature",
      "description": "Controls randomness. Lower values make outputs more focused; higher values make them more varied.",
      "group": "sampling",
      "type": "number",
      "range": {
        "min": 0,
        "max": 1.5,
        "step": 0.1
      }
    },
    {
      "path": "top_p",
      "label": "Top P",
      "description": "Controls nucleus sampling by limiting generation to tokens within the selected cumulative probability.",
      "group": "sampling",
      "type": "number",
      "default": 1,
      "range": {
        "min": 0,
        "max": 1,
        "step": 0.01
      }
    },
    {
      "path": "random_seed",
      "label": "Random seed",
      "description": "Seed used for deterministic sampling when reproducible outputs are desired.",
      "group": "sampling",
      "type": "integer",
      "range": {
        "min": 0
      }
    },
    {
      "path": "presence_penalty",
      "label": "Presence penalty",
      "description": "Penalizes repeated words or phrases to encourage a wider variety of generated content.",
      "group": "sampling",
      "type": "number",
      "default": 0,
      "range": {
        "min": -2,
        "max": 2,
        "step": 0.1
      }
    },
    {
      "path": "frequency_penalty",
      "label": "Frequency penalty",
      "description": "Penalizes words based on how often they already appear in the generated text.",
      "group": "sampling",
      "type": "number",
      "default": 0,
      "range": {
        "min": -2,
        "max": 2,
        "step": 0.1
      }
    },
    {
      "path": "response_format.type",
      "label": "Response format",
      "description": "Controls whether the model returns normal text or JSON mode output.",
      "group": "output_format",
      "type": "enum",
      "default": "text",
      "values": [
        "text",
        "json_object"
      ]
    },
    {
      "path": "safe_prompt",
      "label": "Safe prompt",
      "description": "Controls whether Mistral injects its safety prompt before the conversation.",
      "group": "provider_metadata",
      "type": "boolean",
      "default": false
    }
  ]
}

Other Mistral models

How to use

Building with an AI agent? Hit Copy to grab this whole guide as Markdown and paste it in — or point your agent straight at /llms.txt.

modelparams.dev is an open, community-maintained catalog of model parameters. Each entry shows the knobs you can turn — type, default, range, and the conditions that gate it.

The same model accessed via an API key and via a subscription usually exposes a different set of parameters. We list both as separate entries so the data stays honest.

Catalog API

The full catalog is static JSON, CORS-enabled, served from the edge.

curl https://modelparams.dev/api/v1/models.json

Each entry is keyed by provider/model for API-key variants; subscription variants append -subscription.

If you only need the params for one model contract, use the providerless endpoint. Subscription contracts are model slugs with -subscription.

curl https://modelparams.dev/api/v1/params/gpt-5.5.json
curl https://modelparams.dev/api/v1/params/gpt-5.5-subscription.json

Single model

curl https://modelparams.dev/api/v1/models/anthropic/claude-opus-4-7.json
curl https://modelparams.dev/api/v1/models/anthropic/claude-opus-4-7-subscription.json

JSON Schema

Every entry validates against a JSON Schema you can use in your editor or pipeline.

curl https://modelparams.dev/api/v1/schema.json

Add this header to any YAML you author for autocomplete in VS Code:

# yaml-language-server: $schema=https://modelparams.dev/api/v1/schema.json

Logos

Provider logos are available at /assets/logos/{provider}.svg where {provider} is the provider slug. They use currentColor so they inherit your text color.

curl https://modelparams.dev/assets/logos/anthropic.svg

Logos are sourced from the models.dev repo (MIT) and used under nominative fair use.

Contribute

The data lives in YAML under models/{provider}/{model}-{auth}.yaml in the GitHub repo. Open a PR; CI validates against the schema and rebuilds.

Edit on GitHub MIT licensed