Wait for a job to finish
wait_for_jobBlocks until a Midjourney job finishes, fails, or is moderated, then returns its state and image URLs, widening poll intervals to reduce requests.
Instructions
Block until a job reaches a finished, failed or moderated state, then return it with its image URLs.
The poll interval widens as the wait goes on, so a long relax-mode job does not turn into hundreds of requests. Times out after MIDJOURNEY_JOB_TIMEOUT_MS, ten minutes by default; a timeout does not cancel the job, it is still running.
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": {
"job_id": "<job_id>"
},
"name": "wait_for_job"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | The job id to wait on. | |
| timeout_ms | No | Give up after this long. Defaults to MIDJOURNEY_JOB_TIMEOUT_MS. |