Concepts

On this page

By the end of this page you will know how OneUpAI charges for work, runs it, stores what it makes and gives credits back when it fails. Each section is short, and every term links to the glossary.

Credits #

Every charged call is priced in credits. Concierge, one of the two API plans, gives you 28,000 credits each month for $297, so one credit costs about one cent ($0.0106). Concierge Plus gives you 48,000 for $497, so a credit costs a little less ($0.0104).

What you makeCreditsAbout
A picture from oneup/image-generate-lite1$0.01
A narration from oneup/speech-standard9$0.09
A 30-second finished video from oneup/render-timeline45$0.46
A 5-second video from oneup/video-animate-lite100$1.02
  • When you pay. Credits are taken once, when we accept the work. A request we refuse is never charged.
  • Which credits go first. Your plan's credits arrive each month and expire when the next month's arrive, so we spend them first. Credits you buy on top of your plan do not expire.
  • Prices. Each Alias lists its price in GET /v1/models under pricing, and in the catalog. A coming change shows in pricing.pending_effective_at before it takes effect.
  • Running low. If your balance is smaller than the price, the request is refused with 402 out_of_credits before any charge. Its topup_url points to your account page.
  • Your balance. GET /v1/me returns credits.total, and used_this_period with the credits used since your plan's month began.

Models are Aliases #

In these pages a model is an Alias: a named, versioned contract such as oneup/image-generate-lite. It says what you send, what you get back and how it behaves. It never says which provider does the work, and no response, header or link does either.

That is on purpose. Your code depends on the contract, not on a provider, so we can repair or improve what runs behind an Alias without breaking you. A change that would break your code ships as a new Alias. The old one keeps working for at least 90 days, then answers 410 model_retired with its replacement.

OneUpAI is not a model router. If you need one specific named model from one specific company, a service that sells that model by name will suit you better. What OneUpAI gives you instead:

  • one key for every medium: pictures, video, voice, music and finished videos
  • results that stay in your account
  • charges that are never doubled on a retry, and refunds when we fail
  • OneUpRender, the engine that turns a Timeline into the same video every time
  • tested recipes that turn the parts into finished videos

GET /v1/models lists every Alias with alias, version, category, execution, description (in English and Spanish), example_input, input_schema, output_schema (what a finished job returns), run_time (typical and slow-case seconds, or null until measured) and pricing. Each entry is also the model's card: name, group (building_block, render or agent_step, listed in that order), status, previously (its earlier names), input_modalities and output_modalities, limits (the bounds that apply, as numbers), output (what comes back: file type, resolution, frame rate, sound, how long the link works), best_for, not_for, example, price_examples (worked in credits and dollars at the Concierge rate) and changelog.

Sync and queued #

An Alias runs in one of three ways. The execution field in GET /v1/models says which: queue, sync or render.

Queued (pictures, video and audio). POST /v1/queue/submit/{alias} answers at once with a ticket. You then ask GET /v1/queue/status/{ticket} how it is going until it is done, and fetch GET /v1/queue/result/{ticket}. Status and result calls are free. Ask every 2 seconds for the first 30 seconds, then every 5 seconds with a little random spread.

POST /v1/queue/submit/{alias}  ──►  { "ticket", "status": "QUEUED" }

GET /v1/queue/status/{ticket}:
  PENDING ─► QUEUED ─► IN_PROGRESS ─► FINALIZING ─► COMPLETED ─► GET /v1/queue/result/{ticket}
     │                                                └─► or FAILED, with "refunded": true
     └─► UNCERTAIN (keep asking)
statusWhat it means
PENDINGAccepted and charged; we are starting it.
UNCERTAINWe could not confirm that the work started. Keep asking: within about 20 minutes it either goes ahead or ends FAILED with a refund. You are never charged twice.
QUEUEDWaiting its turn.
IN_PROGRESSRunning.
FINALIZINGDone; we are saving the files to your account.
COMPLETEDReady: fetch the result.
FAILEDIt failed and the charge was refunded: the status carries "refunded": true.

