API reference
Errors
Errors use a single JSON shape and a stable type string. Match on type, not on the message.
{
"error": {
"type": "insufficient_credit",
"message": "Not enough credit for this request. Add credit to continue: https://platform.getellora.com/01jc8m2w5r3x9t7q4k6n0b8d2f/billing",
"request_id": "req_01jc8m3y6q0v7k2h9d4x5n8r1t"
}
}Every response, success or failure, carries an X-Request-Id header with the same value. Quote it when you contact support. Error bodies never echo the text you sent.
| Status | type | When | What to do |
|---|---|---|---|
| 400 | invalid_request | The body is not JSON, or "text" is missing or not a string. | Send {"text": "..."} with Content-Type: application/json. |
| 401 | invalid_api_key | The key is missing, unknown or revoked. | Send Authorization: Bearer <key>. Create a key in the console. |
| 402 | insufficient_credit | The workspace's balance is below this request's cost. | Add credit in the console. Nothing is charged for the failed request. |
| 403 | account_suspended | The workspace is suspended. | Contact [email protected]. |
| 413 | text_too_large | "text" is longer than 100,000 characters. | Split the document and send it in parts. |
| 429 | rate_limited | A per-key, per-workspace or per-IP limit was reached. | Wait for the number of seconds in the Retry-After header, then retry. |
| 500 | internal_error | Something failed on our side. | Retry. You are not charged for a failed request. Quote the request_id if you contact us. |
Charging and failures
A request is charged only when it succeeds. Requests rejected before processing (400, 401, 403, 413, 429) cost nothing, and a 500 is refunded automatically.