Signup comes with $1 in credit. No subscription needed.Claim your $1
Docs: API keys
API reference

API keys

Key format, what a key can do, and how to list, mint and revoke keys. Keys are hashed at rest and shown once.

An API key authenticates REST and MCP calls for one workspace. This page covers the key format, what a key can and cannot do, and the endpoints that list, mint and revoke keys.

Format

A key is rg_live_ followed by 32 random characters, sent as Authorization: Bearer rg_live_.... The hosted API mints live keys only; rg_test_ keys come from development deployments of the API (authentication). Keys are hashed at rest, so the raw key is returned exactly once, at creation. A key you mint does not expire; it works until it is revoked. Name keys at mint time so the list stays legible.

What a key can do

Every key acts for the whole workspace: it sees every run, whichever key or app made it, and it can run calls, read the wallet, top up, set the spend guard, manage tables, watches and webhooks, list and revoke keys, and disconnect apps connected over OAuth. All keys draw on one wallet and one spend guard; rate limits count per key.

Account actions need a dashboard session (rg_sess_, the token the dashboard sign-in returns) and answer forbidden to a key or a connected app: minting keys, changing auto top-up, choosing or cancelling a plan, managing billing details, reading invoices, and connecting or disconnecting LinkedIn, Instagram, WhatsApp and Gmail accounts.

List keys

GET /v1/api-keys?days=30
{
  "usage_days": 30,
  "no_key_usage": {"runs": 3, "charged": "0.126"},
  "items": [
    {
      "id": "key_...",
      "name": "production agent",
      "environment": "live",
      "display": "rg_live_...a1b2",
      "last_used_at": "2026-09-02T09:30:00+00:00",
      "revoked": false,
      "created_at": "2026-09-01T12:00:00+00:00",
      "usage": {"runs": 412, "charged": "11.84"}
    }
  ]
}

display is the prefix and the last four characters: the full key is never readable after creation. last_used_at is the key's last authenticated request. Revoked keys stay listed with revoked: true.

usage is what each key ran and was charged over the last days (default 30, up to 365), so a key per agent or per tool doubles as a usage report per agent. Runs made without a key (the dashboard, a connected app) are counted in no_key_usage. To read one key's runs, filter GET /v1/runs with api_key_id.

Create a key

POST /v1/api-keys
{"name": "production agent", "environment": "live"}

Minting needs a dashboard session: a key that could mint keys would outlive its own revocation. name defaults to unnamed key; environment is live (the default); the hosted API refuses test, which only development deployments mint. The response carries the raw key once:

{"id": "key_...", "api_key": "rg_live_...", "note": "Store this key now: it is shown only once."}

Revoke a key

DELETE /v1/api-keys/{key_id}
{"id": "key_...", "revoked": true}

Revocation is immediate and permanent: the next call with the key fails with invalid_api_key. Any key of the workspace can revoke any of its keys, itself included; a connected app cannot. An unknown key_id answers invalid_request. To rotate, create the new key, move the integration, then revoke the old one.

Reading this as an agent? This page as markdown: /docs/api/keys.md · every page: /docs/llms.txt