Mistral Small 3.1 24B
By Mistral. 24.0 billion parameters, a context window of 128,000 tokens and the licence apache-2.0.
Facts
- Released
- 2025-03-11 the day the repository was first published on Hugging Face Hugging Face, read
- Licence
- apache-2.0 the licence the model card declares Hugging Face, read
- Open weights
- Yes the weights are published in this Hugging Face repository Hugging Face, read
- Parameters
- 24.0 billion counted from the safetensors weight files Hugging Face, read
- Active parameters
- Unknown
- Knowledge cutoff
- 2023-10-31 the knowledge cutoff OpenRouter lists OpenRouter, read
- Context window
- 128,000 tokens the context length OpenRouter lists OpenRouter, read
- Longest output
- 102,400 tokens the largest output OpenRouter's first provider allows OpenRouter, read
- Tool calling
- Yes OpenRouter lists tools among the supported parameters OpenRouter, read
- Structured output
- No OpenRouter lists no structured output parameter OpenRouter, read
- Reasoning controls
- Unknown
- Inputs and outputs
- text, image in, text out OpenRouter, read
- Good for
- Vision: OpenRouter lists images among its inputs OpenRouter, read
Prices
| Provider | Input | Output | Context | As of | Source |
|---|---|---|---|---|---|
| Cloudflare through OpenRouter | 0.351 USD | 0.555 USD | 128,000 | OpenRouter endpoints, read |
Run it on your own hardware
Weights are the sizes of the files a source lists, or an estimate from the parameter count where none does. Memory is an estimate: weights plus KV cache plus 512 MiB and 5 percent of the weights for runtime buffers. Check it against your hardware.
| Quantization | Weights | Memory at 8,192 tokens | Memory at 32,768 tokens |
|---|---|---|---|
| F16 estimate | 44.7 GiB | Unknown: no KV cache numbers | Unknown: no KV cache numbers |
| Q8_0 estimate | 23.8 GiB | Unknown: no KV cache numbers | Unknown: no KV cache numbers |
| Q4_0 estimate | 12.6 GiB | Unknown: no KV cache numbers | Unknown: no KV cache numbers |
Start it with a local runtime
Use it from your harness
Set up for OpenRouter with the model mistralai/mistral-small-3.1-24b-instruct. Each endpoint page has the same setup for its own address.
OpenCode
Put this in opencode.json in your project folder:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"openrouter": {
"npm": "@ai-sdk/openai-compatible",
"name": "OpenRouter",
"options": {
"baseURL": "https://openrouter.ai/api/v1",
"apiKey": "{env:OPENROUTER_API_KEY}"
},
"models": {
"mistralai/mistral-small-3.1-24b-instruct": {
"name": "Mistral Small 3.1 24B",
"limit": {
"context": 128000,
"output": 102400
}
}
}
}
}
}- OpenCode reads any OpenAI-compatible address through the @ai-sdk/openai-compatible package, and an address that speaks the Responses API through @ai-sdk/openai.
From OpenCode documentation, read .
Pi
Put this in ~/.pi/agent/models.json:
{
"providers": {
"openrouter": {
"baseUrl": "https://openrouter.ai/api/v1",
"api": "openai-completions",
"apiKey": "$OPENROUTER_API_KEY",
"models": [
{
"id": "mistralai/mistral-small-3.1-24b-instruct"
}
]
}
}
}- The apiKey field can name an environment variable as $NAME.
From Pi documentation, read .
Codex
Put this in ~/.codex/config.toml:
model = "mistralai/mistral-small-3.1-24b-instruct"
model_provider = "openrouter"
[model_providers.openrouter]
name = "OpenRouter"
base_url = "https://openrouter.ai/api/v1"
env_key = "OPENROUTER_API_KEY"- Codex speaks the Responses API only: responses is the one supported wire API of a custom provider. Ollama and LM Studio are built in and start with --oss.
From Codex documentation, read .
Claude Code
Put this in ~/.claude/settings.json, or variables in your shell:
export ANTHROPIC_BASE_URL="https://openrouter.ai/api"
export ANTHROPIC_AUTH_TOKEN="$OPENROUTER_API_KEY"
export ANTHROPIC_MODEL="mistralai/mistral-small-3.1-24b-instruct"
claude- Claude Code sends Anthropic Messages requests to ANTHROPIC_BASE_URL. Anthropic says it does not support routing Claude Code to models other than Claude through any gateway, so some features may not work with another model.
From Claude Code documentation, read .
Published results
These are results other people published. Baltor did not run them and does not rank models by them.
- Results the maker published on the model card published by mistralai Hugging Face, read
Sources of this page
Paid links
No link in this directory is a paid link or an ad, and no listing is paid for. The order and the contents of every list come from the sources named on this page.