Generating an API key
Create a new key
Click Create new key. Enter a descriptive name so you can identify the key later (for example,
CI pipeline or Personal scripts).Set an optional expiration
Choose an expiry period from the dropdown: 7 days, 30 days, 90 days, 1 year, or Never expires. You can always revoke a key manually before it expires.
Key format
Every API key follows this format:crypto.randomBytes(24), giving 192 bits of entropy.
Key lifecycle
| Status | Description |
|---|---|
| Active | The key is valid and can authenticate API requests |
| Expired | The expiresAt date has passed; the key is no longer accepted |
| Revoked | You manually revoked the key; it is no longer accepted |
Using your API key
Include your API key in theAuthorization header of every request using the Bearer scheme.
Rate limits
Authenticated requests (those that include a valid API key) are limited to 100 requests per 10 minutes. Unauthenticated requests are limited to 10 requests per 10 minutes. When you exceed the limit, the API responds with429 Too Many Requests. The response includes rate limit headers so you can track your usage:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the window |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | Unix timestamp (ms) when the window resets |
Security best practices
Store your API key in an environment variable and read it at runtime. Never hard-code it in source files.JavaScript
Python
Revoking a key
To revoke a key, go to API Key Management in your dashboard, find the key by name, and click Revoke. The key is immediately invalidated and will be rejected on any subsequent request.Next steps
API reference
Full documentation for all available endpoints.
Authentication
Details on how API key authentication works.
Rate limits
Understand rate limit windows and response headers.
Custom slugs
Use the API to create branded short links.