A submit that cannot confirm the start answers 202 with "status": "UNCERTAIN". Treat it like any ticket and keep asking.

Sync (text). POST /v1/run/{alias} waits up to 60 seconds and answers {"alias": "…", "output": …}. The output is text or a JSON object, as each Alias's description says. If there is no answer within 60 seconds, the charge is refunded and the call answers 502 upstream_error.

Render (finished videos). The render Aliases, oneup/render-timeline and oneup/render-captions, have their own calls, described below.

The retry key #

Networks drop answers. If a charged request times out, you cannot know whether we did the work. The retry key makes it safe to send the request again.

  • Send an Idempotency-Key header, a new random id, with every POST /v1/queue/submit/…, POST /v1/run/… and POST /v1/renders. Without it the request is refused with 400 invalid_request.
  • Same key, same body: you get the same generation back and are never charged again. A queued submit answers with the same ticket and its current status. A sync run answers with the same output and "replayed": true for 15 minutes after the first answer; after that it answers 409 result_expired, and the first charge stands.
  • Same key, different body: 409 idempotency_conflict. Nothing is charged; the first request stands.
  • Keys belong to your account. Another account's keys never collide with yours.

Make the key once per piece of work, store it with that work, and reuse it on every retry: after a dropped connection, a timeout, or a 429 rate_limited once its Retry-After has passed. To run the same work again on purpose, use a new key; that is a new charge.

Files: uploads, assets and links that expire #

There are three kinds of files, and you reach each through an expiring link. The links expire; the files do not. Store ids, not links, and ask for a fresh link when you need one.

Uploads are files you send us, such as photos for a video.

  1. POST /v1/uploads/initiate with content_type (an image, video or audio type), file_name and size_bytes. The answer has upload_id, upload_url and file_url.
  2. PUT the bytes to upload_url within the hour. A video that can't be read (cut short, never finished, or with no picture) is refused with 422 and {"error": "upload_unreadable"}, and it is not kept.
  3. Put file_url in any request that takes a file, or {"$asset": "<upload_id>"} in a Timeline.

A file can be up to 2 GB. Over 64 MiB the answer adds parts, and the file goes up in pieces. Uploading is free, and the bytes count toward your storage quota (100 GB on Concierge and on Concierge Plus). A file_url works for 24 hours; POST /v1/uploads/urls with your upload_ids gives fresh ones. An upload that nothing has used for 30 days is deleted. To keep uploads longer, put them under a hold with PUT /v1/uploads/holds/{name}, and release it with DELETE /v1/uploads/holds/{name}. To delete an upload yourself, send DELETE /v1/uploads/{upload_id}; while a hold, your Brand Kit or a job still running names it, the answer is 409 upload_in_use with its reasons, and nothing is deleted.

Assets are files we make for you: a picture, a video or a sound from a generation, or a finished video. They stay in your account until you delete them with DELETE /v1/assets/{asset_id}. Each url in a result works for one hour. GET /v1/assets/{asset_id}/url answers with a fresh url, a download_url that saves the file under its name, the content_type, and duration_ms for sound and video (null for a picture). For many files at once, POST /v1/assets/urls with up to 50 asset_ids gives the same answer for each, in your order, as one read; an id that is not yours comes back in refused.

Annotations are JSON results, such as a word-timed transcript from oneup/speech-transcribe or a beat map from oneup/audio-beats. The result has an annotation with annotation_id, size_bytes and a url to read it. A Timeline uses one as {"$annotation": "<annotation_id>"}.

When the storage quota is full, new uploads and new jobs are refused with 403 storage_quota_exceeded. Work you already paid for is never thrown away because of it. If your subscription ends, you can still read and download your files for 30 days; after that they are deleted. Subscribing again within those 30 days keeps them.

Refunds #

You are charged once, when we accept the work: a queued submit, a sync run or a final video. An error either comes before any charge or comes with a refund. The errors page says which for every code.

