OneUpAI API
Submit generations, poll for durable state, and fetch custodied results. Credits are charged once; failed generations are refunded automatically.
Quickstart
npm install @oneupai/client
import { createOneUp } from "@oneupai/client";
const oneup = createOneUp({ apiKey: process.env.ONEUP_API_KEY });
const { ticket } = await oneup.submit("oneup/image-fast", { prompt: "a red bicycle" });
const result = await oneup.wait(ticket); // → { assets: [{ asset_id, url }] }
const script = await oneup.run("oneup/script-director", { prompt: "3-scene demo script" });curl -X POST https://api.oneupai.com/v1/queue/submit/oneup/image-fast \
-H "Authorization: Bearer $ONEUP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"prompt": "a red bicycle"}'Authentication
Send your API key as a Bearer token. Store it server-side — it is shown once and kept only as a hash.
Polling & idempotency
Poll every 2s for the first 30s, then every 5s; UNCERTAIN → every 15s up to 25 min; stop on terminal states.
Send a unique Idempotency-Key on every submit. Retrying with the same key returns the same ticket and is never double-charged.
Queued generations
Images, video, and renders run asynchronously: POST /v1/queue/submit/{alias} returns a ticket immediately; GET /v1/queue/status/{ticket} reports durable state; GET /v1/queue/result/{ticket} returns the finished assets. The client's wait() implements the full polling contract for you.
Sync generations
Text capabilities answer in one call: POST /v1/run/{alias} blocks up to 60 seconds and returns the output directly. Retrying with the same Idempotency-Key redelivers the same result without a second charge.
Uploads
To reference your own media (a source photo for video, clips for a render), POST /v1/uploads/initiate with the content type and size, PUT the bytes to the returned URL, then pass the file_url in a generation input. The client's upload() does all three steps.
Assets
Every completed generation's media is stored durably in your account. Result URLs last one hour by design — renew any time with GET /v1/assets/{id}/url, list everything in your account page, and DELETE /v1/assets/{id} removes media permanently.
Models
Aliases name a capability, not a provider. This lists the shape; live pricing and full schemas come from GET /v1/models.
oneup/script-director
text Sync
Script and scene direction writing. Params: prompt (brief), context?. Up to 16,000 input characters.
Price: 6 credits
Bounds: Max input 16000 chars
Example input
{
"prompt": "Write a 3-scene product-demo script for a standing desk"
}Show input schema (JSON)
{
"type": "object",
"required": [
"prompt"
],
"properties": {
"prompt": {
"type": "string",
"maxLength": 16000,
"minLength": 1,
"description": "The brief: what to write."
},
"context": {
"type": "string",
"maxLength": 16000,
"description": "Optional background the writing should honor. Combined input is capped at 16,000 characters (max_input_chars, enforced pre-spend)."
}
},
"additionalProperties": false
}oneup/image-fast
image Queued
Fast text-to-image. Params: prompt, image_size?. Priced per megapixel (max 4 MP).
Price: 1 credit per megapixel
Bounds: megapixels: 1–4
Example input
{
"prompt": "a red bicycle in the rain"
}Show input schema (JSON)
{
"type": "object",
"required": [
"prompt"
],
"properties": {
"prompt": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"description": "What to generate."
},
"image_size": {
"type": "object",
"required": [
"width",
"height"
],
"properties": {
"width": {
"type": "integer",
"maximum": 2048,
"minimum": 256
},
"height": {
"type": "integer",
"maximum": 2048,
"minimum": 256
}
},
"description": "Output dimensions; omitted = 1024-class square (1 MP). Billed megapixels = ceil(width x height / 1e6), capped at 4 MP by unit bounds.",
"additionalProperties": false
}
},
"additionalProperties": false
}oneup/video-standard
video Queued
Image-to-video: one 5- or 10-second clip. Params: prompt, image_url, duration (5|10 seconds). 20 credits per second.
Price: 20 credits per second of clip
Bounds: second of clip: 5–10
Example input
{
"prompt": "waves at sunset",
"duration": 5,
"image_url": "https://example.com/frame.jpg"
}Show input schema (JSON)
{
"type": "object",
"required": [
"prompt",
"image_url",
"duration"
],
"properties": {
"prompt": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"description": "Motion/scene description."
},
"duration": {
"enum": [
5,
10
],
"type": "integer",
"description": "Clip length in seconds — 5 or 10 only (ADR 0013 / OWNER-03)."
},
"image_url": {
"type": "string",
"maxLength": 2048,
"minLength": 1,
"description": "Source frame. An uploaded file_url from /v1/uploads (validated for ownership) or an external image URL."
}
},
"additionalProperties": false
}oneup/image-edit
image Queued
Reference-guided image editing: describe the change, no masks. Params: prompt, image_urls (1–2 references), image_size?, output_format?. 12 credits for the first megapixel + 4 per additional (max 4 MP).
Price: 12 credits (first megapixel) + 4 per additional
Bounds: megapixels: 1–4
Example input
{
"prompt": "swap the background for a bright kitchen, keep the product exactly as is",
"image_urls": [
"https://example.com/product.jpg"
]
}Show input schema (JSON)
{
"type": "object",
"required": [
"prompt",
"image_urls"
],
"properties": {
"prompt": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"description": "What to change, in plain language (no masks needed)."
},
"image_size": {
"type": "object",
"required": [
"width",
"height"
],
"properties": {
"width": {
"type": "integer",
"maximum": 2048,
"minimum": 256
},
"height": {
"type": "integer",
"maximum": 2048,
"minimum": 256
}
},
"description": "Output dimensions; omitted = matched to the reference. Billed megapixels = ceil(width x height / 1e6), capped at 4 MP by unit bounds.",
"additionalProperties": false
},
"image_urls": {
"type": "array",
"items": {
"type": "string",
"maxLength": 2048,
"minLength": 1
},
"maxItems": 2,
"minItems": 1,
"description": "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."
},
"output_format": {
"enum": [
"jpeg",
"png"
],
"type": "string",
"description": "File type of the result; jpeg when omitted."
}
},
"additionalProperties": false
}oneup/video-cinematic-720
video Queued
Cinematic image-to-video at 720p: one 5- or 10-second clip with sound. Params: prompt, image_url, duration (5|10), resolution (fixed "720p"), end_image_url?, aspect_ratio?. 55 credits per second.
Price: 55 credits per second of clip
Bounds: second of clip: 5–10
Example input
{
"prompt": "golden-hour drone reveal of the house, slow and steady",
"duration": 5,
"image_url": "https://example.com/frame.jpg",
"resolution": "720p"
}Show input schema (JSON)
{
"type": "object",
"required": [
"prompt",
"image_url",
"duration",
"resolution"
],
"properties": {
"prompt": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"description": "Motion/scene description."
},
"duration": {
"enum": [
5,
10
],
"type": "integer",
"description": "Clip length in seconds — 5 or 10 only (ADR 0013)."
},
"image_url": {
"type": "string",
"maxLength": 2048,
"minLength": 1,
"description": "Starting frame (JPEG, PNG or WebP). An uploaded file_url from /v1/uploads (validated for ownership) or an external image URL."
},
"resolution": {
"enum": [
"720p"
],
"type": "string",
"description": "This capability renders at 720p — the value is fixed. For 1080p or 4K use the sibling capabilities."
},
"aspect_ratio": {
"enum": [
"auto",
"21:9",
"16:9",
"4:3",
"1:1",
"3:4",
"9:16"
],
"type": "string",
"description": "Frame shape; auto (matches the image) when omitted."
},
"end_image_url": {
"type": "string",
"maxLength": 2048,
"minLength": 1,
"description": "Optional final frame for a transition from the start image."
}
},
"additionalProperties": false
}oneup/video-cinematic-1080
video Queued
Cinematic image-to-video at 1080p: one 5- or 10-second clip with sound. Params: prompt, image_url, duration (5|10), resolution (fixed "1080p"), end_image_url?, aspect_ratio?. 125 credits per second.
Price: 125 credits per second of clip
Bounds: second of clip: 5–10
Example input
{
"prompt": "golden-hour drone reveal of the house, slow and steady",
"duration": 5,
"image_url": "https://example.com/frame.jpg",
"resolution": "1080p"
}Show input schema (JSON)
{
"type": "object",
"required": [
"prompt",
"image_url",
"duration",
"resolution"
],
"properties": {
"prompt": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"description": "Motion/scene description."
},
"duration": {
"enum": [
5,
10
],
"type": "integer",
"description": "Clip length in seconds — 5 or 10 only (ADR 0013)."
},
"image_url": {
"type": "string",
"maxLength": 2048,
"minLength": 1,
"description": "Starting frame (JPEG, PNG or WebP). An uploaded file_url from /v1/uploads (validated for ownership) or an external image URL."
},
"resolution": {
"enum": [
"1080p"
],
"type": "string",
"description": "This capability renders at 1080p — the value is fixed. For 720p or 4K use the sibling capabilities."
},
"aspect_ratio": {
"enum": [
"auto",
"21:9",
"16:9",
"4:3",
"1:1",
"3:4",
"9:16"
],
"type": "string",
"description": "Frame shape; auto (matches the image) when omitted."
},
"end_image_url": {
"type": "string",
"maxLength": 2048,
"minLength": 1,
"description": "Optional final frame for a transition from the start image."
}
},
"additionalProperties": false
}oneup/video-cinematic-4k
video Queued
Cinematic image-to-video at 4K: one 5- or 10-second clip with sound. Params: prompt, image_url, duration (5|10), resolution (fixed "4k"), end_image_url?, aspect_ratio?. 280 credits per second.
Price: 280 credits per second of clip
Bounds: second of clip: 5–10
Example input
{
"prompt": "golden-hour drone reveal of the house, slow and steady",
"duration": 5,
"image_url": "https://example.com/frame.jpg",
"resolution": "4k"
}Show input schema (JSON)
{
"type": "object",
"required": [
"prompt",
"image_url",
"duration",
"resolution"
],
"properties": {
"prompt": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"description": "Motion/scene description."
},
"duration": {
"enum": [
5,
10
],
"type": "integer",
"description": "Clip length in seconds — 5 or 10 only (ADR 0013)."
},
"image_url": {
"type": "string",
"maxLength": 2048,
"minLength": 1,
"description": "Starting frame (JPEG, PNG or WebP). An uploaded file_url from /v1/uploads (validated for ownership) or an external image URL."
},
"resolution": {
"enum": [
"4k"
],
"type": "string",
"description": "This capability renders at 4K — the value is fixed. For 720p or 1080p use the sibling capabilities."
},
"aspect_ratio": {
"enum": [
"auto",
"21:9",
"16:9",
"4:3",
"1:1",
"3:4",
"9:16"
],
"type": "string",
"description": "Frame shape; auto (matches the image) when omitted."
},
"end_image_url": {
"type": "string",
"maxLength": 2048,
"minLength": 1,
"description": "Optional final frame for a transition from the start image."
}
},
"additionalProperties": false
}oneup/video-motion
video Queued
Full-motion image-to-video with sound: one 5- or 10-second clip, optional end frame. Params: prompt, start_image_url, duration (5|10), end_image_url?, generate_audio?, negative_prompt?. 30 credits per second.
Price: 30 credits per second of clip
Bounds: second of clip: 5–10
Example input
{
"prompt": "slow push-in as steam rises from the cup",
"duration": 5,
"start_image_url": "https://example.com/frame.jpg"
}Show input schema (JSON)
{
"type": "object",
"required": [
"prompt",
"start_image_url",
"duration"
],
"properties": {
"prompt": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"description": "Motion/scene description."
},
"duration": {
"enum": [
5,
10
],
"type": "integer",
"description": "Clip length in seconds — 5 or 10 only (ADR 0013)."
},
"end_image_url": {
"type": "string",
"maxLength": 2048,
"minLength": 1,
"description": "Optional final frame — the clip travels from the start image to this one."
},
"generate_audio": {
"type": "boolean",
"description": "Generate a soundtrack with the clip; on when omitted. Priced the same either way."
},
"negative_prompt": {
"type": "string",
"maxLength": 500,
"description": "What to avoid."
},
"start_image_url": {
"type": "string",
"maxLength": 2048,
"minLength": 1,
"description": "Starting frame. An uploaded file_url from /v1/uploads (validated for ownership) or an external image URL."
}
},
"additionalProperties": false
}oneup/voice-premium
audio Queued
Studio-grade voice from text: up to 1,000 characters (about a minute) in a named voice, for ad reads and premium narration. Params: text, voice?, stability?, similarity_boost?, style?, speed? (0.7–1.2), language_code?, apply_text_normalization? (auto|on|off). 18 credits per request.
Price: 18 credits
Bounds: Max input 1000 chars
Example input
{
"text": "This weekend only: every listing on the north shore, open from ten to four. Bring the family.",
"speed": 1,
"stability": 0.4
}Show input schema (JSON)
{
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"maxLength": 1000,
"minLength": 1,
"description": "The words to say — up to 1,000 characters (about a minute of speech)."
},
"speed": {
"type": "number",
"maximum": 1.2,
"minimum": 0.7,
"description": "Speaking pace; 1 when omitted."
},
"style": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "Style exaggeration; 0 when omitted."
},
"voice": {
"type": "string",
"maxLength": 40,
"minLength": 1,
"description": "Named studio voice; a clear, natural default when omitted."
},
"stability": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "How steady the delivery is (0 = expressive and variable, 1 = consistent); 0.5 when omitted."
},
"language_code": {
"type": "string",
"maxLength": 16,
"minLength": 2,
"description": "Language of the speech (ISO 639-1 such as en or es); detected when omitted."
},
"similarity_boost": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "How closely the result sticks to the chosen voice; 0.75 when omitted."
},
"apply_text_normalization": {
"enum": [
"auto",
"on",
"off"
],
"type": "string",
"description": "Whether numbers and abbreviations are spelled out; auto when omitted."
}
},
"additionalProperties": false
}oneup/image-pro
image Queued
Premium text-to-image, highest quality. Params: prompt, image_size?. 6 credits for the first megapixel + 3 per additional (max 4 MP).
Price: 6 credits (first megapixel) + 3 per additional
Bounds: megapixels: 1–4
Example input
{
"prompt": "product shot of a ceramic mug, studio lighting"
}Show input schema (JSON)
{
"type": "object",
"required": [
"prompt"
],
"properties": {
"prompt": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"description": "What to generate."
},
"image_size": {
"type": "object",
"required": [
"width",
"height"
],
"properties": {
"width": {
"type": "integer",
"maximum": 2048,
"minimum": 256
},
"height": {
"type": "integer",
"maximum": 2048,
"minimum": 256
}
},
"description": "Output dimensions; omitted = 1024-class square (1 MP). Billed megapixels = ceil(width x height / 1e6), capped at 4 MP by unit bounds.",
"additionalProperties": false
}
},
"additionalProperties": false
}oneup/lipsync-premium
video Queued
Highest-fidelity lip-sync of your uploaded video to your uploaded audio; the result is cut to the shorter input. Params: video_url, audio_url (your uploads or assets), sync_mode (fixed "cut_off"). Billed per second of the shorter input, rounded up, up to 60 seconds. 15 credits per second.
Price: 15 credits per second of your media (rounded up)
Bounds: Up to 60 seconds of media
Example input
{
"audio_url": "https://media.oneupai.com/u/oneup_upload_youraudio/1790000000/sig",
"sync_mode": "cut_off",
"video_url": "https://media.oneupai.com/u/oneup_upload_yourvideo/1790000000/sig"
}Show input schema (JSON)
{
"type": "object",
"required": [
"video_url",
"audio_url"
],
"properties": {
"audio_url": {
"type": "string",
"maxLength": 2048,
"minLength": 1,
"description": "The speech to sync to: the file_url of one of your uploads or the URL of one of your assets."
},
"sync_mode": {
"enum": [
"cut_off"
],
"type": "string",
"description": "Fixed to cut_off: the result is cut to the shorter input, which is what you are billed for."
},
"video_url": {
"type": "string",
"maxLength": 2048,
"minLength": 1,
"description": "Your video: the file_url of one of your uploads or the URL of one of your assets. The result is cut to the shorter of video and audio."
}
},
"additionalProperties": false
}oneup/talking-photo
video Queued
A still photo that speaks your uploaded audio, at 1080p. Params: image_url (any image), audio_url (your upload or asset — sets the length), prompt?, resolution (fixed "1080p"). Billed per second of audio, rounded up, up to 30 seconds. 29 credits per second.
Price: 29 credits per second of your media (rounded up)
Bounds: Up to 30 seconds of media
Example input
{
"audio_url": "https://media.oneupai.com/u/oneup_upload_youraudio/1790000000/sig",
"image_url": "https://example.com/portrait.jpg",
"resolution": "1080p"
}Show input schema (JSON)
{
"type": "object",
"required": [
"image_url",
"audio_url"
],
"properties": {
"prompt": {
"type": "string",
"maxLength": 1000,
"description": "Optional direction for the performance (calm, animated, looking left…)."
},
"audio_url": {
"type": "string",
"maxLength": 2048,
"minLength": 1,
"description": "The speech: the file_url of one of your uploads or the URL of one of your assets. Its length is what you are billed for (up to 30 seconds)."
},
"image_url": {
"type": "string",
"maxLength": 2048,
"minLength": 1,
"description": "The photo to animate — a person, facing the camera. An upload file_url, one of your assets, or any image URL."
},
"resolution": {
"enum": [
"1080p"
],
"type": "string",
"description": "Fixed to 1080p."
}
},
"additionalProperties": false
}oneup/lipsync-standard
video Queued
Lip-sync your uploaded video to your uploaded audio. Params: video_url, audio_url (both must be your uploads or assets). Billed per second of the longer input, rounded up, up to 60 seconds. 8 credits per second.
Price: 8 credits per second of your media (rounded up)
Bounds: Up to 60 seconds of media
Example input
{
"audio_url": "https://media.oneupai.com/u/oneup_upload_youraudio/1790000000/sig",
"video_url": "https://media.oneupai.com/u/oneup_upload_yourvideo/1790000000/sig"
}Show input schema (JSON)
{
"type": "object",
"required": [
"video_url",
"audio_url"
],
"properties": {
"audio_url": {
"type": "string",
"maxLength": 2048,
"minLength": 1,
"description": "The speech to sync to: the file_url of one of your uploads or the URL of one of your assets. Its length counts toward the billed seconds."
},
"video_url": {
"type": "string",
"maxLength": 2048,
"minLength": 1,
"description": "Your video: the file_url of one of your uploads or the URL of one of your assets. Its length counts toward the billed seconds."
}
},
"additionalProperties": false
}oneup/music
audio Queued
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). 6 credits per request.
Price: 6 credits
Bounds: —
Example input
{
"prompt": "warm acoustic folk, gentle and hopeful, for a neighbourhood 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"
}Show input schema (JSON)
{
"type": "object",
"required": [
"prompt",
"lyrics_prompt"
],
"properties": {
"prompt": {
"type": "string",
"maxLength": 300,
"minLength": 10,
"description": "The music you want: style, mood, and where it will play (10–300 characters)."
},
"lyrics_prompt": {
"type": "string",
"maxLength": 3000,
"minLength": 10,
"description": "The lyrics, one line per row; structure tags like [Intro], [Verse], [Chorus], [Bridge], [Outro] shape the arrangement (10–3,000 characters)."
}
},
"additionalProperties": false
}oneup/sfx
audio Queued
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?. 8 credits per request.
Price: 8 credits
Bounds: Max input 500 chars
Example input
{
"text": "a wooden front door opening slowly, then a soft click as it closes",
"duration_seconds": 4
}Show input schema (JSON)
{
"type": "object",
"required": [
"text"
],
"properties": {
"loop": {
"type": "boolean",
"description": "Make an effect that loops seamlessly."
},
"text": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"description": "The sound you want, in plain words (a door creaking open, rain on a tin roof, a crowd cheering)."
},
"duration_seconds": {
"type": "number",
"maximum": 22,
"minimum": 0.5,
"description": "Length of the effect in seconds (0.5–22); chosen from the description when omitted."
},
"prompt_influence": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "How literally to follow the description (0 = loose, 1 = exact); 0.3 when omitted."
}
},
"additionalProperties": false
}oneup/voice-standard
audio Queued
Narration from text: up to 1,000 characters (about a minute) in a named voice. Params: prompt (the words), voice?, style_instructions?, language_code?, output_format? (mp3|wav|ogg_opus). 9 credits per request.
Price: 9 credits
Bounds: Max input 1000 chars
Example input
{
"prompt": "Welcome home. Three bedrooms, two baths, and a garden that gets the morning sun.",
"style_instructions": "warm, unhurried, like a friend showing you around"
}Show input schema (JSON)
{
"type": "object",
"required": [
"prompt"
],
"properties": {
"voice": {
"type": "string",
"maxLength": 40,
"minLength": 1,
"description": "Named narrator voice; a calm, clear default when omitted."
},
"prompt": {
"type": "string",
"maxLength": 1000,
"minLength": 1,
"description": "The words to say — up to 1,000 characters (about a minute of speech). Expressive tags like [sigh] or [whispering] are allowed."
},
"language_code": {
"type": "string",
"maxLength": 16,
"minLength": 2,
"description": "Language of the speech (BCP-47 code such as en-US or es-ES); detected when omitted."
},
"output_format": {
"enum": [
"mp3",
"wav",
"ogg_opus"
],
"type": "string",
"description": "File type of the result; mp3 when omitted."
},
"style_instructions": {
"type": "string",
"maxLength": 500,
"description": "How to deliver it, in plain words (warm, brisk, like a documentary…)."
}
},
"additionalProperties": false
}oneup/transcribe
audio Queued
A word-timed transcript of your uploaded audio or video, ready for captions. Params: audio_url (your upload or asset). The result is an annotation_id you reference from a caption track. Billed per started minute of the input, up to 60 minutes. 2 credits per minute.
Price: 2 credits per started minute of your media
Bounds: Up to 60 minutes of media
Example input
{
"audio_url": "https://media.oneupai.com/u/oneup_upload_yourtalk/1790000000/sig"
}Show input schema (JSON)
{
"type": "object",
"required": [
"audio_url"
],
"properties": {
"audio_url": {
"type": "string",
"description": "The speech to transcribe — an uploaded audio or video file of yours."
}
},
"additionalProperties": false
}oneup/edit-shorts
video Queued
Deterministic short-form video editing: cut, punch-in, captions. Author a Timeline, then render a Preview or a final.
Price: 15 credits per started 10 seconds of output
Bounds: started 10 seconds of output: 1–18
Example input
{
"v": "1.1",
"output": {
"fps": 30,
"aspect": "9:16",
"container": "mp4",
"resolution": 1080
},
"captions": [
{
"id": "captions",
"range": {
"to": 12000,
"from": 0
},
"style": {
"preset": "caption_a",
"position": "bottom"
},
"source": {
"$annotation": "oneup_asset_transcript"
},
"language": "en",
"highlight": "word"
}
],
"segments": [
{
"id": "hook",
"trim": {
"to": 5200,
"from": 1200
},
"source": {
"$asset": "oneup_asset_source"
},
"effects": [
{
"op": "zoom",
"level": 1.15
}
]
},
{
"id": "body",
"trim": {
"to": 16000,
"from": 8000
},
"source": {
"$asset": "oneup_asset_source"
}
}
]
}oneup/edit-captions
video Queued
Deterministic caption burn-in from a supplied transcript, over your video. Author a Timeline, then render a Preview or a final.
Price: 15 credits per started 10 seconds of output
Bounds: started 10 seconds of output: 1–18
Example input
{
"v": "1.1",
"output": {
"fps": 30,
"aspect": "9:16",
"container": "mp4",
"resolution": 1080
},
"captions": [
{
"id": "captions",
"range": {
"to": 12000,
"from": 0
},
"style": {
"preset": "caption_a",
"position": "bottom"
},
"source": {
"$annotation": "oneup_asset_transcript"
},
"language": "en",
"highlight": "word"
}
],
"segments": [
{
"id": "hook",
"trim": {
"to": 5200,
"from": 1200
},
"source": {
"$asset": "oneup_asset_source"
},
"effects": [
{
"op": "zoom",
"level": 1.15
}
]
},
{
"id": "body",
"trim": {
"to": 16000,
"from": 8000
},
"source": {
"$asset": "oneup_asset_source"
}
}
]
}Live pricing and pending price changes: GET /v1/models.
Errors
| HTTP | Error | Meaning |
|---|---|---|
| 400 | invalid_request | Malformed request or contract violation |
| 401 | invalid_key | Invalid API key |
| 402 | out_of_credits | Not enough credits |
| 403 | entitlement_required | Active subscription required |
| 403 | plan_required | Builder plan required for this key |
| 403 | account_frozen | Account temporarily frozen |
| 403 | credit_debt | Outstanding debt suspends generations |
| 403 | storage_quota_exceeded | Storage quota reached |
| 404 | unknown_model | Unknown model |
| 404 | not_found | Not found (or not yours) |
| 409 | idempotency_conflict | Idempotency key reused with a different request |
| 409 | result_expired | Sync result past its redelivery window |
| 410 | model_retired | Model retired; see replacement |
| 413 | payload_too_large | Body over 1 MB |
| 422 | invalid_input | Model rejected the input (refunded) |
| 429 | rate_limited | Rate limited; honor Retry-After |
| 502 | upstream_error | Generation failed (refunded) |
| 503 | unavailable | Temporarily unavailable |