Authentication
Authenticate API requests using API keys.
API Keys
All API requests must include an API key in the Authorization header:
curl https://api.your-domain.com/v1/chat \
-H "Authorization: Bearer YOUR_API_KEY"Creating API Keys
- Navigate to Account > API Keys
- Click Create Key
- Give it a descriptive name
- Copy the key — it won't be shown again
Key Types
| Type | Permissions | Use Case |
|---|---|---|
| Secret Key | Full access | Server-side integrations |
| Publishable Key | Chat only | Client-side embed widgets |
Security Best Practices
- Never expose secret keys in client-side code
- Use environment variables to store keys
- Rotate keys periodically
- Use publishable keys for browser-facing code
Rate Limiting
API keys are rate-limited based on your plan. When you exceed the limit, requests return 429 Too Many Requests with a Retry-After header.
{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Try again in 30 seconds."
}
}