API key management

Create, list, and revoke API keys programmatically.

You can manage API keys from the Dashboard or through the SDK. Each user can have multiple active keys.

List keys

View all your active API keys and their labels:

python
keys = client.api_keys.list()

for key in keys:
    print(key["name"], key["prefix"], key["created_at"])

The full key is never returned after creation. Only the prefix (first 8 characters) is shown for identification.

Create a key

python
new_key = client.api_keys.create(name="Training script")

# Save this, it won't be shown again
print(new_key["api_key"])

Label your keys by purpose (e.g. "notebook", "production", "CI pipeline") so you know which to revoke if one is compromised.

Revoke a key

Revoking a key immediately invalidates it. Any requests using the key will return 401 Unauthorized.

python
client.api_keys.revoke(key_id="key_abc123...")

You can also revoke keys from the Dashboard by clicking the delete button next to any key.