Integration guides · 2026-11-20
Mistral Large 4 API: OpenAI SDK usage and pricing
Call Mistral Large 4 as mistral/mistral-large-4 through an OpenAI-compatible API: 1,048,576-token context, low/medium/high reasoning, PDF input and pricing.
Short answer: change the model id, keep the request
LLMTR (llmtr.com) is a gateway that gives access to language models hosted in Türkiye and at global providers through one OpenAI-compatible API. You call Mistral Large 4 there with the model id mistral/mistral-large-4 on the /v1/chat/completions endpoint at https://llmtr.com/v1.
Mistral describes Large 4 as an open-weight model that combines instruction following, reasoning and tool-using agent work in one model and accepts text and image input. According to the announcement it is a mixture-of-experts (MoE) model with 1 trillion parameters, 52 billion of them active; it was announced as a public preview, and Mistral made it generally available (GA) on 5 November 2026. On LLMTR the context window is 1,048,576 tokens and one response can carry up to 262,144 output tokens.
How to use the Mistral Large 4 API with the OpenAI SDK
Create an API key on LLMTR, set the OpenAI client's base_url to https://llmtr.com/v1 and pass mistral/mistral-large-4 as the model. The Python example below asks for the edge cases a function misses. The answer arrives in content, the model's reasoning trace in reasoning_content and the token counts in usage.
The model always reasons before it answers; reasoning cannot be turned off. Reasoning tokens are counted in completion_tokens and billed at the output price, and max_tokens covers the reasoning and the answer together, so keep the budget at a few thousand tokens even when you expect a short reply. A response whose finish_reason is length is incomplete: raise max_tokens or send reasoning_effort: "low".
A mistral/mistral-large-4 call with the OpenAI Python SDK that prints the answer, the reasoning trace and the token usage separately.
from openai import OpenAI
client = OpenAI(base_url="https://llmtr.com/v1", api_key="llmtr-your_key")
response = client.chat.completions.create(
model="mistral/mistral-large-4",
messages=[{"role": "user", "content": "Review this function and list the edge cases it misses."}],
max_tokens=4096,
)
message = response.choices[0].message
print(message.content)
print(getattr(message, "reasoning_content", None))
print(response.usage)
Mistral Large 4 pricing before and after 20 October 2026
The model is listed on LLMTR with dated price cards and the switch is automatic: the card in effect when the request is processed applies. The current price per 1M tokens is $0.70 for input, $0.07 for input read from cache and $2.10 for output; it is the price Mistral set when it made the model generally available on 5 November 2026. At launch, until 20 October 2026, 00:00 UTC, $0.68, $0.07 and $2.09 applied, followed by the list price of $1.36, $0.14 and $4.18.
A worked example: a 20,000-token prompt with 15,000 tokens read from cache and a 3,000-token response, reasoning included. On the current card that is (5,000 x $0.70 + 15,000 x $0.07 + 3,000 x $2.10) / 1M = $0.01085. No margin is added to this model's price; LLMTR's 8% platform fee is charged only when you top up credit.
| Property | Value |
|---|---|
| Model id | mistral/mistral-large-4 |
| Endpoint | /v1/chat/completions |
| Context window | 1,048,576 tokens |
| Max output per response | 262,144 tokens |
| Input | text, image, PDF (by https URL) |
| reasoning_effort | low, medium, high (default high) |
| Current price (per 1M tokens) | $0.70 input / $0.07 cache / $2.10 output |
Reasoning levels: low, medium and high
Mistral Large 4 always reasons and accepts three levels: low, medium and high; if you omit the field, high is used. low is the least reasoning and suits classification, format conversion and short answers, with fewer output tokens. high is for hard problems and multi-step analysis. You can send the level in three ways: the reasoning_effort field, a suffix on the model id (mistral/mistral-large-4:low or mistral/mistral-large-4:high), or a reasoning object ({"effort": "low"}).
The none, minimal, xhigh and max levels return 400 invalid_request, and the error message lists the accepted levels. Reasoning cannot be turned off: sending "reasoning": true or false also returns 400; use reasoning_effort: "low" for the least reasoning. include_reasoning is not applied on this model: the field is removed from the request and reported in llmtr_dropped_parameters in the response. The request below uses the least reasoning to convert a date to ISO 8601.
A curl request with reasoning_effort low that asks for a short answer with the least reasoning.
curl https://llmtr.com/v1/chat/completions \
-H "Authorization: Bearer $LLMTR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mistral/mistral-large-4",
"reasoning_effort": "low",
"max_tokens": 2048,
"messages": [
{"role": "user", "content": "Convert this date to ISO 8601 and return only the date: 3 March 2026"}
]
}'
Image input, JSON Schema and prompt cache
Images go in image_url parts. Sending the image as a base64 data URL is the safer choice: an https address is downloaded by the provider itself, and when it cannot be downloaded the request returns 400. Send a PDF as a file_url part with an https URL. There is no audio or video input on this model; input_audio and video_url parts return 400 unsupported_input.
response_format accepts both json_object and json_schema, and you can send strict: true with json_schema. Repeated prompt prefixes are cached automatically; the number of tokens read from cache arrives in usage.prompt_tokens_details.cached_tokens and is billed at the cache price. A hit is not guaranteed, so keep a long, fixed system prompt byte-for-byte identical across requests. temperature must be between 0 and 1.5, and a higher value returns 400; seed is supported and user is removed.
Getting started on LLMTR: account, key and first request
Step 1: create an account at llmtr.com and top up prepaid credit. Step 2: create a key under Dashboard > API Keys; the raw key is shown only once, so store it in an environment variable such as LLMTR_API_KEY. Step 3: in your OpenAI-compatible SDK, set base_url to https://llmtr.com/v1, use mistral/mistral-large-4 as the model and send the first request.
Each request is deducted from your credit at the catalog price in effect when it is processed; the same key works for every model in the catalog.
Call Mistral Large 4 through LLMTR
Create an account, create an API key and send the first request to https://llmtr.com/v1 with mistral/mistral-large-4.
- Account. Create an account at llmtr.com and top up prepaid credit.
- API key. Create a key under Dashboard > API Keys. The raw key is shown once; store it as the LLMTR_API_KEY environment variable.
- First request. In an OpenAI-compatible SDK, set base_url to https://llmtr.com/v1 and send the first request with mistral/mistral-large-4 as the model.
Frequently asked questions
How much does the Mistral Large 4 API cost?
On LLMTR, per 1M tokens: $0.70 input, $0.07 input read from cache and $2.10 output. Reasoning tokens are billed as output.
Can I use Mistral Large 4 with the OpenAI SDK?
Yes. Set base_url to https://llmtr.com/v1, use your LLMTR key as the API key and pass mistral/mistral-large-4 as the model. Requests go to the /v1/chat/completions endpoint.
How do I turn off reasoning in Mistral Large 4?
You cannot; Mistral Large 4 always reasons. For the least reasoning, set reasoning_effort to low or use the model id mistral/mistral-large-4:low. The model accepts the low, medium and high levels; other levels, none included, return 400.