wait_for_job
Polls a media generation job until completion, returning the final result or an error if the timeout is reached. Eliminates the need to manually check job status.
Instructions
Wait for a media generation job to complete — polls until the image, video, or audio is ready or the timeout is reached. Use this to get the final result without manually calling get_job_status in a loop. Returns the completed job on success or an error if the timeout expires.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobId | Yes | The media job ID to wait for (e.g. "mjob_..."). | |
| timeoutSeconds | No | Maximum seconds to wait before giving up (default: 300). |