Back to Models

Mistral Small 4

mistralmistral/mistral-small-4

API guide

Chat completion

Basic chat completion to test the endpoint or run conversation tasks.

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistral/mistral-small-4",
    "messages": [
      {"role": "user", "content": "Explain the difference between MoE and dense transformer models"}
    ]
  }'

Streaming

Stream tokens incrementally for real-time UX. Mistral Small 4 supports server-sent events via the standard OpenAI streaming interface.

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistral/mistral-small-4",
    "messages": [{"role": "user", "content": "Write a haiku about AI"}],
    "stream": true
  }'

Tool calling

Mistral Small 4 supports native tool/function calling through the OpenAI-compatible tools API. The 'mistral' tool call parser is recommended for self-hosted vLLM deployments.

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistral/mistral-small-4",
    "messages": [{"role": "user", "content": "What is the weather in Paris?"}],
    "tools": [{
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "Get current weather for a city",
        "parameters": {
          "type": "object",
          "properties": {
            "location": {"type": "string", "description": "City name"}
          },
          "required": ["location"]
        }
      }
    }],
    "tool_choice": "auto"
  }'

Vision (multimodal)

Send images alongside text for document analysis, UI review, and visual question answering. Uses the standard OpenAI vision format with base64 or URL image inputs.

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistral/mistral-small-4",
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "What does this chart show?"},
        {"type": "image_url", "image_url": {"url": "https://therouter.ai/assets/vision-sample.png"}}
      ]
    }]
  }'

Reasoning (reasoning_effort)

Mistral Small 4's standout feature β€” the reasoning_effort parameter controls reasoning depth per request. Set 'none' for fast chat, 'high' for deep step-by-step reasoning equivalent to Magistral-level capability.

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistral/mistral-small-4",
    "messages": [{"role": "user", "content": "How many r's are in the word 'strawberry'? Think step by step."}],
    "reasoning_effort": "high"
  }'

JSON mode

Use response_format to guarantee structured JSON output. Mistral Small 4 supports the standard OpenAI JSON-mode API.

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistral/mistral-small-4",
    "messages": [{"role": "user", "content": "Extract name, age, and city from: John is 30 years old from London"}],
    "response_format": {"type": "json_object"}
  }'
Fact ledger β€” every claim on this page traces here
sourceURLretrieved
Release datemistral.ai β†—2026-05-27verified
Architecturedocs.mistral.ai β†—2026-05-27verified
Upstream context lengthhuggingface.co β†—2026-05-27verified
Training cutoffβ€”β€”unknown
Licensehuggingface.co β†—2026-05-27verified
Supported inference backendshuggingface.co β†—2026-05-27verified
Minimum self-host hardwaremistral.ai β†—2026-05-27to verify
AA LCRmistral.ai β†—2026-05-27to verify
LiveCodeBenchmistral.ai β†—2026-05-27to verify
AIME 2025mistral.ai β†—2026-05-27to verify
Introducing Mistral Small 4mistral.ai/news β†—2026-05-27verified
What makes Mistral Small 4 different from Mistral Small 3?mistral.ai β†—2026-05-27to verify
Can I use Mistral Small 4 via the standard OpenAI Python/TypeScript SDK?docs.therouter.ai β†—2026-05-27to verify
Is Mistral Small 4 open-source? Can I run it on my own hardware?huggingface.co β†—2026-05-27to verify
How does the reasoning_effort parameter work?docs.mistral.ai β†—2026-05-27to verify
What are the benchmark scores for Mistral Small 4?mistral.ai β†—2026-05-27to verify
Help & contact