Authentication
All API requests require authentication using an API key.
API Key Format
Include your API key in the Authorization header:
Authorization: Bearer sk-your-api-key
Security Features
Key Hashing
API keys are hashed using SHA-256 before storage. The full key is shown only once at creation time.
IP Whitelisting
Restrict API key usage to specific IP addresses:
- In Dashboard > API Keys, set an allowlist when creating a key or use Edit IP allowlist on an existing key.
- Enter one IPv4, IPv6, or CIDR range per line, up to 10 rules. For example:
203.0.113.10,198.51.100.0/24, or2001:db8::/32. - Use the caller's public IP. For server requests, this is the server's outbound public IP; in Playground, this is the visitor's public IP.
- Leave the field blank, or clear the rules and save, to allow all IPs.
Saved changes apply to subsequent requests. A request from an IP outside the allowlist returns 403 ip_not_allowed before credits are charged or a task is created or changed. Tasks already accepted continue normally after the allowlist changes.
Spend Limits
Set spending caps to prevent unexpected charges:
| Limit | Description |
|---|---|
| Hourly | Maximum credits consumed per hour |
| Daily | Maximum credits consumed per day |
| Total | Maximum total credits this key can ever consume |
Key Management
- Disable: Temporarily deactivate a key without deleting it
- Delete: Permanently remove a key
- Rotate: Create a new key and disable the old one
Error Responses
| Status | Code | Description |
|---|---|---|
| 401 | invalid_api_key | Key is invalid, disabled, or deleted |
| 403 | ip_not_allowed | Request IP not in allowlist |
| 429 | spend_limit_exceeded | Key spend limit reached |