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:

JSON
{
  "error": "out_of_credits",
  "message": "Not enough credits for this generation.",
  "topup_url": "https://api.oneupai.com/account"
}
  • error is the code. It never changes and is never translated, in any language. Branch on it.
  • message is 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 some 503 answers, carry a Retry-After header with the seconds to wait.
  • An unexpected failure answers internal_error with a request_id. Quote it to support: it finds the exact request in our logs. Every answer also carries it in the x-request-id header.

Every code at a glance #

CodeHTTPCredits
invalid_request400Not charged
invalid_key401Not charged
out_of_credits402Not charged
entitlement_required403Not charged
plan_required403Not charged
account_frozen403Not charged
account_disabled403Not charged
credit_debt403Not charged
storage_quota_exceeded403Not charged
preview_quota_exhausted403Not charged
allowance_exhausted403Not charged
content_quarantined403Not charged
team_access_unavailable403Not charged
team_access_not_allowed403Not charged
team_access_ended403Not charged
unknown_model404Not charged
not_found404Not charged
idempotency_conflict409Not charged
version_conflict409Not charged
result_expired409The first charge stands
territory_reserved409Not charged
upload_in_use409Not charged
model_retired410Not charged
payload_too_large413Not charged
invalid_input422Refunded
operation_unavailable422Not charged
rate_limited429Not charged
daily_limit_reached429Not charged
internal_error500Never charged twice
upstream_error502Refunded
unavailable503Not 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 detail and the Alias's input_schema from GET /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 its credits and price_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_url on 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_day or plan_period), allowance_seconds, used_seconds, remaining_seconds, and renews_at when 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_at and account_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, against GET /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 is COMPLETED answers not_found with status, 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_found with missing_inputs, the ids it could not use.
  • 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 with parent_version_id set to current_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_id and unit_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 of held (a hold names it), brand_kit (your Brand Kit uses it) or in_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 (or null).
  • 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_unreadable and listing_unreachable for a property listing; page_paywalled, page_not_article, page_unreadable and page_unreachable for 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_operations for the render Alias in GET /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-After header, 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 the Retry-After header, 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 the x-request-id header. 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: detail is replay_of_failed when 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 no detail.
  • 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-After header, and a request_id when 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.