Small 3.1 24B overview
Small 3.1 24B specs
- Model ID
mistralai/mistral-small-3.1-24b-instruct- Developer
- Mistral AI
- Context window
- 128,000 tokens
- Max output
- 128,000 tokens
- Input
- Image, Text
- Output
- Text
- API
- OpenAI-compatible, base URL
https://api.aimlapi.com/v1
Coding and code review
Generate, debug, and review code across languages, reading whole files or repos in a single prompt.
Agentic and multi-step workflows
Reliable tool-calling and instruction-following suit agent loops that plan, call tools, and iterate.
Complex reasoning
Extended reasoning improves reliability on multi-step math, logic, and technical analysis.
Long-document analysis
Summarize and extract from contracts, papers, and reports without aggressive chunking.
Use cases
Fast-response conversational agents are a documented use case for this model, indicating it is suited to chat-style assistants that need quick replies.
Low-latency function calling is another documented use case, so it is suited to workflows where the model must trigger tools or structured actions efficiently.
Programming and math reasoning are listed as intended use cases, making the model suitable for coding help and quantitative problem-solving.
Long document understanding and visual understanding are also documented use cases, so it is suited to reading lengthy materials and interpreting images.
Capabilities
- Function calling
- Reasoning
- Streaming
- Structured outputs
- Web search
Small 3.1 24B API pricing
| Usage | Price | Unit |
|---|---|---|
| Input | $0.3714 | 1M tokens |
| Output | $0.5872 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
Small 3.1 24B vs other models: token prices
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $0.3714 | $0.5872 | |
| $0.15 | $0.6 | |
| $0.1984 | $0.7935 | |
| $1.36 | $4.18 | |
| $1.59 | $7.93 |
How to use the Small 3.1 24B API
View docsBuild with your agent
Give your agent the model details, code and documentation.
1Get your API key
Create API keyexport AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"2Make your first request
curl 'https://api.aimlapi.com/v1/chat/completions' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "mistralai/mistral-small-3.1-24b-instruct",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "mistralai/mistral-small-3.1-24b-instruct",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "mistralai/mistral-small-3.1-24b-instruct",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Related articles
Small 3.1 24B FAQ
What is the context window of Small 3.1 24B?
Small 3.1 24B has a 128,000 tokens context window and can return up to 128,000 tokens.
What inputs and outputs does Small 3.1 24B support?
Small 3.1 24B takes image, text as input and returns text.
What is the model ID for Small 3.1 24B?
Use mistralai/mistral-small-3.1-24b-instruct as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
How much does Small 3.1 24B cost?
Small 3.1 24B costs $0.3714 input and $0.5872 output per 1M tokens on AI/ML API, billed as you go with no subscription.
Does Small 3.1 24B support streaming?
Yes, Small 3.1 24B can stream responses as they are generated.
Can Small 3.1 24B read images?
Yes, Small 3.1 24B accepts image input alongside text.
Who created Small 3.1 24B?
Small 3.1 24B was built by Mistral AI.
Does Small 3.1 24B support function calling and tool use?
Yes, it supports function calling, parallel tool calls, and structured outputs.

