X-API-Key header.
GET /api/v1/pricing/, GET /api/v1/pricing/{platform}/),
the cost estimate (POST /api/v1/pricing/calculate_cost/) and the schema (GET /api/v1/openapi.json). Requests without a key have a lower
rate limit.
Keys
- Create keys in the dashboard under API keys, or with
POST /api/v1/api-keys/create/using a key that has theadminscope. - A key starts with
sk_. It is shown in full once, when it is created; afterwards you see only its prefix. Store it in a secret manager or an environment variable, and use it only from your servers, never in browser or mobile code. - A key belongs to one organization. Everything it does is billed to that organization and recorded in its audit log.
- An organization can have at most 25 active API keys. Creating or re-activating a key above that returns
400; revoke one first. - A key has a
rate_limit: its requests per hour, from 1 to 100,000, and 1,000 unless you set another when you create it. Creating or updating a key withrate_limitabove 100,000 returns400. See Rate limits. - Rotate a key with
POST /api/v1/api-keys/{id}/rotate/: you get a new key with the same name, scopes, rate limit and environment, and the old key stops working at once. - Revoke a key with
DELETE /api/v1/api-keys/{id}/. It stops working at once.
Scopes
A key has one or more scopes.admin includes write, and write includes read.
To run jobs and read their results, a key needs
read and write. A request outside the key’s scopes answers
403:
Environments
An organization has one or more environments, for example production and staging. Each key belongs to one environment, chosen when the key is created (the organization’s default otherwise). Jobs the key creates are tagged with that environment, andGET /api/v1/jobs/?environment=<slug> lists one environment’s jobs.
Environments label work; they do not isolate it. Any key of the organization can read every job of the
organization, and all environments share one credit balance.
Expiry
A key can have an expiry time (expires_at). From that moment it is refused like a revoked key. Keys without
expires_at work until they are revoked.
When a key is refused
A
401 response carries WWW-Authenticate: X-API-Key.