Run a model: Text
On this page
Run a model (answer now) #
Text models and page readers answer in the same request, within 60 seconds. A retry with the same Idempotency-Key within 15 minutes returns the same answer without a second charge.
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. |
| 404 | 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. | Check the id, and that it was made with a key of this account. | 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. |
| 409 | 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. | If you still need the output, run the request again with a new retry key. That is a new charge. | The first charge stands; the work ran. |
| 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/run/oneup/text-post-copy #
Post text for your platforms
Writes the post text for a short video, one version per platform (YouTube, Instagram, Facebook, LinkedIn, Business Profile), written for a local market. Params: platforms, language, video, places, business, and optional topic / script / target_search / secondary_searches / cta_hint. Live price: GET /v1/models.
Key: API key · Credits: 3 credits · Answers now
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 |
|---|---|---|---|
platforms | yes | list | The platforms to write for, 1 to 5. |
language | yes | one of: en, es | |
video | yes | group | |
video.duration_ms | yes | whole number, 1–3600000 | |
video.aspect | yes | one of: 9:16, 1:1, 4:5, 16:9 | |
video.agent_slug | yes | text, 0–64 characters | |
video.recipe | no | group | The video's choices as option ids: at most 24, and at most 2,100 characters as sent (more is refused as recipe_too_large). |
video.scenes | no | list | Optional: each scene's start in the video, in milliseconds. YouTube chapters are written only from these times, only when YouTube's rule holds (the first at 0:00, at least three, each at least 10 seconds), and never for a Short. |
topic | no | text, 1–200 characters | Optional: what the video is about, in the member's words ("What's this video about?"). With neither a topic nor a script, the text is written from the business and the searches. |
script | no | text, 0–4000 characters | The video's script, when it has one. Optional: without it the text is written from the business, the searches and the choices. |
target_search | no | group | |
target_search.phrase | yes | text, 2–80 characters | |
target_search.place | yes | text, 1–60 characters | |
target_search.title_hint | no | text, 2–70 characters | Optional: a title idea for this search, a hint for the YouTube title that contains the search; used only when it does and fits 70 characters. |
secondary_searches | no | list | |
places | yes | list | |
business | yes | group | |
business.name | yes | text, 1–80 characters | |
business.vertical | yes | text, 1–60 characters | |
business.brokerage | no | text, 0–80 characters | |
business.phone | no | text, 0–32 characters | |
cta_hint | no | one of: call, book, learn_more, dm | |
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/run/oneup/text-post-copy" \
-H "Authorization: Bearer $ONEUP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"platforms": [
"youtube",
"instagram"
],
"language": "en",
"video": {
"duration_ms": 34000,
"aspect": "9:16",
"agent_slug": "oneuplisting"
},
"target_search": {
"phrase": "yacht broker fort lauderdale",
"place": "Fort Lauderdale"
},
"places": [
"Fort Lauderdale"
],
"business": {
"name": "Harbor Yachts",
"vertical": "Yacht broker"
},
"cta_hint": "call"
}'Response (200)
{
"alias": "oneup/text-post-copy",
"output": {
"youtube": {
"title": "Yacht broker Fort Lauderdale: a walk-through in 34 seconds",
"description": "A quick tour of a listing with Harbor Yachts, a yacht broker in Fort Lauderdale. Call us to set up a sea trial.",
"tags": [
"yacht broker",
"fort lauderdale",
"yachts for sale"
]
},
"instagram": {
"caption": "Looking for a yacht broker in Fort Lauderdale? Here is a 34-second walk-through. Call Harbor Yachts to book a sea trial.",
"hashtags": [
"#FortLauderdale",
"#YachtBroker",
"#YachtsForSale"
]
},
"notices": []
}
}Errors: the same as every endpoint in this group, listed above.
POST /v1/run/oneup/text-script #
Script and scene direction
Script and scene direction writing. Params: prompt (brief), context?, target_search? (the search the script says in its first sentence), place?. Up to 16,000 input characters. Live price: GET /v1/models.
Key: API key · Credits: 7 credits · Answers now
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–15980 characters | The brief: what to write. The prompt and the context share one budget: the whole request as sent (its JSON, where a line break or a quote counts as two characters) is capped at 16,000 characters (max_input_chars, enforced pre-spend). |
context | no | text, 0–15970 characters | Optional background the writing should honor. The prompt and the context share one budget: the whole request as sent (its JSON, where a line break or a quote counts as two characters) is capped at 16,000 characters (max_input_chars, enforced pre-spend). |
target_search | no | text, 1–80 characters | Optional: the search this video is for. The script says it naturally once, in its first sentence, and never lists keywords. Counts toward the 16,000-character request limit. |
place | no | text, 1–60 characters | Optional: the place the script names. Counts toward the 16,000-character request limit. |
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/run/oneup/text-script" \
-H "Authorization: Bearer $ONEUP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Write a 3-scene product-demo script for a standing desk"
}'Response (200)
{
"alias": "oneup/text-script",
"output": "Scene 1 — The problem (0:00–0:08)\nA tired back at a desk. Voice: “Eight hours of sitting adds up.”\n\nScene 2 — The desk (0:08–0:20)\nOne touch raises it to standing height. Voice: “Stand when you want, sit when you need.”\n\nScene 3 — The offer (0:20–0:30)\nThe desk in a bright home office. Voice: “Try it for thirty days.”"
}Errors: the same as every endpoint in this group, listed above.
POST /v1/run/oneup/text-shot-plan #
Shot director for photo tours
A shot director for photo tours: from a manifest (the track's cut candidates, the photos' facts, the style's budgets), your vocabulary tables and up to 40 photos, it returns a structured plan — which photos, in what order, each one's move and an effect on every cut, all on the beat. Params: manifest, images, vocab, profiles, rules. 80 credits per plan. Live price: GET /v1/models.
Key: API key · Credits: 80 credits · Answers now
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 |
|---|---|---|---|
manifest | yes | group | The input manifest: the project and its budgets, the track's cut candidates and sections, the images' facts, same-room pairs and duplicate groups. At most 32,000 characters as JSON (more is refused as input_too_large). Listing facts are never sent. |
vocab | yes | group | The host's vocabulary (its vocab.ts is the one source): the prefix tables AND the plan's enums are rendered from it, so the prompt and the validator cannot drift. |
vocab.base_shots | yes | list | |
vocab.cut_effects | yes | list | |
vocab.room_types | yes | list | |
vocab.reject_reasons | yes | list | |
profiles | yes | text, 0–6000 characters | The style-profile budget table, as the calling app renders it. |
rules | yes | text, 0–12000 characters | The placement rules, as the calling app renders them. |
images | yes | list | The reduced listing photos (768 px long edge, JPEG, prepared by the host), each the caller's own upload or asset URL, in manifest order. More than 40 is images_too_many. |
images[].image_id | yes | text, 0–64 characters | |
images[].url | yes | text, 0–600 characters | |
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/run/oneup/text-shot-plan" \
-H "Authorization: Bearer $ONEUP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"manifest": {
"project": {
"project_id": "job-1"
}
},
"images": [
{
"image_id": "img_001",
"url": "https://media.oneupai.com/u/x"
}
],
"vocab": {
"base_shots": [
{
"id": "hero_hold"
}
],
"cut_effects": [
{
"id": "hard_cut"
}
],
"room_types": [
"exterior_front"
],
"reject_reasons": [
"duplicate"
]
},
"profiles": "| Profile | … |",
"rules": "Sequence. …"
}'Response (200)
{
"alias": "oneup/text-shot-plan",
"output": {
"project_id": "job-1",
"images": [
{
"image_id": "img_001",
"room_type": "exterior_front",
"use": true,
"hero": true,
"focal": {
"x": 0.5,
"y": 0.42
},
"crop_safe": "high",
"direction": "neutral",
"reject_reason": null
}
],
"timeline": [
{
"seq": 1,
"image_id": "img_001",
"base_shot": "hero_hold",
"cut_in": 0,
"cut_out": 2,
"scale_start": 1,
"scale_end": 1.06
}
],
"cuts": [],
"journey_note": "Opens on the front of the house and holds on it."
}
}Errors: the same as every endpoint in this group, listed above.
POST /v1/run/oneup/text-shot-plan-repair #
Shot director, second pass
The shot director's second pass, text only: the same manifest and vocabulary, the failing plan and your validator's errors in — a corrected plan out. No photos are sent. 30 credits per call. Live price: GET /v1/models.
Key: API key · Credits: 30 credits · Answers now
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 |
|---|---|---|---|
manifest | yes | group | The input manifest: the project and its budgets, the track's cut candidates and sections, the images' facts, same-room pairs and duplicate groups. At most 32,000 characters as JSON (more is refused as input_too_large). Listing facts are never sent. |
vocab | yes | group | The host's vocabulary (its vocab.ts is the one source): the prefix tables AND the plan's enums are rendered from it, so the prompt and the validator cannot drift. |
vocab.base_shots | yes | list | |
vocab.cut_effects | yes | list | |
vocab.room_types | yes | list | |
vocab.reject_reasons | yes | list | |
profiles | yes | text, 0–6000 characters | The style-profile budget table, as the calling app renders it. |
rules | yes | text, 0–12000 characters | The placement rules, as the calling app renders them. |
repair | yes | group | |
repair.plan | yes | group | The failing plan (≤ 32,000 characters as JSON). |
repair.errors | yes | list | The host validator's errors, one sentence each. |
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/run/oneup/text-shot-plan-repair" \
-H "Authorization: Bearer $ONEUP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"manifest": {
"project": {
"project_id": "job-1"
}
},
"vocab": {
"base_shots": [
{
"id": "hero_hold"
}
],
"cut_effects": [
{
"id": "hard_cut"
}
],
"room_types": [
"exterior_front"
],
"reject_reasons": [
"duplicate"
]
},
"profiles": "| Profile | … |",
"rules": "Sequence. …",
"repair": {
"plan": {
"project_id": "job-1"
},
"errors": [
"cut 3: at mismatch"
]
}
}'Response (200)
{
"alias": "oneup/text-shot-plan-repair",
"output": {
"project_id": "job-1",
"images": [
{
"image_id": "img_001",
"room_type": "exterior_front",
"use": true,
"hero": true,
"focal": {
"x": 0.5,
"y": 0.42
},
"crop_safe": "high",
"direction": "neutral",
"reject_reason": null
}
],
"timeline": [
{
"seq": 1,
"image_id": "img_001",
"base_shot": "hero_hold",
"cut_in": 0,
"cut_out": 2,
"scale_start": 1,
"scale_end": 1.06
}
],
"cuts": [],
"journey_note": "Opens on the front of the house and holds on it."
}
}Errors: the same as every endpoint in this group, listed above.
POST /v1/run/oneup/text-video-ideas #
Get five video ideas
Suggests 5 short-video ideas for a local business, each with a structure map (beats on a timeline), fitted to its business type, places and searches. The picked idea's script is included. Params: language, agent, business, places, month, and optional searches / ranking / recent_topics / results / best_topics. Live price: GET /v1/models.
Key: API key · Credits: 6 credits · Answers now
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 |
|---|---|---|---|
language | yes | one of: en, es | |
agent | yes | group | |
agent.slug | yes | text, 0–64 characters | |
agent.kind | yes | text, 1–80 characters | |
agent.lengths | yes | list | |
business | yes | group | |
business.name | yes | text, 1–80 characters | |
business.vertical | yes | text, 1–60 characters | |
places | yes | list | |
searches | no | list | |
searches[].phrase | yes | text, 2–80 characters | |
searches[].volume | no | whole number, 0–… | |
ranking | no | list | |
recent_topics | no | list | |
month | yes | whole number, 1–12 | |
results | no | list | |
results[].kind_id | yes | one of: tips, market_update, day_in_the_life, listing, myth_or_fact, question, story, offer, other | |
results[].hook_type | yes | one of: question, bold_claim, local_callout, warning, surprise, list, story, other | |
results[].length | yes | text, 1–20 characters | |
results[].cta_kind | no | text, 0–20 characters | |
results[].posts | yes | whole number, 0–999999999999 | |
results[].views | yes | whole number, 0–999999999999 | |
results[].link_clicks | yes | whole number, 0–999999999999 | |
best_topics | no | list | |
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/run/oneup/text-video-ideas" \
-H "Authorization: Bearer $ONEUP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"language": "en",
"agent": {
"slug": "oneuplisting",
"kind": "Property walk-through",
"lengths": [
30,
60
]
},
"business": {
"name": "Harbor Yachts",
"vertical": "Yacht broker"
},
"places": [
"Fort Lauderdale"
],
"searches": [
{
"phrase": "yacht broker fort lauderdale",
"volume": 480
}
],
"month": 10
}'Response (200)
{
"alias": "oneup/text-video-ideas",
"output": {
"batch_id": "ib_Vq7Lx2Nc9Rt4Kb1W",
"ideas": [
{
"topic": "Three questions to ask before you buy a used yacht",
"why": "Buyers in Fort Lauderdale search for this every fall.",
"kind": "Tips",
"kind_id": "tips",
"hook_type": "question",
"seconds": 30,
"beats": [
{
"label": "hook",
"at_s": 0,
"direction": "Ask the first question to camera"
},
{
"label": "proof",
"at_s": 10,
"direction": "Show the survey report on deck"
},
{
"label": "cta",
"at_s": 25,
"direction": "Invite viewers to call for a tour"
}
]
},
{
"topic": "What a yacht broker does on a sea trial",
"why": "Shows the work behind a sale, which builds trust.",
"kind": "Day in the life",
"kind_id": "day_in_the_life",
"hook_type": "surprise",
"seconds": 60,
"beats": [
{
"label": "hook",
"at_s": 0,
"direction": "Engine starts; say what most miss"
},
{
"label": "build",
"at_s": 15,
"direction": "Walk the checklist at the helm"
},
{
"label": "payoff",
"at_s": 45,
"direction": "Hand over the keys at the dock"
}
]
}
]
}
}Errors: the same as every endpoint in this group, listed above.