What is Small 4 API?
Small 4 is available through AIMLAPI.
Technical Specifications
- Supported inputs: Image, Text
- Output: Text
- Context window: 262,144 tokens / Max output: —
- Endpoint: /chat/completions
Performance Benchmarks
[embed]
Small 4 API Pricing
- Input: $0.195 / 1M tokens
- Output: $0.78 / 1M tokens
Where to Use Small 4
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.
Code Sample
[embed]
Measured on the AI/ML API gateway across live traffic. Figures are medians unless stated. Last updated 2026-10-12.
General chat assistant: Mistral Small 4 is documented as suited to general chat assistant use cases, and the provider material also describes it as intended for enterprises seeking general chat assistants.
Document parsing and extraction: It is documented as suitable for document understanding, document parsing and extraction, and data extraction from documents and images.
Coding agent: The model is documented as suited to coding tasks, coding agent workflows, and SWE automation or codebase exploration.
Research assistant: It is documented as suited to research tasks, including math and research use cases for researchers.
import requests r = requests.post( "https://api.aimlapi.com/v1/chat/completions", headers={"Authorization": "Bearer " + AIMLAPI_KEY}, json={ "model": "mistralai/mistral-small-2603", "messages": [ { "role": "user", "content": "Hello!" } ] }, ) print(r.json())
const r = 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-2603", "messages": [ { "role": "user", "content": "Hello!" } ] }), }); console.log(await r.json());
curl -X POST https://api.aimlapi.com/v1/chat/completions \ -H "Authorization: Bearer $AIMLAPI_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"mistralai/mistral-small-2603","messages":[{"role":"user","content":"Hello!"}]}'
OpenAI-compatible — swap the base URL and it works with your existing SDK.
| Type | Price |
|---|---|
| Input | |
| Output | |
| Cached input |
| Benchmark | Score | What it measures | Source | Retrieved |
|---|---|---|---|---|
| Intelligence | 11.3 | Composite score across standardised reasoning, knowledge and problem-solving evaluations, measured independently by Artificial Analysis | Source | September 22, 2026 |
| Coding | 26.6 | Composite score across standardised coding evaluations, measured independently by Artificial Analysis | Source | September 22, 2026 |
| Model | Input | Output | Context | Best for |
|---|---|---|---|---|
Small 4 This page | Reasoning + agents | |||
| Reasoning + agents | ||||
| Balanced coding + agents | ||||
| Long-context, multimodal & agentic workflows | ||||
| Reasoning + agents |
Small 4 has a 262,144 tokens context window.
Small 4 takes image, text as input and returns text.
Use mistralai/mistral-small-2603 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
Small 4 is priced at input $0.2578875 / 1M tokens, output $1.03155 / 1M tokens, cached input $0.020631 / 1M tokens.
Yes, Small 4 can stream responses as they are generated.
Yes, Small 4 accepts image input alongside text.
Small 4 was built by Mistral AI.
Yes, Small 4 supports function calling, parallel tool calls, and structured outputs.