Skip to main content

Bearer Token Authentication

All API v2 endpoints (except the health check) require a Bearer token in the Authorization header:

Getting an API Key

  1. Go to the Chatbase Dashboard
  2. Go to Workspace settings → API keys
  3. Click Create API Key
  4. Copy and securely store the generated key
API keys grant full access to your workspace. Never expose them in client-side code, public repositories, or browser network requests.
API v2 requires a Chatbase Standard Plan or above. Requests from accounts on unsupported plans 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:

Handling Rate Limits

When you exceed the rate limit, the API returns a 429 status code:
Use the Retry-After header to determine how long to wait before retrying:

Request ID

Every response includes an x-request-id header containing a unique identifier for the request. When contacting support about an error, always include this value to help with debugging.