Route requests to
Mistral Medium
with Merge Gateway

Apply your own routing policies, reduce token costs automatically, and see every routing decision in real time with Merge Gateway.

How Mistral Medium performs*

Intelligence - general reasoning and knowledge
9

What Mistral Medium costs to run

| Vendor | Input / 1M tokens | Output / 1M tokens | Zero data retention | | --- | ---: | ---: | --- | | Mistral | $2.70 | $8.10 | No |

Test Mistral Medium
with Gateway’s Simulator

See a prompt's output, token spend, latency, and more with Mistral Medium.

Route requests to Mistral Medium in minutes

To get started in seconds, add our Gateway Implementation skill to your project, or pick your preferred SDK below. Check out our other quick start skills here.
Install the Merge Gateway SDK
Python
Copied!
1$ pip install merge-gateway-sdk
Send a request
Python
Copied!
1from merge_gateway import MergeGateway
2
3client = MergeGateway(api_key="YOUR_API_KEY")
4
5response = client.responses.create(
6    model="openai/gpt-5.2",
7    input=[
8        {"type": "message", "role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
9        {"type": "message", "role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
10    ],
11)
12
13print(response.output[0].content[0].text)
Try a diffrent model
Swap the model string to route to a different provider. No other code changes needed.
Anthropic
Copied!
1response = client.responses.create(
2    model="anthropic/claude-sonnet-4-20250514",
3    input=[
4        {"type": "message", "role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
5        {"type": "message", "role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
6    ],
7)
Point to Gateway
Python
Copied!
1from openai import OpenAI
2
3client = OpenAI(
4    api_key="YOUR_API_KEY",
5    base_url="https://api-gateway.merge.dev/v1/openai",
6)
Send a request
Use the standard chat.completions.create method. No provider prefix needed on the model name.
Python
Copied!
1response = client.chat.completions.create(
2    model="gpt-5.2",
3    messages=[
4        {"role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
5        {"role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
6    ],
7)
8
9print(response.choices[0].message.content)
Install packages
Copied!
1npm install merge-gateway-ai-sdk-provider ai
Create the provider
TypeScript
Copied!
1import { createMergeGateway } from "merge-gateway-ai-sdk-provider";
2
3const gateway = createMergeGateway({
4  apiKey: "YOUR_API_KEY",
5});
Send a request
Use generateText to send a request. Model names use the provider/model format.
TypeScript
Copied!
1import { generateText } from "ai";
2
3const { text } = await generateText({
4  model: gateway("openai/gpt-4o"),
5  prompt: "Explain the concept of recursion in programming with a simple set of examples.",
6});
7
8console.log(text);
If you already have @ai-sdk/openai installed, point it at Gateway with a base URL change:
TypeScript
Copied!
1import { createOpenAI } from "@ai-sdk/openai";
2
3const gateway = createOpenAI({
4  apiKey: "YOUR_API_KEY",
5  baseURL: "https://api-gateway.merge.dev/v1/ai-sdk",
6});
7
8// All generateText/streamText calls work unchanged
Install the Merge Gateway SDK
Anthropic SDK
Copied!
1from anthropic import Anthropic
2
3client = Anthropic(
4    api_key="YOUR_API_KEY",
5    base_url="https://api-gateway.merge.dev/v1/anthropic",
6)
7
8message = client.messages.create(
9    model="claude-sonnet-4-20250514",
10    max_tokens=1024,
11    messages=[
12        {"role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
13    ],
14)
15
16print(message.content[0].text)

Explore other models available in Merge Gateway

model logo
Amazon Nova 2 Lite
model logo
Amazon Nova 2 Sonic
model logo
Amazon Nova Lite
model logo
Amazon Nova Micro
model logo
Amazon Nova Premier
model logo
Amazon Nova Pro
model logo
Claude 3.7 Sonnet
model logo
Claude Haiku 4.5 (20251001)
model logo
Claude Opus 4.6
model logo
Claude Opus 4.7
model logo
Claude Opus 4.8
model logo
Claude Sonnet 4.5
model logo
Claude Sonnet 4.6
model logo
Claude Sonnet 5
model logo
Codestral
model logo
Codestral 25.08
model logo
Command R 08-2024
model logo
Command R+ 08-2024
model logo
Command R7B 12-2024
model logo
DeepSeek R1
model logo
DeepSeek V3
model logo
DeepSeek V3.2
model logo
DeepSeek V4 Flash
model logo
DeepSeek V4 Pro

Mistral Medium FAQ

If you have additional questions about Mistral Medium, we've addressed several more below. Keep in mind that this information was written in June, 2026 and may change over time.

Heading

What other models does Mistral AI offer?

Mistral AI offers a broad catalog spanning reasoning models, general-purpose LLMs, coding specialists, and lightweight edge models. Here are some other models Mistral AI supports:

  • Mistral Small 4: Mistral AI's compact multimodal reasoning model, priced at $0.10 input / $0.30 output per million tokens. It targets teams that need combined instruct, reasoning, and coding capability at minimal cost
  • Mistral Large 3: The current general-purpose flagship from Mistral AI, with a 256k token context window, multimodal image input support, and 675B total parameters in a mixture-of-experts architecture. It is available under Apache 2.0 at $0.50 input / $1.50 output per million tokens
  • Magistral Medium: Mistral AI's reasoning model designed for domain-specific, multilingual, and transparent reasoning tasks. It is priced at $2.00 input / $5.00 output per million tokens and uses the API ID magistral-medium-latest
  • Codestral: A specialist model optimized for code completion, priced at $0.30 input / $0.90 output per million tokens. It is designed for code generation and fill-in-the-middle tasks rather than general instruction following
  • Devstral 2: A frontier agentic coding model built for autonomous software engineering tasks, priced at $0.40 input / $2.00 output per million tokens. It is optimized for solving complex, multi-step engineering problems in agentic workflows
  • Mistral Nemo: A multilingual open-source 12B model available via the open-mistral-nemo API identifier at $0.15 per million tokens for both input and output. It suits teams that need multilingual coverage at low cost

How does Mistral Medium differ from Mistral AI's other models?

Mistral Medium sits at the upper-middle tier of Mistral AI's pricing range, positioned between the cost-efficient small models and the top-end reasoning models.

  • Pricing: Mistral Medium is priced at $1.50 input / $7.50 output per million tokens. This makes it considerably more expensive than Mistral Small 4 ($0.10 input / $0.30 output) while delivering less intelligence than Magistral Medium, which costs $2.00 input / $5.00 output and adds reasoning capability
  • Speed: The model delivers approximately 80 tokens per second on average, which is faster than the median for comparable models in its price tier but slower than Mistral Small 4, which reaches approximately 179 tokens per second
  • Context window: Mistral Medium supports a context window of approximately 33,000 tokens. This is considerably narrower than Mistral Small 4 and Mistral Large 3, both of which provide 256k token windows
  • Reasoning capability: Mistral Medium does not include extended chain-of-thought reasoning. Magistral Medium and Mistral Small 4 both support reasoning modes for tasks requiring multi-step analysis
  • Modality: Text input and output only, with no image input support. Mistral Small 4 and Mistral Large 3 both accept image input

Mistral Medium is a reasonable choice for teams with existing integrations built around it, but for new development, Mistral Small 4 delivers comparable or better results at a substantially lower price point.

What models should I consider using alongside Mistral Medium?

No single model is optimal for every task. Here are models worth pairing with Mistral Medium depending on what your product needs:

  • Mistral Small 4 (Mistral AI): For the majority of general instruction-following tasks, Mistral Small 4 delivers high intelligence at $0.10 input / $0.30 output, roughly one-fifth the output cost of Mistral Medium. Route to Mistral Small 4 for standard completions and reserve Mistral Medium for workloads that specifically require its characteristics
  • Magistral Medium (Mistral AI): When a request requires multi-step reasoning, legal analysis, or domain-specific problem solving, Magistral Medium provides chain-of-thought capability that Mistral Medium lacks. The cost premium is modest given the quality lift on hard tasks
  • Claude Sonnet 4.5 (Anthropic): For complex instruction-following or long-form document generation where output quality and faithfulness to instructions are critical, Claude Sonnet 4.5 is a strong cross-provider fallback with robust benchmark performance
  • Gemini 2.0 Flash (Google): For bulk-processing tasks like classification, extraction, or summarization at high volume, Gemini 2.0 Flash offers sub-cent pricing with a long context window. It handles the high-throughput workloads where Mistral Medium's cost becomes difficult to justify at scale
  • Llama 3.3 70B (Meta): For teams that want to self-host inference or reduce provider dependency, Llama 3.3 70B is an open-weights alternative with competitive quality for general text tasks and no per-token API charges when self-hosted

What are the challenges of using Mistral Medium in my product?

Like any production LLM, Mistral Medium comes with tradeoffs worth planning for:

  • Provider dependency: Mistral Medium is a proprietary model without publicly available weights, so all requests must route through Mistral AI's API or a third-party inference provider. Any outage or rate limit event at the provider has no self-hosted fallback path
  • Cost at scale: At $7.50 per million output tokens, Mistral Medium is among the more expensive options relative to its intelligence level. An application generating 1 million output tokens daily costs over $7,500 per month. Mistral Small 4 and many cross-provider alternatives offer comparable performance at a fraction of that cost
  • Narrow context window: At approximately 33,000 tokens, Mistral Medium cannot process long documents, large codebases, or extended conversation histories in a single request. Teams working with long-context tasks need to consider chunking strategies or switch to a model with a wider window
  • No reasoning mode: For tasks that require chain-of-thought analysis, multi-step math, or complex planning, Mistral Medium lacks native reasoning support. Results on hard analytical tasks may lag behind models that offer extended thinking
  • No multimodal input: Mistral Medium accepts text only. Applications that process images alongside text must route those requests to a separate vision-capable model, adding routing complexity to the integration

Why should I use Merge Gateway to route LLM requests with Mistral Medium and every other model?

Using Mistral Medium through Merge Gateway gives you access to the model itself and the infrastructure layer around it:

  • One API, every provider: Access Mistral Medium and every other major LLM through a single endpoint and API key. Change providers by swapping the model string. No application code changes required
  • Intelligent routing and automatic failover: Merge routes around Mistral AI outages automatically. Routing policies based on cost, latency, or quality can reduce spend by 40-60% without touching your application code
  • Cost governance: Set hard or soft project budgets so Mistral Medium spend stays within plan. Every request is attributed to a model, project, and tag in a unified billing dashboard across all providers
  • Build Your Own Router: Define what "best" means for your traffic by selecting from curated ML benchmarks or adding your own eval scores. The router scores each available model against your weights and picks the winner per request, with a plain-language explanation of every decision
  • Security and compliance controls: Apply DLP rules and prompt injection protection before every request reaches Mistral AI. Enforce per-project model and region policies without adding that logic to your application

How can I start routing requests to Mistral Medium via Merge Gateway?

Getting Mistral Medium running through Merge Gateway takes a few minutes:

1. Create an account and get your API key from the dashboard.

2. Install the Merge Gateway SDK: run pip install merge-gateway-sdk (Python) or npm install merge-gateway-sdk (Node). Alternatively, if you're already using the OpenAI SDK, set base_url = "https://api-gateway.merge.dev/v1/openai" and your existing code works as-is.

3. Make your first request using the provider/model format. For Mistral Medium, the model string is mistral/mistral-medium-latest. Swap the model string to route to any other provider without changing anything else.

4. Configure a routing policy in the dashboard to set failover behavior, cost limits, and optimization strategy. Your first policy can be as simple as naming Mistral Medium as primary with Mistral Small 4 or Mistral Large 3 as fallback.

Full setup instructions and SDK references are in the Merge Gateway docs.

Try Mistral Medium through Merge Gateway

Route, observe, and control AI requests across providers from one API.