Errors
One error shape, with a stable code for each case.
{
"error": {
"type": "invalid_request",
"code": "invalid_param",
"message": "`size` must be one of \"1K\", \"2K\", \"4K\".",
"param": "size",
"request_id": "req_eTC1oUA_deunDPR2"
}
}Match on code; message is for people and may change. param names the field at fault. Include request_id (also in the Luce-Request-Id header) when you contact us.
| code | HTTP | Meaning |
|---|---|---|
missing_api_key | 401 | No Authorization: Bearer header. |
invalid_api_key | 401 | The key is malformed, unknown or revoked. |
api_not_enabled | 403 | The developer API isn't switched on for this studio. |
scope_missing | 403 | The key lacks the scope this endpoint needs. |
team_suspended | 403 | The studio's account is suspended. |
mode_unavailable | 403 | This mode isn't offered on the API. |
invalid_body | 400 | The body isn't valid JSON or misses a required field. |
invalid_param | 400 | A field has a wrong type or an out-of-range value; param names it. |
invalid_input | 400 | An input image or video can't be used (unreachable, too large, wrong type, or an upload not completed). |
file_too_large | 400 | The direct upload is over 4 MB: use POST /v1/files/uploads instead. |
invalid_idempotency_key | 400 | The Idempotency-Key header isn't 1–255 printable characters. |
not_found | 404 | No such job, file or webhook for this studio. |
idempotency_conflict | 409 | The Idempotency-Key was used before with a different body. |
not_cancellable | 409 | The job has started; only queued jobs can be cancelled. |
insufficient_balance | 402 | Prepaid AI Credits can't cover the job and pay as you go is off. |
monthly_cap_reached | 402 | The job would pass this month's pay-as-you-go cap. |
payment_past_due | 402 | Pay as you go is paused after a failed payment. |
rate_limited | 429 | Too many requests; wait for Retry-After seconds. |
maintenance | 503 | Luce is briefly down for maintenance; retry shortly. |
internal_error | 500 | Something went wrong on our side; safe to retry with the same Idempotency-Key. |