An error has a status other than 200 and a JSON body:
{ "error": "no_credits", "message": "The Lumi credits on this account are used up for now (weekly limit)." }
Read error in code; message is in English and may change.
All errors
| Status | error |
When | What to do |
|---|---|---|---|
| 400 | json |
The body isn’t JSON. | Send a JSON object. |
| 400 | no_text |
text is missing or empty, or there’s nothing to answer. |
Send text. |
| 401 | no_key |
No Authorization: Bearer lumi_mcp_… header, or not a key’s shape. |
Send the key. See Keys. |
| 401 | bad_key |
The key was unlinked or never made. | Make a new key. |
| 402 | no_credits |
The credits are used up: the trial is over, or the weekly or monthly limit is reached. | The person can choose a plan or buy credits. |
| 403 | no_plan |
Lumi isn’t on for this account yet. | Open Lumi once at ai.avenpa.com. |
| 403 | terms |
New Lumi terms wait for the person’s OK. | They open ai.avenpa.com and agree. |
| 404 | not_found |
No such endpoint. | Check the path. |
| 404 | no_job |
No job with that id; only the last 10 are kept. | Start a new ask. |
| 405 | (no body) | Wrong method. The allow header says which. |
POST to ask, GET with an id. |
| 409 | busy |
Lumi is busy with another ask for this account. | Wait a moment and send it again. |
| 409 | in_app |
The text looked like a password while Lumi waits for one in its app. | The person types it in the Lumi app. |
| 415 | json |
Content-Type isn’t application/json. |
Set the header. |
| 429 | rate_limited |
Over 40 asks a minute for the account, or 300 requests a minute from the address. | Wait, then retry with a longer wait each time. |
| 500 | failed |
Lumi couldn’t answer; the message says why. | Try again; if it repeats, tell us. |
| 503 | busy |
Something went wrong on our side. | Try again in a moment. |
Answers that aren’t errors
These come with status 200:
busy: trueandwait: true: the answer isn’t ready yet. See Long jobs.failed: trueon a job’s answer: the task ended in an error, andreplysays so.
Order of checks
The API checks, in order: the path, the method, the key’s shape, the per-address limit, the key, the account and its terms, then the per-account limit, the content type, the JSON and text. So a request with two problems reports the first one.