Every error has the same body and a matching HTTP status:
{
|
"error": {
|
"code": "insufficient_balance",
|
"message": "Balance is too low for this task.",
|
"param": null,
|
"request_id": "req_…"
|
}
|
} |
code is for a program and message is safe to show to a person. param names the field at fault when there is one, as a path such as input.resolution. Quote request_id, which is also the X-Request-Id header of every response, when you ask for help.
Request errors
A request that Opsis refuses answers with one of these. Nothing is charged and no task is created.
Which to retry
Retry only 429, 500 and 503, with backoff, and reuse the same Idempotency-Key. A 429 rate_limited carries Retry-After. Do not retry the others: the same request would be refused again.
A failed check of a LoRA, or a missing linked image, is 400 invalid_request with param naming the field. If Civitai cannot be reached, the answer is 503 dependency_unavailable.
Task errors
A task that was accepted and then did not succeed has the status FAILED and one of these codes in error.code. It is refunded, except where a model charges for its own refusal.
Today no model charges for its own refusal: pricing.refusals_charged is false on every model in the model list. Read the field rather than assuming it, since a model may set it later.
A task is tried on one backend, once. A backend failure ends it as FAILED and refunded; you submit it again. See Tasks for the statuses.
Ignore what you do not know
New codes and fields can be added without a new version. Treat an unknown code like a general failure, and ignore fields you do not use.
Video
A video task fails with the same codes. These are the video cases; Video has them with what to do.
unsupported_combination(a request error): a length the model does not offer, an aspect ratio it does not offer, or a field it does not list. Nothing is charged.invalid_asset(a task error): the first frame could not be downloaded at the start, was too large or was not an image, or an upload it used was gone.content_rejectedandgeneration_failed(task errors): a model may refuse a first frame or a prompt. A refusal that Opsis recognises as one ends the task ascontent_rejected. Until Opsis has recorded the texts the outside providers use, a refusal from one of them can also end it asgeneration_failed. For a video,generation_failedreads "The engine could not produce a video." Both are refunded in full, and the same prompt and first frame will be refused again.timeoutandbackend_unavailable(task errors): the clip ran out of time, or no backend took it in time. Both are refunded.concurrency_limit(a request error): the account has the most unfinished tasks it may have. A video that is over its running limit is not an error; it waits asPENDING.