Run a model: Music and sound

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
Errors any model in this group can return
HTTPCodeWhat happenedWhat to doCredits
400invalid_requestThe 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.
401invalid_keyThe 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.
402out_of_creditsYour 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.
403account_disabledThe 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.
403account_frozenThe 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.
403credit_debtYou 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.
403entitlement_requiredYour 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.
403plan_requiredThis 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.
403storage_quota_exceededYour 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.
404unknown_modelNo Alias by that name is available to you.Check the name, including the oneup/ part, against GET /v1/models.Not charged.
409idempotency_conflictYou 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.
410model_retiredThis 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.
413payload_too_largeThe request body is over 1 MB.Upload files first and send their file_url, instead of putting file contents in the body.Not charged.
422invalid_inputWe 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.
429daily_limit_reachedThis 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.
429rate_limitedYou 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.
500internal_errorSomething 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.
502upstream_errorThe 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.
503unavailableWe 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/audio-beats #

Beat map for a track

Beat analysis of one music track, for cutting video on the beat: tempo, beat times, accents, energy sections and an indexed list of cut candidates. Params: audio_url (your upload or asset, up to 10 minutes). The result is an annotation_id whose JSON you read. 2 credits per track. Live price: GET /v1/models. Charged when accepted; refunded if it fails.

Key: API key · Credits: 2 credits · Queued: poll for the result

Parameters

Parameters
NameInRequiredTypeDescription
Idempotency-Keyheaderyestext, 1–∞ charactersA 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

Request body
FieldRequiredTypeDescription
labelnotextOptional. 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/audio-beats" \
  -H "Authorization: Bearer $ONEUP_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "audio_url": "https://media.oneupai.com/u/oneup_upload_yourtrack/1790000000/sig"
}'

Response (200)

{
  "ticket": "oneup_req_SuaNFGGC0b4MGIeOrp78KFRXfR",
  "status": "QUEUED"
}

Errors: the same as every endpoint in this group, listed above.

POST /v1/queue/submit/oneup/audio-score #

Background score

An instrumental background score for video from a description: one MP3 track. Params: prompt (the score to create; 1-5,000 chars). The length you ask for is a target, not a guarantee - the delivered track is shown with its actual duration. 22 credits per generation. Live price: GET /v1/models. Charged when accepted; refunded if it fails.

Key: API key · Credits: 22 credits · Queued: poll for the result

Parameters

Parameters
NameInRequiredTypeDescription
Idempotency-Keyheaderyestext, 1–∞ charactersA 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

Request body
FieldRequiredTypeDescription
promptyestext, 1–5000 charactersThe production prompt describing the instrumental score to create.
labelnotextOptional. 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/audio-score" \
  -H "Authorization: Bearer $ONEUP_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Create a 60-second instrumental cinematic background score for a modern luxury property tour. Elegant and aspirational with warm piano, subtle strings and restrained percussion. Medium energy with a gradual build. Instrumental only. No vocals, singing, spoken words, chants, lyrics or vocal samples."
}'

Response (200)

{
  "ticket": "oneup_req_SuaNFGGC0b4MGIeOrp78KFRXfR",
  "status": "QUEUED"
}

Errors: the same as every endpoint in this group, listed above.

POST /v1/queue/submit/oneup/audio-song #

Original song

An original song from a style description and your lyrics: one MP3 track. Params: prompt (style, mood, scene; 10–300 chars), lyrics_prompt (one line per row, [Verse]/[Chorus] tags allowed; 10–3,000 chars). 7 credits per request. Live price: GET /v1/models. Charged when accepted; refunded if it fails.

Key: API key · Credits: 7 credits · Queued: poll for the result

Parameters

Parameters
NameInRequiredTypeDescription
Idempotency-Keyheaderyestext, 1–∞ charactersA 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

Request body
FieldRequiredTypeDescription
promptyestext, 10–300 charactersThe music you want: style, mood, and where it will play (10–300 characters).
lyrics_promptyestext, 10–3000 charactersThe lyrics, one line per row; structure tags like [Intro], [Verse], [Chorus], [Bridge], [Outro] shape the arrangement (10–3,000 characters).
labelnotextOptional. 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/audio-song" \
  -H "Authorization: Bearer $ONEUP_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "warm acoustic folk, gentle and hopeful, for a neighborhood tour video",
  "lyrics_prompt": "[Verse]\nMorning light on the maple street\nEvery porch has a place to meet\n[Chorus]\nCome on home, come on home\nYou were never on your own"
}'

Response (200)

{
  "ticket": "oneup_req_SuaNFGGC0b4MGIeOrp78KFRXfR",
  "status": "QUEUED"
}

Errors: the same as every endpoint in this group, listed above.

POST /v1/queue/submit/oneup/audio-sound-effect #

Sound effect

A sound effect from a description: up to 22 seconds of MP3. Params: text (the sound), duration_seconds? (0.5–22), prompt_influence? (0–1), loop?. 10 credits per request. Live price: GET /v1/models. Charged when accepted; refunded if it fails.

Key: API key · Credits: 10 credits · Queued: poll for the result

Parameters

Parameters
NameInRequiredTypeDescription
Idempotency-Keyheaderyestext, 1–∞ charactersA 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

Request body
FieldRequiredTypeDescription
textyestext, 1–500 charactersThe sound you want, in plain words (a door creaking open, rain on a tin roof, a crowd cheering).
duration_secondsnonumber, 0.5–22Length of the effect in seconds (0.5–22); chosen from the description when omitted.
prompt_influencenonumber, 0–1How literally to follow the description (0 = loose, 1 = exact); 0.3 when omitted.
loopnoyes / noMake an effect that loops seamlessly.
labelnotextOptional. 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/audio-sound-effect" \
  -H "Authorization: Bearer $ONEUP_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "a wooden front door opening slowly, then a soft click as it closes",
  "duration_seconds": 4
}'

Response (200)

{
  "ticket": "oneup_req_SuaNFGGC0b4MGIeOrp78KFRXfR",
  "status": "QUEUED"
}

Errors: the same as every endpoint in this group, listed above.