get a generation
generations_getRead a sync generation by id to check status and retrieve its output media URL or error details; waits for completion up to about 50 seconds unless wait is false.
Instructions
Read one sync. generation by id: its status (PENDING or PROCESSING while it runs; COMPLETED, NO_OP, FAILED or REJECTED when final), outputMediaUrl once COMPLETED, and error and errorCode after NO_OP, FAILED or REJECTED.
Use it to follow a generation by the id its create call returned (lipsync_create, dubbing_create, lipsync_create-timeline or dialogue-videos_create, when available). jobs_get and jobs_wait, when available, read the same generation in a generic job shape that can add a completion percent while it runs.
Not for: finding a past id (generations_list, or projects_list-generations when available); what it cost (generations_get-costs when available); its inputs when the user explicitly continues it (generations_get-continuation).
Waiting: it keeps reading on the server for up to about 50 seconds unless you pass wait: false, and returns once the generation is final, or its latest state; leave out timeout. If it is still running, call again with the same id; never resubmit, since a new create starts a separate generation that is billed or counted against free limits. If the result has stalled, it is past its support time: follow stalled.nextStep and stop waiting.
Result: copy the exact structuredContent.outputMediaUrl string verbatim; it is signed, so it must not be reconstructed, shortened, or edited (outputUrl is a deprecated alias with the same value). On FAILED or REJECTED, tell the user the error and errorCode. To show a video made earlier, give that outputMediaUrl or, when Studio is open, open its own projectId with studio-views_open-project (or show it with studio-views_show-generation); never a new project.
NO_OP: it finished but lip-synced no frame, such as when no face was found; error and errorCode say why. Its outputMediaUrl is the input video unchanged, with any generated speech or dub audio, so never present it as a lipsync result. Lipsync was not charged; generated speech or dubbing was. Tell the user nothing was lip-synced and why, and offer to try again. The same video can end the same way, so also suggest one where the speaker's face is clearly visible, or choosing the speaker explicitly. When automatic speaker detection found no one speaking (a dub ends this way too), the retry has to pick the face: find its center with faces_get-people or faces_get-timeline when available, and pass options.active_speaker_detection { frame_number, coordinates: [x, y] } on the retry.
Retrying a NO_OP: read generations_get-continuation and reuse the take's audio inputs by url (speech it generated has generatedBy tts), never its script or dub request, so speech or dubbing is not paid for again. Choose the tool from its segments, not its audio count: with no segments, its one audio goes to lipsync_create as audioUrl, with the same visual, the same projectId and continuation { workflow, parentGenerationId }. With segments, even ones sharing one audio, use lipsync_create-timeline (when available) on the same video and projectId, one clip per segment: its span, the url of the audio input whose refId matches its audioInput.refId, and audioInput.startTime and endTime as audioStartTime and audioEndTime. The retry is a new lipsync, so follow the usual paid-work checks.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "generations_get"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Generation id returned by a create tool or generations_list. | |
| wait | No | Defaults to true: wait on the server until the generation finishes or about 50 seconds pass, then return its latest state. Pass false only for one immediate read. If it is still running, call again instead of sleeping. | |
| include | No | Additional information to include in the response. `progress` adds `progress` (measured render progress and expected finish) and `summary` (what the generation is, for a progress display). | |
| timeout | No | Seconds each read holds (1-10). Leave it out; a waiting read lasts about 50 seconds. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||