You get your credits back, exactly once, when:

  • a queued generation ends FAILED (its status carries "refunded": true)
  • a submit or a sync run answers 422 invalid_input or 502 upstream_error
  • a sync run has no answer within 60 seconds
  • an UNCERTAIN generation cannot be shown to have started
  • a final video fails or runs out of time

You do not get credits back for:

  • 409 result_expired: the work ran and was charged; only our short-lived copy of the answer expired
  • a finished result you do not like
  • Undo in the Studio: Undo removes a result from your video but does not return its credits

When a FAILED status also carries a refusal, the input was the reason: no_person (a cutout found no person in the clip) or no_speech (a transcription heard no spoken words). The charge is still refunded.

Projects, Timelines and renders #

To make a finished video, you describe it as a Timeline: JSON that lists segments (photos and clips with their timing), text, sound and captions. OneUpRender turns it into an MP4. The same Timeline always gives the same video, and it never invents footage.

  1. POST /v1/projects with {"agent_slug": "oneup/render-timeline"} answers 201 with a project_id. A Project holds one video's versions.
  2. PUT /v1/projects/{project_id}/timeline with {"timeline": {…}} answers 201 with version_id, parent_version_id and timeline_hash. A version never changes. To edit, send a new one with parent_version_id set to the version you started from. If someone saved a newer version first, the answer is 409 version_conflict with current_version: reload it, apply your change again and resend.
  3. POST /v1/renders, with a retry key, and {"alias": "oneup/render-timeline", "project_id": "…", "version_id": "…", "kind": "preview"} answers 202 with render_id, ticket, kind and "status": "QUEUED".
  4. Ask GET /v1/renders/{render_id} until status is COMPLETED or FAILED.

A render is one of two kinds:

  • Preview ("kind": "preview"). Free. Previews are limited by rendered seconds per Project, per day and per billing month, and to two at a time. When one runs out, the answer is 403 preview_quota_exhausted with the scope, the remaining_seconds and, where it renews, renews_at. A finished Preview carries preview_url (fetch the render again for a fresh one) until preview_expires_at, 72 hours later. A Preview of a Timeline longer than 3 minutes is its first minute: it renders the first 60 seconds, ending in a half-second fade, counts 60 seconds against your allowances, and carries preview_window_ms: 60000. The final always renders the whole Timeline. You can stop a running Preview with POST /v1/renders/{render_id}/cancel.
  • Final ("kind": "final"). Charged at the Alias's price: for oneup/render-timeline, 15 credits for each started 10 seconds of video, so a 34-second video is 60 credits. It is charged once when accepted, cannot be canceled, and is refunded exactly once if it fails or runs out of time. When it is COMPLETED, the render carries asset_id, and GET /v1/queue/result/{ticket} returns the MP4 like any generation.

Before any charge, both kinds are checked. A Timeline operation the render Alias does not offer is refused with 422 operation_unavailable; each render Alias lists its operations in supported_operations in GET /v1/models. A file the Timeline names that is not yours, or not ready, is refused with 404 not_found and missing_inputs. A video longer than the render cap (3 minutes today) is refused with 400 invalid_request.

The Timeline language itself is on the render page.

Errors: branch on the code #

Every error is JSON with the same shape:

JSON
{
  "error": "out_of_credits",
  "message": "Not enough credits for this generation.",
  "topup_url": "https://api.oneupai.com/account"
}
  • error is a stable code. It never changes and is never translated. Write your branches on it.
  • message is a short English sentence for your logs. It can change, so never match on it.
  • Some codes add fields, such as detail, topup_url, account_url, replacement or current_version.
  • 429 and some 503 answers carry a Retry-After header: wait that many seconds, then send the same request with the same retry key.

During the seven days after a failed payment, requests still work, and each answer carries an X-OneUp-Grace-Expires header with the time access stops. The errors page lists every code, what it means and what to do.