API de OneUpAI

Envía generaciones, consulta el estado duradero y obtén resultados custodiados. Los créditos se cobran una vez; las generaciones fallidas se reembolsan automáticamente.

Inicio rápido

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"}'

Autenticación

Envía tu clave de API como token Bearer. Guárdala en tu servidor: se muestra una vez y solo se conserva como hash.

Sondeo e idempotencia

Consulta cada 2s los primeros 30s, luego cada 5s; UNCERTAIN → cada 15s hasta 25 min; detente en estados terminales.

Envía una Idempotency-Key única en cada envío. Reintentar con la misma clave devuelve el mismo ticket y nunca se cobra dos veces.

Generaciones en cola

Las imágenes, el video y los renders se ejecutan de forma asíncrona: POST /v1/queue/submit/{alias} devuelve un ticket al instante; GET /v1/queue/status/{ticket} informa el estado duradero; GET /v1/queue/result/{ticket} devuelve los archivos terminados. El wait() del cliente implementa todo el contrato de sondeo por ti.

Generaciones síncronas

Las capacidades de texto responden en una sola llamada: POST /v1/run/{alias} espera hasta 60 segundos y devuelve la salida directamente. Reintentar con la misma Idempotency-Key vuelve a entregar el mismo resultado sin un segundo cobro.

Subidas

Para referenciar tus propios medios (una foto de origen para video, clips para un render), envía POST /v1/uploads/initiate con el tipo de contenido y el tamaño, sube los bytes con PUT a la URL devuelta y usa el file_url en la entrada de una generación. El upload() del cliente hace los tres pasos.

Archivos

Los medios de cada generación completada se guardan de forma duradera en tu cuenta. Las URL de resultado duran una hora por diseño — renuévalas cuando quieras con GET /v1/assets/{id}/url, revisa todo en tu página de cuenta y DELETE /v1/assets/{id} elimina los medios permanentemente.

Modelos

Los alias nombran una capacidad, no un proveedor. Aquí se muestra la forma; los precios y esquemas completos vienen de GET /v1/models.

oneup/script-director

text Síncrono

Redacción de guiones y dirección de escenas. Parámetros: prompt (brief), context?. Hasta 16.000 caracteres de entrada.

Precio: 6 créditos

Límites: Entrada máx. 16000 caracteres

Entrada de ejemplo

