Magistral Medium 2509 Thinking API

Reasoning model tuned for tasks needing longer thought and higher accuracy: legal research, financial forecasting, software, and storytelling.

Mistral AIText Generation40K contextProprietary Endpoint

About Magistral Medium 2509 Thinking

Reasoning model tuned for tasks needing longer thought and higher accuracy: legal research, financial forecasting, software, and storytelling.

Magistral Medium 2509 Thinking specs

Model ID
magistral-medium-2509-thinking
Provider
Mistral AI
Category
Text Generation
Context window
40K tokens
Max output
40,000 tokens
Input
text
Output
text
Endpoints
POST /v1/chat/completions
POST /v1/responses
POST /v1/messages

Magistral Medium 2509 Thinking 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
$2.60
Output
per 1M generated tokens
$6.50
Web Search (Linkup)
per call when invoked
$0.013
Compare on the full pricing page

How to call the Magistral Medium 2509 Thinking API

Magistral Medium 2509 Thinking 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 magistral-medium-2509-thinking. 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": "magistral-medium-2509-thinking",
    "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="magistral-medium-2509-thinking",
    messages=[{"role": "user", "content": "Write a haiku about the ocean."}],
)
print(response.choices[0].message.content)
Full Magistral Medium 2509 Thinking API reference

Magistral Medium 2509 Thinking API parameters

Request parameters supported by the Magistral Medium 2509 Thinking API on EmpirioLabs. Defaults apply when a field is omitted.

ParameterTypeDefaultRange / valuesDescription
temperaturenumber0.70 to 2Sampling temperature
top_pnumber10 to 1Nucleus sampling
max_tokensnumber40961 to 65536Max output tokens
frequency_penaltynumber0-2 to 2Penalty for repeated tokens. >0 reduces repetition, <0 encourages it.
presence_penaltynumber0-2 to 2Penalty for new vs. seen tokens. >0 encourages new topics, <0 encourages staying on topic.
stopstring--Comma-separated stop sequences
include_reasoningbooleantrue-When true, the response includes the model's reasoning trace alongside the final answer.
web_search_linkupbooleanfalse-Optional web search powered by Linkup. When enabled, recent web sources are retrieved using your latest user message as the query and provided to the model as...
disable_formattingbooleanfalse-When enabled, the gateway will not append the "Sources" footer to assistant responses that used Linkup web search. Useful when the model output is piped to another...

Good to know

Standard Magistral Medium 2509 chat parameters. No separate thinking budget is exposed.

Magistral Medium 2509 Thinking API: common questions

How much does the Magistral Medium 2509 Thinking API cost?

On EmpirioLabs, Magistral Medium 2509 Thinking is billed pay as you go: Input $2.60 per 1M prompt tokens; Output $6.50 per 1M generated tokens; Web Search (Linkup) $0.013 per call when invoked. The live rate card on this page always matches what the API charges.

What is the context window of Magistral Medium 2509 Thinking?

Magistral Medium 2509 Thinking supports a 40K-token context window with up to 40,000 output tokens per response.

Is the Magistral Medium 2509 Thinking API OpenAI-compatible?

Yes. Magistral Medium 2509 Thinking 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 magistral-medium-2509-thinking.

Can I try Magistral Medium 2509 Thinking in the browser before integrating?

Yes. The EmpirioLabs playground runs Magistral Medium 2509 Thinking in the browser with the same parameters the API exposes, so you can test prompts before writing code.

How do I get a Magistral Medium 2509 Thinking 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?

Explore our models, or contact us about business inquiries, custom deployments, or anything else.