Skip to main content
Every request to https://api.fiveapi.ai needs an API key. Keys belong to your account: every key of an account sees the same tasks, balance and limits.

Create a key

  1. Sign in to the developer console and open API Keys.
  2. Click Create key and give it a name that says where it runs, for example prod-backend or staging-worker.
  3. Optionally narrow it down with scopes, an expiry date and an IP allowlist (see Key options).
  4. Copy the key. It starts with sk_live_ and is shown only once: Five API stores a hash, not the key.
Treat API keys like passwords. Load them from an environment variable or a secret manager, call Five API from your server only, and never ship a key in a web page, a mobile app or a public repository.

Send the key

Send the key in the Authorization header with the Bearer scheme. The x-api-key header is accepted as an alternative; use one or the other.

Scopes

Each key carries one or more scopes. New keys get all three unless you narrow them down. A request that needs a scope the key lacks answers 403 insufficient_scope. For example, give a dashboard that only shows task status a video:read key.

Key options

An account can hold up to 20 active keys. Use separate keys for production, staging and CI so you can revoke one without touching the others. More keys never raise a limit: rate limits, the concurrency cap, the balance and idempotency keys are shared by the whole account.

Rotate or revoke a key

To rotate a key without downtime:
  1. Create a new key with the same options.
  2. Deploy it to your servers.
  3. Revoke the old key in API Keys.
Revocation takes effect within 60 seconds. After that the old key answers 401 api_key_revoked.

Team members

Invite teammates to your account from the console. Each member has a role: Members sign in to the console; only API keys call the API.

Authentication errors

See Errors for the full catalogue.