Bearer Token Authentication
All API v2 endpoints (except the health check) require a Bearer token in theAuthorization header:
Getting an API Key
- Go to the Chatbase Dashboard
- Navigate to Workspace Settings → API Keys
- Click Create API Key
- Copy and securely store the generated key
API v2 requires a paid Chatbase plan. Requests from free-plan accounts will be rejected.
Example Request
Rate Limiting
The API enforces a rate limit of 100 requests per 10-second sliding window, scoped per API key and IP address.Rate Limit Headers
Every response includes rate limit headers so you can track your usage:| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum number of requests allowed in the window (100). |
X-RateLimit-Remaining | Number of requests remaining in the current window. |
X-RateLimit-Reset | Unix timestamp in milliseconds when the current window resets. |
Retry-After | Seconds to wait before retrying. Only present on 429 responses. |
Handling Rate Limits
When you exceed the rate limit, the API returns a429 status code:
Retry-After header to determine how long to wait before retrying:
Request ID
Every response includes anx-request-id header containing a unique identifier for the request. When contacting support about an error, always include this value to help with debugging.