Authentication
All public endpoints require a Bearer API key. The sections below cover headers, error formats, and billing.
API keys
Every public endpoint requires:
Authorization: Bearer YOUR_API_KEYCreate and manage keys in the dashboard under API Keys. Keep keys secret — do not commit them to repositories.
If the header is missing or the key is invalid, the server returns 401.
Common headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <api-key> |
Content-Type | For JSON bodies | application/json |
X-Request-ID | No | Client request ID; server generates a UUID if omitted |
Error formats
Plain JSON (browsing, transcribing, /api/chat)
{ "error": "..." }OpenAI-style (/v1/chat/completions)
{
"error": {
"message": "...",
"type": "invalid_request_error",
"param": null
}
}HTTP status codes
| Code | When |
|---|---|
| 400 | Invalid JSON, missing required fields, validation errors |
| 401 | Missing or invalid API key |
| 402 | Insufficient credits |
| 403 | Access denied (e.g. another account’s task, custom scripts not allowed) |
| 404 | Task or resource not found |
| 405 | Wrong HTTP method |
| 413 | Audio file too large (transcribing, max 50 MB) |
| 504 | Task or inference timeout |
Billing
Task-creating endpoints (inference, browsing async/sync, transcribe async/sync) reserve credits before execution. If your account balance is too low, the server returns 402 with "Insufficient credits".