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.

StatustypeWhenWhat to do
400invalid_requestThe body is not JSON, or "text" is missing or not a string.Send {"text": "..."} with Content-Type: application/json.
401invalid_api_keyThe key is missing, unknown or revoked.Send Authorization: Bearer <key>. Create a key in the console.
402insufficient_creditThe workspace's balance is below this request's cost.Add credit in the console. Nothing is charged for the failed request.
403account_suspendedThe workspace is suspended.Contact [email protected].
413text_too_large"text" is longer than 100,000 characters.Split the document and send it in parts.
429rate_limitedA per-key, per-workspace or per-IP limit was reached.Wait for the number of seconds in the Retry-After header, then retry.
500internal_errorSomething 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.