API keys
API keys authenticate your code with Metrana — most importantly for logging metrics into the portal. Workspace owners manage them in the Api keys section of the workspace Settings.
Create an API key
Section titled “Create an API key”- In the Api keys section, choose Create API key.
- Select one or more Scopes — at least one is required:
ingestion:write— send events and metrics to the ingestion API (this is the scope you need for logging training data).query:read— read data via the query API.agent:invoke— invoke agents.autoresearch:invoke— invoke autoresearch.
- Pick an expiration — 7, 30, or 90 days (default 7).
- Confirm to create the key.
Manage existing keys
Section titled “Manage existing keys”The keys list shows each key’s display prefix, created date, expiration, and its scopes as badges. The full secret is never shown again after creation.
Revoke a key
Section titled “Revoke a key”Use the revoke action on a key and confirm in the Revoke API key dialog. Revoked keys stop working immediately.
Using a key
Section titled “Using a key”Provide the key to the Metrana client library (commonly via the METRANA_API_KEY environment variable) so
your training code can log to this workspace. For the logging setup itself, see
Getting your data in.