Documentation Index
Fetch the complete documentation index at: https://metrion.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Required headers
Your SDK sets these headers automatically when you configure theapi_key and base_url. You do not need to set them manually.
| Header | Provider | Value |
|---|---|---|
x-api-key | Anthropic | Your Metrion token or Anthropic API key |
Authorization | OpenAI, Gemini, Mistral, Grok | Bearer <your-metrion-token-or-provider-key> |
Content-Type | All | application/json |
Metrion-specific headers
x-metrion-user
An identifier for the user, bot, or workflow that made the request. This value appears in the Requester column in your logs and can be used to filter by requester.Use any string that makes sense for your setup — a user ID, an agent name, or a workflow label.
- Filter your logs by requester in the dashboard
- Track costs per user, per agent, or per workflow
- Identify which part of your system is responsible for a given request
x-metrion-cache
Enable response caching for the request. Metrion hashes the request (model + message content) and stores the response. Identical future requests return the cached response instantly, with zero tokens consumed.Accepted values:
true— serve from cache if a match exists; cache the response on a missrefresh— bypass the cache and always fetch a fresh response, then update the cache
Cache-Control: max-age=<seconds> alongside x-metrion-cache: true to control how long the cached response is retained (default: 7 days, maximum: 365 days).
When a cached response is returned, the proxy sets x-metrion-cache: HIT on the response and records the request in your logs with a Cached badge — no tokens are billed for cached responses.
Forwarded headers
Metrion forwards the standard provider headers required by each API. For Anthropic, theanthropic-version header is set server-side to a fixed, tested version — do not set it manually in your requests, as Metrion will override it.