baseURL changes.
Prerequisites
- A Metrion account with your
sk-metrion-xxxtoken (find it on the Integrate page) - A Mistral API key saved in Metrion’s Integrate page
Setup
1
Install the OpenAI SDK
2
TypeScript
Python
3
Configure the client
4
Set
baseURL to Metrion’s Mistral proxy and pass your sk-metrion-xxx token as apiKey. Metrion injects your Mistral key and forwards the request to https://api.mistral.ai/v1/chat/completions.5
TypeScript
Python
6
Send a request
7
TypeScript
Python
Direct HTTP
Supported models
Metrion uses prefix matching, so
mistral-large-latest resolves to mistral-large pricing automatically.
Pass-through mode
To use your own Mistral key without storing it in Metrion, pass it inAuthorization: Bearer and identify your Metrion account with the x-metrion-token header:
In pass-through mode, your Mistral key is forwarded directly to Mistral’s API and is never stored by Metrion.
Track requests by user or service
Add the optionalx-metrion-user header to tag individual requests. These labels appear in your Metrion logs and dashboards.