wait for any sync job
jobs_waitWaits up to 50 seconds for a job to reach a final status and returns its latest state, replacing sleep-and-poll loops after a create call returns an id.
Instructions
Wait on the server, for up to about 50 seconds, until any job reaches a final status, then return its latest state in the same shape as jobs_get. Use it after a create tool returns an id, instead of sleeping or calling jobs_get in a loop; if the job is still PENDING or PROCESSING when it returns, call jobs_wait again with the same input. For one check without waiting use jobs_get. It also returns early on result.recoveryRequired and sends progress notifications when the call has a progressToken. Ids by kind:
generation: the id from lipsync_create, dubbing_create, lipsync_create-timeline or dialogue-videos_create
transcription: the id from transcriptions_create or dialogue-transcriptions_create
speaker_analysis: the transcription id
translation_preview: the translation-previews_create id, plus its projectId
import: the social video link passed to assets_create, plus the same projectId (and projectIntent if that call needed it)
batch: the batches_create id Statuses:
PENDING, PROCESSING: still running. Never create the job again.
COMPLETED, FAILED, REJECTED (the API refused it, such as an import limit or a moderation rejection), CANCELED: final. A speaker analysis that is unavailable, and a generation that lip-synced no frame (its own status NO_OP), read as FAILED. Results:
result keeps the kind's original status. A COMPLETED import's result is the saved asset, whose id is the asset id; a finished batch's result.results lists each item's generation status and output.
A translation_preview with result.recoveryRequired true has uncertain provider acceptance: do not create another job. Not read-only: an import read repeats the identical assets_create request, so it returns the running import or the saved asset, and starts the import for a link never imported (a non-social media URL is saved as a new VIDEO asset). Errors: an API failure that is not a job status, such as an unknown generation or transcription id or an auth failure, returns {error}; a translation_preview without projectId fails with a plain error message.
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": {
"kind": "<kind>",
"id": "<id>"
},
"name": "jobs_wait"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The job id for the chosen kind, as listed in the tool description; for import it is the social video link itself. | |
| kind | Yes | Which kind of job id is. | |
| projectId | No | Required for translation_preview; for import, the project passed to assets_create. | |
| projectIntent | No | import only: pass it when the assets_create call for this link needed it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||