API Keys and Workspaces
API keys authenticate inference requests. Workspaces label keys by project or environment so usage and audit trails remain understandable as a team grows.
Recommended workspace layout
Create separate workspaces for operational boundaries such as:
developmentstagingproduction- a customer, product, or internal team with separate ownership
Use a separate key for each deployed service. Do not share one production key across unrelated applications.
Create a key
From API Keys in the console:
- Select or create a workspace.
- Enter a descriptive key name.
- Optionally set an expiration time.
- Optionally set a spend limit and reset period.
- For eligible enterprise accounts, optionally add allowed IP addresses or CIDR ranges.
- Create and securely store the secret.
The API key management endpoints support programmatic creation and lifecycle management. Keep management credentials and inference credentials separated in your own systems.
Spend limits
A key can have a lifetime limit or a limit that resets daily, weekly, or monthly. A reset period requires a spend limit. The key limit is evaluated together with account balance, credit, and account-level spend protection; a permissive key cannot override a stricter account control.
IP restrictions
An API-key IP allowlist limits one key. An enterprise tenant IP policy can apply to every key in the tenant. When both exist, the request must satisfy all applicable restrictions.
Use explicit public IPs or CIDR ranges. Before enabling a restrictive policy, include every production egress address and verify traffic with a non-critical key.
Key lifecycle
- Active — accepted when all other checks pass.
- Disabled — temporarily blocked and can be re-enabled.
- Expired — no longer accepted after its configured expiry.
- Deleted — permanently removed.
Rotation without downtime
- Create a replacement key with the same required workspace and policies.
- Deploy it to your secret manager and application.
- Confirm successful production traffic on the new key.
- Disable the old key and watch for unexpected callers.
- Delete the old key after the observation window.
Never commit a key to source control, put it in browser code, or paste it into a ticket or chat.
If a key is exposed
- Disable or delete it immediately.
- Create and deploy a replacement.
- Review key activity, request logs, and spend for unauthorized use.
- Check source history, CI logs, browser bundles, and third-party systems for additional copies.
- Contact support with the key display identifier, not the full secret.
Enterprise administration
Enterprise administrators can audit key metadata and ownership across the tenant and revoke keys without viewing plaintext secrets. Member model access, tenant IP policy, and data residency can further constrain what a valid key is allowed to do.