Ir para a navegação

get generation

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

Autenticação

x-api-keystring
Autenticação de chave de API via cabeçalho

Parâmetros de caminho

idstringObrigatório
A unique identifier for the generation.

Parâmetros de consulta

waitbooleanOpcional

When true, long-poll: hold the request open until the generation reaches a terminal status (COMPLETED/FAILED/REJECTED) or the timeout elapses, then return the latest state. Waits are short (10s max) — treat this as a convenience for jobs about to finish, and poll again (the response includes a Retry-After: 2 header) or use a webhook for longer jobs. wait=true responses also carry X-Sync-Wait-Mode: long_poll and X-Sync-Wait-Timeout-Seconds headers. Cannot be combined with include=progress.

timeoutdoubleOpcional

Max seconds to hold a wait=true request open (default 5, max 10 — values outside 1-10 are rejected with a 400). On timeout the current (non-terminal) generation is returned with HTTP 200, so check status and poll again, or use a webhook for long jobs.

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.

Resposta

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.
Valores permitidos:
errorstringOpcional
The error message if the generation failed.
errorCodestringOpcional

Stable, machine-readable error code if the generation failed (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

A completion-time estimate captured once when the generation is accepted. Populated only for generations created in sync’s own apps, such as Sync Studio; the field is absent for generations created through the API today. To get an expected finish time for any generation, request it with include=progress and read progress.estimatedFinishAt.

progressobjectOpcional

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

Erros

401
Unauthorized Error
404
Not Found Error
500
Internal Server Error