lk_ and pass in the Authorization header on every request:
Keys belong to an organization
Every API key is scoped to a single organization. The key authenticates the request and pins it to that org, there’s no need to send an extraX-Org-Slug header.
The credits, runs, VMs, and deployments associated with the request are all billed and accessed through the key’s org.
If you belong to several orgs, create a separate key in each one for the scripts that act on its behalf.
API keys vs JWT tokens
The platform supports two token types:
JWT users can act on any org they’re a member of by sending
X-Org-Slug: <slug>; with an API key, the org is fixed by the key itself.
Lifecycle
API keys can be:- Created with a name and an optional expiration date. Creation requires the
owneroradminrole in the org. - Regenerated to issue a fresh secret while keeping the key’s name, org, and expiration. The previous secret stops working immediately, so rotate a key without touching the scripts that reference it by name.
- Revoked at any time, effective immediately. The row is kept for the audit trail.
owner or admin role in the org.
Dashboard
Open API Keys in the dashboard. The page lists every key across every org where you’re an owner or admin, with a filter to narrow by org. Create a new key with the New API Key button; the dialog defaults to the active org but you can pick any org you can manage. Each key row has a regenerate button (the circular-arrows icon) to rotate its secret in place, and a revoke button to disable it. As with creation, the new value from a regenerate is shown only once.CLI
REST API
They all require the
owner or admin role in the org.
plaintext_key, store it immediately.
