All endpoints on this page require a management key. Create one from Dashboard → Management Keys.
The full key value is only returned once — when you create it. After that, the key is masked in list and detail responses. Store it securely immediately after creation.
List All Keys
GET /v1/account/keys returns all API keys for your account with masked values.
- Python
- Node.js
- cURL
Create a Key
POST /v1/account/keys creates a new API key with optional configuration.
Parameters
- Python
- Node.js
- cURL
Get Key Details
GET /v1/account/keys/{key_id} returns detailed information about a specific key, including current usage.
- Python
- cURL
Key Detail Fields
Update a Key
PATCH /v1/account/keys/{key_id} updates one or more settings on an existing key. Only include the fields you want to change.
- Python
- cURL
Delete a Key
DELETE /v1/account/keys/{key_id} permanently deletes a key. Any requests using this key will immediately start returning 401.
- Python
- cURL
Key Rotation Pattern
A safe key rotation workflow:Best Practices
Use descriptive labels
Name keys after the service or environment they belong to (e.g.
"prod-backend", "staging-worker"). This makes it easy to audit usage.Set daily limits
Always configure a
daily_limit on production keys to prevent runaway costs from bugs or attacks.Restrict models
Use
allowed_models to limit expensive models to keys that actually need them. A chatbot key probably doesn’t need access to image generation models.Rotate regularly
Rotate keys periodically (e.g. monthly) and immediately if a key may have been exposed.