Create and rotate API keys
Give each project and environment a scoped credential, preserve attribution, and rotate access without downtime.
Why separate keys
A key belongs to a project, and the project identifies a test or live environment. Separate keys reduce blast radius, make usage attributable, and allow one workload to rotate without interrupting others.
Create a key
- Select the owning project.
- Use a name that identifies workload and environment, such as
production-router. - Select Create API key.
- Copy the full secret immediately. Later, Live data shows only the public prefix and last four characters.
Handle the secret
- Store it in a secret manager, never in source control or a client-side bundle.
- Inject it as
ALLM_API_KEYon the server or in CI. - Use the prefix and last-used timestamp to identify credentials during audits.
Rotate safely
- Create the replacement key before revoking anything.
- Deploy the replacement to every consumer.
- Confirm successful API traffic and updated
last_used_at. - Revoke the previous key. Revocation takes effect immediately.
Scopes and limits
Keys created in the app currently receive catalog:read, changes:read, pricing:calculate, and decisions:write. Creation and revocation require an owner, admin, or developer role. Limits are 2 active keys on Free, 10 on Pro, and 50 on Business.
Building the same workflow in code?