Run a model: Pictures
On this page
Run a model (queued) #
Pictures, clips, voice and music run in the background. Each model has its own path: send the body, get a ticket at once, then poll the job (see Jobs). The charge is taken when we accept the job and refunded if it fails.
Errors any model in this group can return
| HTTP | Code | What happened | What to do | Credits |
|---|---|---|---|---|
| 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'". | 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. | 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. | Send Authorization: Bearer oneup_live_… with a current key. You can make a new key on your account page. | 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). | 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. | Not charged. |
| 403 | account_disabled | The account is disabled: its sign-in was removed or blocked. Every key and session of the account answers this. | Write to video@oneupai.com. | Not charged. The account's credits stay. |
| 403 | account_frozen | The account is frozen for now, for example while a payment dispute is open. Extra fields: account_url. | See your account page. Reading your results still works. | Not charged. |
| 403 | credit_debt | You have credit debt: a payment for credits you already spent was reversed. Extra fields: account_url. | Settle it from your account page; new work is accepted again once it is paid. | 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. | Renew on your account page; the same keys work again. Checking status, reading results and downloading your files still work in the meantime. | Not charged. |
| 403 | 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. | Move the account back to Concierge or Concierge Plus; the key works again. | Not charged. |
| 403 | 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. | Delete assets, uploads or Projects you no longer need, or release a hold. Work you already paid for is never deleted because of this. | Not charged. |
| 404 | unknown_model | No Alias by that name is available to you. | Check the name, including the oneup/ part, against GET /v1/models. | Not charged. |
| 409 | idempotency_conflict | You sent a retry key again with a different request. | Make a new retry key for each new request. To retry the first request, send exactly the same body. | This request is not charged; the first one stands. |
| 410 | model_retired | This Alias was replaced, and its notice period has ended. Extra fields: replacement, the Alias to use instead (or null). | Send your request to the replacement. | Not charged. |
| 413 | payload_too_large | The request body is over 1 MB. | Upload files first and send their file_url, instead of putting file contents in the body. | 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. | Change the input and send it with a new retry key. | Refunded. |
| 429 | 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. | Send it again after renews_at, with the same retry key. Nothing ran. | 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. | Wait that long, then send the same request with the same retry key. | 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. | Send the same request again with the same retry key. If it keeps failing, send us the request_id. | 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. | Try again with a new retry key. The same key would return the same failed generation. | 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. | Wait, then send the same request with the same retry key. | Not charged; if it comes after we accepted the work, the charge is refunded. |
POST /v1/queue/submit/oneup/image-depth #
Measure how far away everything is
Measures how far away everything in a photograph is, so a still can be moved through like a filmed shot. Params: image_url. 1 credit, charged once per photograph. Live price: GET /v1/models. Charged when accepted; refunded if it fails.
Key: API key · Credits: 1 credit · Queued: poll for the result
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
Idempotency-Key | header | yes | text, 1–∞ characters | A unique value you make for each new job (a UUID works). Sending the same key with the same body again returns the same job and never charges twice; the same key with a different body is idempotency_conflict. |
Request body
| Field | Required | Type | Description |
|---|---|---|---|
image_url | yes | text, 1–2048 characters | The photograph to measure: an uploaded file_url from /v1/uploads or an external image URL (https). |
label | no | text | Optional. A name for this job and every file it makes, shown on your account page and used as the download name. Never sent to the model. |
Request
curl -X POST "https://api.oneupai.com/v1/queue/submit/oneup/image-depth" \
-H "Authorization: Bearer $ONEUP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://media.oneupai.com/u/…/uploads/oneup_upload_…"
}'Response (200)
{
"ticket": "oneup_req_SuaNFGGC0b4MGIeOrp78KFRXfR",
"status": "QUEUED"
}Errors: the same as every endpoint in this group, listed above.
POST /v1/queue/submit/oneup/image-edit #
Edit an image
Reference-guided image editing: describe the change, no masks. Params: prompt, image_urls (1–2 references), image_size?, output_format?. 13 credits for the first megapixel + 4 per additional (max 4 MP). Live price: GET /v1/models. Charged when accepted; refunded if it fails.
Key: API key · Credits: 13 credits (first megapixel) + 4 per additional · Queued: poll for the result
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
Idempotency-Key | header | yes | text, 1–∞ characters | A unique value you make for each new job (a UUID works). Sending the same key with the same body again returns the same job and never charges twice; the same key with a different body is idempotency_conflict. |
Request body
| Field | Required | Type | Description |
|---|---|---|---|
prompt | yes | text, 1–2000 characters | What to change, in plain language (no masks needed). |
image_urls | yes | list | One or two reference images: uploaded file_urls from /v1/uploads (validated for ownership) or external image URLs. Two at most — reference megapixels are part of the wholesale cost. |
image_size | no | group | Output dimensions; omitted = matched to the reference. Billed megapixels = ceil(width x height / 1e6), capped at 4 MP by unit bounds. |
image_size.width | yes | whole number, 256–2048 | |
image_size.height | yes | whole number, 256–2048 | |
output_format | no | text, one of: jpeg, png | File type of the result; jpeg when omitted. |
label | no | text | Optional. A name for this job and every file it makes, shown on your account page and used as the download name. Never sent to the model. |
Request
curl -X POST "https://api.oneupai.com/v1/queue/submit/oneup/image-edit" \
-H "Authorization: Bearer $ONEUP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"prompt": "swap the background for a bright kitchen, keep the product exactly as is",
"image_urls": [
"https://example.com/product.jpg"
]
}'Response (200)
{
"ticket": "oneup_req_SuaNFGGC0b4MGIeOrp78KFRXfR",
"status": "QUEUED"
}Errors: the same as every endpoint in this group, listed above.
POST /v1/queue/submit/oneup/image-generate-lite #
Quick image
Fast text-to-image. Params: prompt, image_size?. Priced per megapixel (max 4 MP). Live price: GET /v1/models. Charged when accepted; refunded if it fails.
Key: API key · Credits: 1 credit per megapixel · Queued: poll for the result
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
Idempotency-Key | header | yes | text, 1–∞ characters | A unique value you make for each new job (a UUID works). Sending the same key with the same body again returns the same job and never charges twice; the same key with a different body is idempotency_conflict. |
Request body
| Field | Required | Type | Description |
|---|---|---|---|
prompt | yes | text, 1–2000 characters | What to generate. |
image_size | no | group | Output dimensions; omitted = 1024-class square (1 MP). Billed megapixels = ceil(width x height / 1e6), capped at 4 MP by unit bounds. |
image_size.width | yes | whole number, 256–2048 | |
image_size.height | yes | whole number, 256–2048 | |
label | no | text | Optional. A name for this job and every file it makes, shown on your account page and used as the download name. Never sent to the model. |
Request
curl -X POST "https://api.oneupai.com/v1/queue/submit/oneup/image-generate-lite" \
-H "Authorization: Bearer $ONEUP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a red bicycle in the rain"
}'Response (200)
{
"ticket": "oneup_req_SuaNFGGC0b4MGIeOrp78KFRXfR",
"status": "QUEUED"
}Errors: the same as every endpoint in this group, listed above.
POST /v1/queue/submit/oneup/image-generate-pro #
Premium image
Premium text-to-image, highest quality. Params: prompt, image_size?. 7 credits for the first megapixel + 4 per additional (max 4 MP). Live price: GET /v1/models. Charged when accepted; refunded if it fails.
Key: API key · Credits: 7 credits (first megapixel) + 4 per additional · Queued: poll for the result
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
Idempotency-Key | header | yes | text, 1–∞ characters | A unique value you make for each new job (a UUID works). Sending the same key with the same body again returns the same job and never charges twice; the same key with a different body is idempotency_conflict. |
Request body
| Field | Required | Type | Description |
|---|---|---|---|
prompt | yes | text, 1–2000 characters | What to generate. |
image_size | no | group | Output dimensions; omitted = 1024-class square (1 MP). Billed megapixels = ceil(width x height / 1e6), capped at 4 MP by unit bounds. |
image_size.width | yes | whole number, 256–2048 | |
image_size.height | yes | whole number, 256–2048 | |
label | no | text | Optional. A name for this job and every file it makes, shown on your account page and used as the download name. Never sent to the model. |
Request
curl -X POST "https://api.oneupai.com/v1/queue/submit/oneup/image-generate-pro" \
-H "Authorization: Bearer $ONEUP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"prompt": "product shot of a ceramic mug, studio lighting"
}'Response (200)
{
"ticket": "oneup_req_SuaNFGGC0b4MGIeOrp78KFRXfR",
"status": "QUEUED"
}Errors: the same as every endpoint in this group, listed above.
POST /v1/queue/submit/oneup/image-generate-standard #
Make a detailed picture
Detailed text-to-image at medium quality, sized to your frame (edges up to 2048 px). Params: prompt, quality (medium), image_size?, output_format?. 4 credits per picture. Live price: GET /v1/models. Charged when accepted; refunded if it fails.
Key: API key · Credits: 4 credits · Queued: poll for the result
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
Idempotency-Key | header | yes | text, 1–∞ characters | A unique value you make for each new job (a UUID works). Sending the same key with the same body again returns the same job and never charges twice; the same key with a different body is idempotency_conflict. |
Request body
| Field | Required | Type | Description |
|---|---|---|---|
prompt | yes | text, 1–4000 characters | What to generate. |
quality | yes | text, one of: medium | Fixed at medium at this record (the vendor's default, high, costs four times as much). |
image_size | no | group | Output dimensions in multiples of 16, each edge at most 2048; omitted = the vendor's default square. The Agent host passes the video frame's own size so the picture fills it. |
image_size.width | yes | whole number, 256–2048 | |
image_size.height | yes | whole number, 256–2048 | |
output_format | no | text, one of: jpeg, png, webp | png when omitted; jpeg for a quarter of the bytes. |
label | no | text | Optional. A name for this job and every file it makes, shown on your account page and used as the download name. Never sent to the model. |
Request
curl -X POST "https://api.oneupai.com/v1/queue/submit/oneup/image-generate-standard" \
-H "Authorization: Bearer $ONEUP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"prompt": "the riverside lot at Mill Street with survey stakes at dusk",
"quality": "medium",
"image_size": {
"width": 736,
"height": 1280
},
"output_format": "jpeg"
}'Response (200)
{
"ticket": "oneup_req_SuaNFGGC0b4MGIeOrp78KFRXfR",
"status": "QUEUED"
}Errors: the same as every endpoint in this group, listed above.
POST /v1/queue/submit/oneup/image-upscale #
Sharpen a small picture
Sharpens a small picture to twice its size (a 1024x768 photo becomes 2048x1536), JPEG out. Params: image_url. 3 credits per picture. Live price: GET /v1/models. Charged when accepted; refunded if it fails.
Key: API key · Credits: 3 credits · Queued: poll for the result
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
Idempotency-Key | header | yes | text, 1–∞ characters | A unique value you make for each new job (a UUID works). Sending the same key with the same body again returns the same job and never charges twice; the same key with a different body is idempotency_conflict. |
Request body
| Field | Required | Type | Description |
|---|---|---|---|
image_url | yes | text, 1–2048 characters | The picture to enhance: an uploaded file_url from /v1/uploads or an external image URL (https). |
scale | no | number, 2–2 | The factor. Fixed at 2 at this record (a 1024x768 photo becomes 2048x1536). |
model | no | text, one of: standard, detailed | standard — tuned for photographs (the default when omitted); detailed — a stronger restoration. |
output_format | no | text, one of: jpeg, png | jpeg when omitted (a quarter of the bytes of png for a photograph). |
label | no | text | Optional. A name for this job and every file it makes, shown on your account page and used as the download name. Never sent to the model. |
Request
curl -X POST "https://api.oneupai.com/v1/queue/submit/oneup/image-upscale" \
-H "Authorization: Bearer $ONEUP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://media.oneupai.com/u/…/uploads/oneup_upload_…",
"scale": 2,
"model": "standard",
"output_format": "jpeg"
}'Response (200)
{
"ticket": "oneup_req_SuaNFGGC0b4MGIeOrp78KFRXfR",
"status": "QUEUED"
}Errors: the same as every endpoint in this group, listed above.