Skip to main content
All requests to the gateway must be authenticated with a Bearer token — your MetrixLLM API key.

Creating a key

1

Open your Workspace

Log into app.metrixllm.com and select the workspace you want to create a key for.
2

Go to API Keys

Click API Keys in the left sidebar.
3

Create and copy

Click Create API Key, give it a name (e.g. Backend - Production), and click Create. Copy the key immediately — it is shown only once.
API keys are displayed only at the moment of creation. If you lose a key, revoke it and create a new one. Never commit keys to source control — use environment variables.

Key format

MetrixLLM API keys always start with mtx_. This prefix makes them easy to identify and never confused with a raw provider key like sk-....

Using your key

Pass the key as a Bearer token in the Authorization header:

Revoking a key

Navigate to API Keys in your workspace and click Revoke next to any key. It is invalidated immediately — active requests using it will fail with 401 Unauthorized within seconds.

Key scoping

Keys are scoped to the workspace they were created in. A key from your Production workspace cannot access logs or routing rules from Staging. For additional role restrictions, see RBAC.