Passer à la navigation

Get Generation

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

Authentification

x-api-keystring
Authentification par clé API via en-tête

Paramètres de chemin

idstringRequis
A unique identifier for the generation.

Paramètres de requête

waitbooleanOptionnel

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.

timeoutdoubleOptionnel

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.

includestringOptionnel

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.

Réponse

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.
Valeurs autorisées:
statusenum
The status of the generation.
errorstringOptionnel

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

errorCodestringOptionnel

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.

optionsobjectOptionnel
Options for the generation.
outputDurationdoubleOptionnel
The duration of the output media.
outputUrlstringOptionnel
The URL of the output media.
outputFileNamestringOptionnel
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 objectsOptionnel
The segments of the generation.
segmentOutputUrlstringOptionnel
The URL of the segment output media.
dubAudioUrlstring or nullOptionnel

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

dubAudioAssetIdstring or nullOptionnel

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.

synthesizedAudioUrlstringOptionnel

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.

webhookUrlstringOptionnel
The URL to the webhook endpoint.
projectIdstringOptionnel
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.
generationEstimateobjectOptionnel

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.

progressobjectOptionnel

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

Erreurs

401
Unauthorized Error
404
Not Found Error
500
Internal Server Error