Mistral Small 4 API

Hybrid model unifying Instruct, Reasoning (Magistral), and Devstral families: 40% lower completion time and 3x throughput vs Small 3.

Mistral AIText Generation256K contextReleased Mar 16, 2026Proprietary Endpoint

About Mistral Small 4

Hybrid model unifying Instruct, Reasoning (Magistral), and Devstral families: 40% lower completion time and 3x throughput vs Small 3.

Also known as Mistral AI Mistral Small 4, Mistral-Small-4

visionweb searchfunction calling

Mistral Small 4 specs

Model ID
mistral-small-4
Provider
Mistral AI
Category
Text Generation
Released
Mar 16, 2026
Context window
256K tokens
Max output
65,536 tokens
Input
TextImage
Output
Text
Structured output
JSON Mode
Batch API
Available, 35% off list price
Endpoints
POST/v1/chat/completionsPOST/v1/responsesPOST/v1/messagesPOST/v1beta/models/mistral-small-4:generateContent
Alternate model IDs
mistralai/mistral-small-4

Mistral Small 4 API pricing

Live pay-as-you-go rates from the EmpirioLabs catalog. You are billed only for what you use, with no monthly minimum.

Type
Spec
Rate
Input
per 1M prompt tokens
$0.15
Output
per 1M generated tokens
$0.60
Standard Web Search
per call
$0.084
Premium Web Search
per call
$0.140
Code Interpreter
per call
$0.084
Image Generation
per image
$0.280
Compare on the full pricing page

How to call the Mistral Small 4 API

Mistral Small 4 serves the OpenAI-compatible Chat Completions API. Point any OpenAI SDK at https://api.empiriolabs.ai/v1 with your EmpirioLabs API key and use the model id mistral-small-4. Get an API key from the EmpirioLabs dashboard.

cURL
curl https://api.empiriolabs.ai/v1/chat/completions \
  -H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistral-small-4",
    "messages": [
      {"role": "user", "content": "Write a haiku about the ocean."}
    ]
  }'
Python (OpenAI SDK)
from openai import OpenAI

client = OpenAI(
    base_url="https://api.empiriolabs.ai/v1",
    api_key="YOUR_EMPIRIOLABS_API_KEY",
)

response = client.chat.completions.create(
    model="mistral-small-4",
    messages=[{"role": "user", "content": "Write a haiku about the ocean."}],
)
print(response.choices[0].message.content)
Full Mistral Small 4 API reference

Mistral Small 4 API parameters

Request parameters supported by the Mistral Small 4 API on EmpirioLabs. Defaults apply when a field is omitted.

ParameterTypeDefaultRange / valuesDescription
reasoning_enabledbooleantrue-Enable extended reasoning (maps to reasoning: high|none)
tool_web_searchbooleantrue-Enable web_search tool
web_search_tierenumstandardstandard, premiumStandard or Premium web-search tier. Premium uses higher-quality sources.
tool_code_interpreterbooleantrue-Allow the model to execute Python code in a sandbox to compute / analyze data.
tool_image_generationbooleantrue-Allow the model to generate images inline via the platform image-gen tool.
temperaturenumber0.70 to 1.5Sampling temperature. 0 = deterministic, 2 = maximum randomness.
max_tokensnumber40961 to 32768Maximum tokens in the response.
response_formatenum--Return the output as a valid JSON object (JSON mode). Describe the fields you want in your prompt.
disable_formattingbooleanfalse-Skip the EmpirioLabs Markdown formatting (citation [[N]](url) rewriting + References block when the web_search tool was used). The raw upstream answer with plain [N]...

Good to know

Tools (web search, code interpreter, image generation) are billed only when actually invoked. Requests that include your own function tools use standard function calling, and the built-in tools are unavailable on those requests: a request cannot combine both at once.

Per-tool billing (usage.tool_usage)

When this model invokes built-in tools (web search, code interpreter, etc.) inside a single request, the response carries a normalized usage.tool_usage map alongside the token counts. The example below shows the shape — exact field names, units, and which tools appear can vary slightly per provider:

"usage": {
  "prompt_tokens": 123,
  "completion_tokens": 456,
  "cost_usd": 0.0042,
  "tool_usage": {"web_search": 3, "code_interpreter": 1}
}

The tool counts are already factored into cost_usd — they are surfaced for transparency so you can audit per-tool billing. The field is omitted when no tools were invoked.

Mistral Small 4 API: common questions

How much does the Mistral Small 4 API cost?

On EmpirioLabs, Mistral Small 4 is billed pay as you go: Input $0.15 per 1M prompt tokens; Output $0.60 per 1M generated tokens; Standard Web Search $0.084 per call. The live rate card on this page always matches what the API charges.

What is the context window of Mistral Small 4?

Mistral Small 4 supports a 256K-token context window with up to 65,536 output tokens per response.

Is the Mistral Small 4 API OpenAI-compatible?

Yes. Mistral Small 4 serves the OpenAI-compatible Chat Completions API, so existing OpenAI SDKs work by pointing base_url at https://api.empiriolabs.ai/v1 and setting the model id to mistral-small-4.

Can I try Mistral Small 4 in the browser before integrating?

Yes. The EmpirioLabs playground runs Mistral Small 4 in the browser with the same parameters the API exposes, so you can test prompts before writing code.

How do I get a Mistral Small 4 API key?

Create an EmpirioLabs account, then generate a key under API Keys in the dashboard. Billing is pay-as-you-go credits, so you only pay for the requests you make.

Ready to use better endpoints?

Check out our pricing or reach out if you want your own model deployed on our stack.