{
  "prompt": "Write a 3-scene product-demo script for a standing desk"
}
Ver esquema de entrada (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 En cola

Texto a imagen rápido. Parámetros: prompt, image_size?. Precio por megapíxel (máx. 4 MP).

Precio: 1 crédito por megapíxel

Límites: megapixels: 1–4

Entrada de ejemplo

{
  "prompt": "a red bicycle in the rain"
}
Ver esquema de entrada (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 En cola

Imagen a video: un clip de 5 o 10 segundos. Parámetros: prompt, image_url, duration (5|10 segundos). 20 créditos por segundo.

Precio: 20 créditos por segundo de clip

Límites: segundo de clip: 5–10

Entrada de ejemplo

{
  "prompt": "waves at sunset",
  "duration": 5,
  "image_url": "https://example.com/frame.jpg"
}
Ver esquema de entrada (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 En cola

Edición de imagen guiada por referencias: describe el cambio, sin máscaras. Parámetros: prompt, image_urls (1–2 referencias), image_size?, output_format?. 12 créditos por el primer megapíxel + 4 por cada adicional (máx. 4 MP).

Precio: 12 créditos (primer megapíxel) + 4 por adicional

Límites: megapixels: 1–4

Entrada de ejemplo

{
  "prompt": "swap the background for a bright kitchen, keep the product exactly as is",
  "image_urls": [
    "https://example.com/product.jpg"
  ]
}
Ver esquema de entrada (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 En cola

Imagen a video cinematográfico a 720p: un clip de 5 o 10 segundos con sonido. Parámetros: prompt, image_url, duration (5|10), resolution (fija "720p"), end_image_url?, aspect_ratio?. 55 créditos por segundo.

Precio: 55 créditos por segundo de clip

Límites: segundo de clip: 5–10

Entrada de ejemplo

{
  "prompt": "golden-hour drone reveal of the house, slow and steady",
  "duration": 5,
  "image_url": "https://example.com/frame.jpg",
  "resolution": "720p"
}
Ver esquema de entrada (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 En cola

Imagen a video cinematográfico a 1080p: un clip de 5 o 10 segundos con sonido. Parámetros: prompt, image_url, duration (5|10), resolution (fija "1080p"), end_image_url?, aspect_ratio?. 125 créditos por segundo.

Precio: 125 créditos por segundo de clip

Límites: segundo de clip: 5–10

Entrada de ejemplo

{
  "prompt": "golden-hour drone reveal of the house, slow and steady",
  "duration": 5,
  "image_url": "https://example.com/frame.jpg",
  "resolution": "1080p"
}
Ver esquema de entrada (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 En cola

Imagen a video cinematográfico en 4K: un clip de 5 o 10 segundos con sonido. Parámetros: prompt, image_url, duration (5|10), resolution (fija "4k"), end_image_url?, aspect_ratio?. 280 créditos por segundo.

Precio: 280 créditos por segundo de clip

Límites: segundo de clip: 5–10

Entrada de ejemplo

{
  "prompt": "golden-hour drone reveal of the house, slow and steady",
  "duration": 5,
  "image_url": "https://example.com/frame.jpg",
  "resolution": "4k"
}
Ver esquema de entrada (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 En cola

Imagen a video con movimiento completo y sonido: un clip de 5 o 10 segundos, cuadro final opcional. Parámetros: prompt, start_image_url, duration (5|10), end_image_url?, generate_audio?, negative_prompt?. 30 créditos por segundo.

Precio: 30 créditos por segundo de clip

Límites: segundo de clip: 5–10

Entrada de ejemplo

{
  "prompt": "slow push-in as steam rises from the cup",
  "duration": 5,
  "start_image_url": "https://example.com/frame.jpg"
}
Ver esquema de entrada (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 En cola

Voz de calidad de estudio a partir de texto: hasta 1.000 caracteres (alrededor de un minuto) con una voz con nombre, para anuncios y narración premium. Parámetros: text, voice?, stability?, similarity_boost?, style?, speed? (0.7–1.2), language_code?, apply_text_normalization? (auto|on|off). 18 créditos por solicitud.

Precio: 18 créditos

Límites: Entrada máx. 1000 caracteres

Entrada de ejemplo

{
  "text": "This weekend only: every listing on the north shore, open from ten to four. Bring the family.",
  "speed": 1,
  "stability": 0.4
}
Ver esquema de entrada (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 En cola

Texto a imagen premium, máxima calidad. Parámetros: prompt, image_size?. 6 créditos por el primer megapíxel + 3 por cada adicional (máx. 4 MP).

Precio: 6 créditos (primer megapíxel) + 3 por adicional

Límites: megapixels: 1–4

Entrada de ejemplo

{
  "prompt": "product shot of a ceramic mug, studio lighting"
}
Ver esquema de entrada (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 En cola

Sincronización labial de máxima fidelidad de tu video subido con tu audio subido; el resultado se corta a la entrada más corta. Parámetros: video_url, audio_url (tus subidas o activos), sync_mode (fijo "cut_off"). Se cobra por segundo de la entrada más corta, redondeado hacia arriba, hasta 60 segundos. 15 créditos por segundo.

Precio: 15 créditos por segundo de tu medio (redondeado hacia arriba)

Límites: Hasta 60 segundos de medio

Entrada de ejemplo

{
  "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"
}
Ver esquema de entrada (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 En cola

Una foto fija que habla con tu audio subido, en 1080p. Parámetros: image_url (cualquier imagen), audio_url (tu subida o activo — define la duración), prompt?, resolution (fija "1080p"). Se cobra por segundo de audio, redondeado hacia arriba, hasta 30 segundos. 29 créditos por segundo.

Precio: 29 créditos por segundo de tu medio (redondeado hacia arriba)

Límites: Hasta 30 segundos de medio

Entrada de ejemplo

{
  "audio_url": "https://media.oneupai.com/u/oneup_upload_youraudio/1790000000/sig",
  "image_url": "https://example.com/portrait.jpg",
  "resolution": "1080p"
}
Ver esquema de entrada (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 En cola

Sincroniza los labios de tu video subido con tu audio subido. Parámetros: video_url, audio_url (ambos deben ser tus subidas o activos). Se cobra por segundo de la entrada más larga, redondeado hacia arriba, hasta 60 segundos. 8 créditos por segundo.

Precio: 8 créditos por segundo de tu medio (redondeado hacia arriba)

Límites: Hasta 60 segundos de medio

Entrada de ejemplo

{
  "audio_url": "https://media.oneupai.com/u/oneup_upload_youraudio/1790000000/sig",
  "video_url": "https://media.oneupai.com/u/oneup_upload_yourvideo/1790000000/sig"
}
Ver esquema de entrada (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 En cola

Una canción original a partir de una descripción de estilo y tus letras: una pista MP3. Parámetros: prompt (estilo, ánimo, escena; 10–300 caracteres), lyrics_prompt (una línea por fila, se admiten etiquetas [Verse]/[Chorus]; 10–3.000 caracteres). 6 créditos por solicitud.

Precio: 6 créditos

Límites: —

Entrada de ejemplo

{
  "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"
}
Ver esquema de entrada (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 En cola

Un efecto de sonido a partir de una descripción: hasta 22 segundos en MP3. Parámetros: text (el sonido), duration_seconds? (0,5–22), prompt_influence? (0–1), loop?. 8 créditos por solicitud.

Precio: 8 créditos

Límites: Entrada máx. 500 caracteres

Entrada de ejemplo

{
  "text": "a wooden front door opening slowly, then a soft click as it closes",
  "duration_seconds": 4
}
Ver esquema de entrada (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 En cola

Narración a partir de texto: hasta 1.000 caracteres (alrededor de un minuto) con una voz con nombre. Parámetros: prompt (el texto), voice?, style_instructions?, language_code?, output_format? (mp3|wav|ogg_opus). 9 créditos por solicitud.

Precio: 9 créditos

Límites: Entrada máx. 1000 caracteres

Entrada de ejemplo

{
  "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"
}
Ver esquema de entrada (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 En cola

Una transcripción con tiempos por palabra de tu audio o video subido, lista para subtítulos. Parámetros: audio_url (tu subida o activo). El resultado es un annotation_id que referencias desde una pista de subtítulos. Se cobra por minuto iniciado de la entrada, hasta 60 minutos. 2 créditos por minuto.

Precio: 2 créditos por minuto iniciado de tu medio

Límites: Hasta 60 minutos de medio

Entrada de ejemplo

{
  "audio_url": "https://media.oneupai.com/u/oneup_upload_yourtalk/1790000000/sig"
}
Ver esquema de entrada (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 En cola

Edición determinista de video de formato corto: cortes, zoom, subtítulos. Crea una Timeline y luego renderiza una vista previa o un final.

Precio: 15 créditos por cada 10 segundos de salida iniciados

Límites: cada 10 segundos de salida iniciados: 1–18

Entrada de ejemplo

{
  "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 En cola

Grabado determinista de subtítulos desde una transcripción provista, sobre tu video. Crea una Timeline y luego renderiza una vista previa o un final.

Precio: 15 créditos por cada 10 segundos de salida iniciados

Límites: cada 10 segundos de salida iniciados: 1–18

Entrada de ejemplo

{
  "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"
      }
    }
  ]
}

Precios en vivo y cambios de precio pendientes: GET /v1/models.

Errores

Errores
HTTPErrorSignificado
400invalid_requestSolicitud mal formada o violación de contrato
401invalid_keyClave de API no válida
402out_of_creditsCréditos insuficientes
403entitlement_requiredSe requiere suscripción activa
403plan_requiredEsta clave requiere el plan Builder
403account_frozenCuenta temporalmente congelada
403credit_debtLa deuda pendiente suspende generaciones
403storage_quota_exceededCuota de almacenamiento alcanzada
404unknown_modelModelo desconocido
404not_foundNo encontrado (o no es tuyo)
409idempotency_conflictClave de idempotencia reutilizada con otra solicitud
409result_expiredResultado síncrono fuera de su ventana de reentrega
410model_retiredModelo retirado; ver reemplazo
413payload_too_largeCuerpo mayor de 1 MB
422invalid_inputEl modelo rechazó la entrada (reembolsado)
429rate_limitedLímite de velocidad; respeta Retry-After
502upstream_errorLa generación falló (reembolsado)
503unavailableNo disponible temporalmente