Skip to content

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.

  1. In the Api keys section, choose Create API key.
  2. 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.
  3. Pick an expiration7, 30, or 90 days (default 7).
  4. Confirm to create the key.

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.

Use the revoke action on a key and confirm in the Revoke API key dialog. Revoked keys stop working immediately.

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.