API Keys
API keys authenticate requests to the public API (/v1/sessions, /v1/usage, etc.). Keys are created and managed in the dashboard under API Keys.
Key format
Keys have the prefix cha_live_ (production) or cha_test_ (test mode):
The prefix is visible in list responses. The full secret is shown once at creation time. Chaser does not store it in plaintext — if you lose it, rotate or create a new key.
Using a key
Pass the key as a Bearer token:
Key management (dashboard)
All key management operations use cookie authentication (your dashboard session), not Bearer tokens.
Create a key
In the dashboard: API Keys → + Create key. Enter a name. The full secret is displayed once — copy it immediately.
List keys
Response:
Revoke a key
Immediately disables the key. All requests with this key return 401.
Returns 204 on success.
Rotate a key
Creates a new key and marks the old key as revoked with a grace period (default 7 days). During the grace period, both the old and new key work. After the grace period, the old key stops authenticating.
Response includes the new key’s full secret (shown once):
Best practices
- One key per environment. Separate keys for production, staging, and CI. This limits blast radius if a key leaks.
- Rotate on suspicion. If a key may have been exposed, rotate it. The grace period lets you update your deployment without downtime.
- Don’t hardcode keys. Use environment variables or a secrets manager.
- Scope keys by name. Use descriptive names (
production-scraper,ci-e2e,staging-monitor) so you can identify usage in theby_keybreakdown.