Mistral
Route your Mistral API calls through AI SpendOps for automatic usage tracking and cost attribution.
Configuration
| Setting | Value |
|---|---|
| Route | /v1/mistral/* |
| Upstream | https://api.mistral.ai |
| Auth header | Authorization: Bearer ... |
| Streaming usage | Native. stream_options is not injected |
SDK base URL
https://proxy.aispendops.com/v1/mistral/v1
Example
curl https://proxy.aispendops.com/v1/mistral/v1/chat/completions \
-H "Authorization: Bearer your-mistral-key" \
-H "X-ASO-API-Key: aso_k_yourkey.secret" \
-H "Content-Type: application/json" \
-d '{"model":"mistral-large-latest","messages":[{"role":"user","content":"Hello"}]}'
Usage fields
| Field | Description |
|---|---|
prompt_tokens | Input tokens |
completion_tokens | Output tokens |
Keeping the whole stack in Europe
Mistral is the usual choice for teams that need inference from a European provider, and it pairs cleanly with how AI SpendOps stores data: usage and cost records are held in United Kingdom and European Union regions, under UK GDPR and EU GDPR, with a Data Processing Addendum available.
That means the model provider and the cost telemetry about your model provider both stay in Europe. It is worth checking that property deliberately, because adding an observability or FinOps layer in front of a European model provider is a common way for data to end up leaving the region without anyone noticing.
AI SpendOps also never stores prompts or completions, only token counts, cost, model, timings and the dimensions you attach, so the content of your Mistral calls is not retained anywhere regardless of region.
Streaming and usage_source
Unlike most OpenAI-compatible providers in this catalogue, AI SpendOps does
not inject stream_options: { include_usage: true } into Mistral requests.
Mistral returns usage in the final streaming chunk on its own, and injecting an
unrecognised field risks the upstream rejecting the request.
Every usage event carries a usage_source field so you can tell measured data
from inferred data:
| Value | Meaning |
|---|---|
provider | Real token counts from Mistral's usage block. What you should normally see |
estimate | Response completed without a usage block, so counts are estimated from character length |
partial | Caller disconnected mid-stream and the partial response was estimated |
none | Upstream returned an error, so no tokens were charged and none are recorded |
If you are producing finance reports, filter on usage_source = 'provider' to
exclude estimated rows, or report the estimated share alongside the total.
What AI SpendOps records
| Field | Populated |
|---|---|
cache_read_tokens | No |
cache_write_tokens | No |
reasoning_tokens | Only where the model returns completion_tokens_details |
provider_cost | No. Cost is calculated from token counts and the current Mistral rate card |
Notes
- Both Mistral's native endpoints and its OpenAI-compatible surface route through
/v1/mistral/*unchanged. - Full field definitions are in the usage event field reference.