Saltar a la navegación

Get Generation

Retrieve the current generation state. This /v2/generate/{id} route supports the wait, timeout and include options below.

Autenticación

x-api-keystring
Autenticación con clave API vía encabezado

Parámetros de ruta

idstringRequerido
A unique identifier for the generation.

Parámetros de consulta

waitbooleanOpcional

When true, hold the request open until the generation finishes (COMPLETED, NO_OP, FAILED or REJECTED) or timeout passes, then return its latest state. Waits last at most 10 seconds, so for longer jobs poll again (the response has Retry-After: 2) or use a webhook. Can’t be combined with include=progress.

timeoutdoubleOpcional

Seconds to hold a wait=true request open, from 1 to 10 (default 5). Other values return 400. On timeout you get the unfinished generation with HTTP 200, so check status.

includestringOpcional

Comma-separated extra fields to include. include=progress adds a progress object with the render stage, measured progress and the expected finish time. Works for generations created through the API as well as in sync’s own apps.

Respuesta

Job status retrieved successfully
createdAtdatetime
The date and time the generation was created.
idstring
A unique identifier for the generation.
inputlist of objects
An array of input objects used for generation.
modelenum
The name of the model used for generation.
Valores permitidos:
statusenum
The status of the generation.
errorstringOpcional

The error message if the generation failed, was rejected or lip-synced nothing (NO_OP).

errorCodestringOpcional

Stable, machine-readable error code if the generation failed, was rejected or lip-synced nothing (NO_OP) (e.g. generation_input_video_inaccessible). The full catalog of codes, messages and suggested fixes is served unauthenticated at GET /v2/errors.

optionsobjectOpcional
Options for the generation.
outputDurationdoubleOpcional
The duration of the output media.
outputUrlstringOpcional
The URL of the output media.
outputFileNamestringOpcional
The sanitized filename applied to the output media. Characters outside letters, numbers, dashes and underscores are stripped and spaces become underscores, so this can differ from the value submitted. Null when no name was provided.
segmentslist of objectsOpcional
The segments of the generation.
segmentOutputUrlstringOpcional
The URL of the segment output media.
dubAudioUrlstring or nullOpcional

Dubbed audio URL. Omitted for generations without dubParams; null until the dubbed track is available.

dubAudioAssetIdstring or nullOpcional

Reusable AUDIO asset for the dubbed track. Omitted without dubParams; null until available, or when retention settings or a custom output bucket prevent saving an asset.

synthesizedAudioUrlstringOpcional

The URL of the audio synthesized from a text (TTS) input. Only present for generations created with a TTS text input; reuse it as an audio input to keep the same take across generations.

webhookUrlstringOpcional
The URL to the webhook endpoint.
projectIdstringOpcional
The id of the project this generation is attached to, or null when it belongs to no project. Set via the projectId field on the create request.
generationEstimateobjectOpcional

Finish-time estimate recorded when the generation was accepted. Only set for generations made in sync’s own apps, such as Studio. For any generation, request include=progress and read progress.estimatedFinishAt.

progressobjectOpcional

Render progress and expected finish. Only included when the generation is requested with include=progress.

Errores

401
Unauthorized Error
404
Not Found Error
500
Internal Server Error