Errors
On this page
When a request fails you get a stable code. By the end of this page you will know what every code means, what to do about it, and whether any credits were spent.
The shape of an error #
Every error is JSON:
{
"error": "out_of_credits",
"message": "Not enough credits for this generation.",
"topup_url": "https://api.oneupai.com/account"
}erroris the code. It never changes and is never translated, in any language. Branch on it.messageis a short English sentence for your logs. It can change; never match on it.- Some codes add fields. Each section below lists them.
- A
429, and some503answers, carry aRetry-Afterheader with the seconds to wait. - An unexpected failure answers
internal_errorwith arequest_id. Quote it to support: it finds the exact request in our logs. Every answer also carries it in thex-request-idheader.
Every code at a glance #
| Code | HTTP | Credits |
|---|---|---|
invalid_request | 400 | Not charged |
invalid_key | 401 | Not charged |
out_of_credits | 402 | Not charged |
entitlement_required | 403 | Not charged |
plan_required | 403 | Not charged |
account_frozen | 403 | Not charged |
account_disabled | 403 | Not charged |
credit_debt | 403 | Not charged |
storage_quota_exceeded | 403 | Not charged |
preview_quota_exhausted | 403 | Not charged |
allowance_exhausted | 403 | Not charged |
content_quarantined | 403 | Not charged |
team_access_unavailable | 403 | Not charged |
team_access_not_allowed | 403 | Not charged |
team_access_ended | 403 | Not charged |
unknown_model | 404 | Not charged |
not_found | 404 | Not charged |
idempotency_conflict | 409 | Not charged |
version_conflict | 409 | Not charged |
result_expired | 409 | The first charge stands |
territory_reserved | 409 | Not charged |
upload_in_use | 409 | Not charged |
model_retired | 410 | Not charged |
payload_too_large | 413 | Not charged |
invalid_input | 422 | Refunded |
operation_unavailable | 422 | Not charged |
rate_limited | 429 | Not charged |
daily_limit_reached | 429 | Not charged |
internal_error | 500 | Never charged twice |
upstream_error | 502 | Refunded |
unavailable | 503 | Not charged, or refunded |
"Not charged" means the request was refused before any charge. "Refunded" means it was charged when we accepted it and the credits came back at once, exactly once.
400 #
invalid_request #
The request is malformed or breaks the model's input rules: the body is not JSON, a field is missing, has the wrong type or is out of bounds, or the Idempotency-Key header is missing.
- Extra fields:
detail, which names what is wrong, such as"Idempotency-Key header is required"or"input must have required property 'prompt'". - What to do: fix the request using
detailand the Alias'sinput_schemafromGET /v1/models, then send it again. You can keep the same retry key: nothing was created. - Credits: not charged.
401 #
invalid_key #
The API key is missing, mistyped, revoked, or past the overlap after a rotation. The answer is the same in every case.
- What to do: send
Authorization: Bearer oneup_live_…with a current key. You can make a new key on your account page. - Credits: not charged.
402 #
out_of_credits #
Your balance is smaller than the price of this request.
- Extra fields:
topup_url, your account page;required, the price of this request in credits;packs, the credit packs you can buy there, each with itscreditsandprice_cents(an empty list when none is on sale). - What to do: add credits from your account page, or wait for your plan's next month of credits. Then send the same request with the same retry key.
- Credits: not charged.
403 #
entitlement_required #
Your subscription has ended: it was canceled, or a payment failed and the seven days of grace have passed.
- Extra fields:
account_url. - What to do: renew on your account page; the same keys work again. Checking status, reading results and downloading your files still work in the meantime.
- Credits: not charged.
plan_required #
This key belongs to an account that is no longer on an API plan, Concierge or Concierge Plus. Only keys of accounts on those plans can start work through the API.
- Extra fields:
account_url. - What to do: move the account back to Concierge or Concierge Plus; the key works again.
- Credits: not charged.
account_frozen #
The account is frozen for now, for example while a payment dispute is open.
- Extra fields:
account_url. - What to do: see your account page. Reading your results still works.
- Credits: not charged.
account_disabled #
The account is disabled: its sign-in was removed or blocked. Every key and session of the account answers this.
- What to do: write to video@oneupai.com.
- Credits: not charged. The account's credits stay.
credit_debt #
You have credit debt: a payment for credits you already spent was reversed.
- Extra fields:
account_url. - What to do: settle it from your account page; new work is accepted again once it is paid.
- Credits: not charged.
storage_quota_exceeded #
Your account has reached its storage quota, so new uploads, new jobs and new Timeline versions are refused.
- Extra fields:
account_urlon most calls. - What to do: delete assets, uploads or Projects you no longer need, or release a hold. Work you already paid for is never deleted because of this.
- Credits: not charged.
preview_quota_exhausted #
A Preview allowance is used up. Previews are free, and limited by rendered seconds per Project, per day and per billing month.
- Extra fields:
scope(project,customer_dayorplan_period),allowance_seconds,used_seconds,remaining_seconds, andrenews_atwhen that allowance renews (a Project's own allowance does not). - What to do: wait until
renews_at, or make a shorter Preview. A final is not limited by this. - Credits: not charged.
allowance_exhausted #
A limit of a feature in OneUpAI's own Agents, such as connected social accounts, is used up. The endpoints in these pages never answer with this code.
- Extra fields:
allowance,limit,renews_atandaccount_url. - Credits: not charged.
content_quarantined #
The file was removed after a review and is not available: no address, no download, and it cannot be used in a new request.
- Extra fields: none.
- What to do: contact support.
- Credits: not charged. A job that was already running when this happened is refunded.
team_access_unavailable #
The account's plan does not include Team access, or the plan is not active. Only an account on a plan that includes it can turn Team access on or off. The endpoints in these pages never answer with this code.
- Extra fields: none.
- What to do: nothing; the plan decides it.
- Credits: not charged.
team_access_not_allowed #
A OneUpAI staff member working in the account through Team access asked for something only the account owner can do: change the plan, buy an add-on, accept the Terms, turn Team access on or off, or make a voice. Nothing was done. The endpoints in these pages never answer with this code.
- Extra fields: none.
- What to do: the account owner does it.
- Credits: not charged.
team_access_ended #
A OneUpAI staff member's Team access to the account ended: the staff member was removed, or the account no longer has Team access on. Nothing was done. The endpoints in these pages never answer with this code.
- Extra fields: none.
- What to do: nothing; the account owner decides it.
- Credits: not charged.
404 #
unknown_model #
No Alias by that name is available to you.
- What to do: check the name, including the
oneup/part, againstGET /v1/models. - Credits: not charged.
not_found #
What you asked for, such as a ticket, an asset, an upload, a Project or a render, does not exist or is not yours. The answer is the same either way.
- Extra fields: two cases add one.
- Asking
GET /v1/queue/result/{ticket}before the work isCOMPLETEDanswersnot_foundwithstatus, the current status. Keep asking for the status, then fetch the result. - A render whose Timeline names files that are not yours, or not ready, answers
not_foundwithmissing_inputs, the ids it could not use.
- Asking
- What to do: check the id, and that it was made with a key of this account.
- Credits: not charged.
409 #
idempotency_conflict #
You sent a retry key again with a different request.
- What to do: make a new retry key for each new request. To retry the first request, send exactly the same body.
- Credits: this request is not charged; the first one stands.
version_conflict #
Someone saved a newer version of this Project's Timeline before you.
- Extra fields:
current_version, the newest version's id. - What to do: read the newest version with
GET /v1/projects/{project_id}/timeline, apply your change to it, and send it withparent_version_idset tocurrent_version. - Credits: not charged; saving a Timeline is free.
result_expired #
You retried a sync request more than 15 minutes after its first answer, so we no longer hold the output to send again.
- What to do: if you still need the output, run the request again with a new retry key. That is a new charge.
- Credits: the first charge stands; the work ran.
territory_reserved #
Belongs to a feature in OneUpAI's own Agents. The endpoints in these pages never answer with this code.
- Extra fields:
vertical_idandunit_ids. - Credits: not charged.
upload_in_use #
You asked to delete an upload that is still in use: a hold, your Brand Kit or a job still running names it. Nothing was deleted.
- Extra fields:
reasons, a list ofheld(a hold names it),brand_kit(your Brand Kit uses it) orin_progress(a job or a render still running was made from it). - What to do: release the hold with
DELETE /v1/uploads/holds/{name}, take the upload out of your Brand Kit, or wait for the job to finish, then delete it again. - Credits: not charged; deleting is free.
410 #
model_retired #
This Alias was replaced, and its notice period has ended.
- Extra fields:
replacement, the Alias to use instead (ornull). - What to do: send your request to the replacement.
- Credits: not charged.
413 #
payload_too_large #
The request body is over 1 MB.
- What to do: upload files first and send their
file_url, instead of putting file contents in the body. - Credits: not charged.
422 #
invalid_input #
We accepted the request, but the input could not be used: the model refused it, or the page you asked us to read could not be read.
- Extra fields:
detail, a short reason. The page readers use these codes:listing_unreadableandlisting_unreachablefor a property listing;page_paywalled,page_not_article,page_unreadableandpage_unreachablefor an article. - What to do: change the input and send it with a new retry key.
- Credits: refunded.
operation_unavailable #
The Timeline asks for an operation this render Alias does not offer.
- Extra fields:
detail, which names it, such as"operation not available: fit.smart_crop". - What to do: check
supported_operationsfor the render Alias inGET /v1/models, and change the Timeline. - Credits: not charged.
429 #
rate_limited #
You sent requests faster than your plan's rate limit, reached a limit a feature counts on its own, or have two Previews running already. The daily credit limit has its own code, daily_limit_reached.
- Extra fields: the
Retry-Afterheader, in seconds. - What to do: wait that long, then send the same request with the same retry key.
- Credits: not charged.
daily_limit_reached #
This request would take the credits your account spent today past its daily credit limit. The count starts again at 00:00 UTC.
- Extra fields:
limit, the daily limit in credits;renews_at, when the count starts again (the next 00:00 UTC); and theRetry-Afterheader, the seconds until then. - What to do: send it again after
renews_at, with the same retry key. Nothing ran. - Credits: not charged.
500 #
internal_error #
Something went wrong on our side that we did not expect. The answer says nothing about the cause.
- Extra fields:
request_id, the same id as thex-request-idheader. It names the exact request in our logs. - What to do: send the same request again with the same retry key. If it keeps failing, send us the
request_id. - Credits: never charged twice. If we accepted the work before the failure, the same retry key returns it instead of charging again.
502 #
upstream_error #
The work failed on our side. GET /v1/queue/result/{ticket} also answers this for a generation that ended FAILED.
- Extra fields:
detailisreplay_of_failedwhen you sent a retry key again whose sync run had already failed: nothing ran again and nothing was charged. A failure as it happens has nodetail. - What to do: try again with a new retry key. The same key would return the same failed generation.
- Credits: refunded.
503 #
unavailable #
We are not taking this kind of request for a moment: during maintenance, when a safety limit trips, or when a service we depend on is down.
- Extra fields: sometimes a
Retry-Afterheader, and arequest_idwhen a service we depend on did not answer. - What to do: wait, then send the same request with the same retry key.
- Credits: not charged; if it comes after we accepted the work, the charge is refunded.
A 403 that is not JSON #
If a 403 comes back as plain text instead of JSON, the request was stopped before it reached the API, often because of the User-Agent header your HTTP library sends by default. Set a User-Agent that names your app, such as my-app/1.0, and send the request again.