# Mistral Small 4

> An open-weights, low-priced model from Mistral with image input, tool calling and reasoning mode. It has no benchmark results in the registry, so it is described here by its specifications and price.

Use it with Pydantic AI as `mistral:mistral-small-2603`.

## Spec sheet

- **Family:** Mistral
- **Released:** 16 Mar 2026
- **Weights:** open
- **Context window:** 262,144 tokens
- **Largest response:** 256,000 tokens
- **Accepts:** text, image
- **Tool calling:** yes
- **Knowledge cutoff:** 2025-06
- **Intelligence index:** not enough benchmark results yet
- **Price:** $0.15 input, $0.6 output, $0.26 blended per 1M tokens
- **Index points per $:** – (rank –)
- **Speed:** 103 tokens/sec (rank 38)
- **Popularity:** rank 109 of 194 by usage
- **Pydantic AI Gateway:** not built in; [bring your own key](https://ai.pydantic.dev/gateway/#bring-your-own-key)

## Benchmarks

No results yet on the benchmarks we track.

## Providers and prices

US dollars per million tokens.

| Provider | Gateway | Pydantic AI string | Input | Cached input | Output |
| --- | --- | --- | --- | --- | --- |
| Mistral | BYOK | `mistral:mistral-small-2603` | $0.15 | $0.015 | $0.6 |
| OpenRouter | BYOK | `openrouter:mistralai/mistral-small-2603` | $0.15 | $0.015 | $0.6 |

## Example code

### hello.py

Ask Mistral Small 4 a question with a Pydantic AI agent and print the answer. Run it with uv run hello.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import os

from pydantic_ai import Agent

os.environ['MISTRAL_API_KEY'] = '...'

agent = Agent('mistral:mistral-small-2603', instructions='Be concise, reply with one sentence.')

result = agent.run_sync('Where does "hello world" come from?')
print(result.output)
```

### structured_output.py

Get validated, typed output from Mistral Small 4 by giving the agent a Pydantic model. Run it with uv run structured_output.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import os

from pydantic import BaseModel
from pydantic_ai import Agent

os.environ['MISTRAL_API_KEY'] = '...'


class CityLocation(BaseModel):
    city: str
    country: str


agent = Agent('mistral:mistral-small-2603', output_type=CityLocation)

result = agent.run_sync('Where were the olympics held in 2012?')
print(result.output)
#> city='London' country='United Kingdom'
```

### tools.py

Give Mistral Small 4 two tools to call, one of which reads the agent's dependencies. Run it with uv run tools.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import os
import random

from pydantic_ai import Agent, RunContext

os.environ['MISTRAL_API_KEY'] = '...'

agent = Agent(
    'mistral:mistral-small-2603',
    deps_type=str,
    instructions="You're a dice game, roll the die and see if it matches the user's guess.",
)


@agent.tool_plain
def roll_dice() -> str:
    """Roll a six-sided die and return the result."""
    return str(random.randint(1, 6))


@agent.tool
def get_player_name(ctx: RunContext[str]) -> str:
    """Get the player's name."""
    return ctx.deps


result = agent.run_sync('My guess is 4', deps='Anne')
print(result.output)
```

### streaming.py

Stream Mistral Small 4's reply to the terminal as it is generated. Run it with uv run streaming.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import asyncio
import os

from pydantic_ai import Agent

os.environ['MISTRAL_API_KEY'] = '...'

agent = Agent('mistral:mistral-small-2603')


async def main():
    async with agent.run_stream('Explain prompt caching in three bullet points.') as response:
        async for text in response.stream_text(delta=True):
            print(text, end='', flush=True)


asyncio.run(main())
```

### pax.sh

Chat with Mistral Small 4 in your terminal using pax, the TUI for pydantic-ai-harness. Coming soon.

```sh
export MISTRAL_API_KEY='...'

uvx pax --model 'mistral:mistral-small-2603'
```

### pi.sh

Use Mistral Small 4 as the model behind the pi coding agent, with your own Mistral key.

```sh
# npm install -g @earendil-works/pi-coding-agent
export MISTRAL_API_KEY='...'

pi --model 'mistral/mistral-small-2603'
```

### codex.sh

Run OpenAI's Codex CLI on Mistral Small 4, which Mistral serves over an OpenAI-compatible API.

```sh
# npm install -g @openai/codex
export MISTRAL_API_KEY='...'

codex --model 'mistral-small-2603' \
  -c model_provider='mistral' \
  -c model_providers.mistral.name='Mistral' \
  -c model_providers.mistral.base_url='https://api.mistral.example/v1' \
  -c model_providers.mistral.env_key='MISTRAL_API_KEY'
```

### ai_sdk.ts

Call Mistral Small 4 from TypeScript with the Vercel AI SDK.

```ts
// npm install ai @ai-sdk/mistral
import { createMistral } from '@ai-sdk/mistral'
import { generateText } from 'ai'

process.env.MISTRAL_API_KEY = '...'

const mistral = createMistral({ apiKey: process.env.MISTRAL_API_KEY })

const { text } = await generateText({
  model: mistral('mistral-small-2603'),
  system: 'Be concise, reply with one sentence.',
  prompt: 'Where does "hello world" come from?',
})
console.log(text)
```

## About Mistral Small 4

Mistral Small 4 is an open-weights model from Mistral, released in March 2026, with a knowledge cutoff of June 2025. It accepts text and image input and produces text, and it supports tool calling, structured output and a reasoning mode. Its context window is 262k tokens and it can return responses up to 256k tokens, which is large for a model at this price.

Price is the clearest point in its favour. Input costs $0.15 per million tokens and output $0.60 per million, giving a blended rate of about $0.26 per million tokens at a 3 to 1 input-output ratio. That is roughly a quarter of the registry median blended price and ranks 38th of 194 for price. The model is served by Mistral and OpenRouter.

The registry holds no benchmark results for this model, so it has no intelligence score, rank or value rating, and no quality comparison is possible from this entry. A developer choosing it should run their own evaluation on the target task before relying on it.

**Strengths**

- Input costs $0.15 per million tokens, well below the registry median
- Blended price of $0.26 per million tokens, 38th of 194 for price
- Context window of 262k tokens with output up to 256k tokens
- Supports tool calling, structured output and reasoning mode

**Weaknesses**

- No benchmark results, so output quality cannot be compared with other models
- Released by one family and served through two providers only
- Not built into the PydanticAI Gateway

**Best for:** Cost-sensitive agents that need tool calling, structured output and image input with long context, and that will test quality themselves.

Prices come from [genai-prices](https://github.com/pydantic/genai-prices), in US dollars per million tokens. Benchmark scores come from Epoch AI and LMArena (CC BY 4.0); the index and its sources are described at https://models.pydantic.dev/methodology.md. Data built 2026-11-25. Compare with other models: https://models.pydantic.dev/models.md
