Check one or more jobs
https://api.mozartai.com/v1/jobs/waitChecks up to 20 jobs and waits up to 25 seconds for them to become playable or finish.
- Cost
- Free
- Rate limit
- Read
- MCP tool
get_job- CLI (coming soon)
mozart jobs wait
When to use: After any call that started a job. Pass job_ids and wait_seconds (up to 25). A song, cover, stems or master is playable once its final file is ready, so until as playable and complete both wait for the final files; outputs stay empty until then. If all_settled is false, call again; the job is still working.
When not to use: Never start the job again to check on it. Use POST /v1/songs/{song_id}/download for a lasting file once the job has succeeded.
Side effects: None. Reads only; safe to repeat. Keep calling until all_settled is true.
Authentication
Send your API key as Authorization: Bearer <key>. The key needs these scopes:
library:read
Request body
job_idslist of stringRequired1 to 20 itemswait_secondsintegerOptionalDefaults to00 to 25untilenumOptionalDefaults tocompleteAllowed valuesplayablecomplete
Response 200
Success.
jobslist of objectRequiredShow 14 properties
idstringRequiredobjectconstantRequiredkindenumRequiredShow 9 values
songcoverinpaintstemstemsmidimastercover_artpersona
statusenumRequiredAllowed valuesqueuedrunningsucceededfailedcancelled
playablebooleanRequiredproject_idstringor nullRequiredsong_idslist of stringRequiredoutputslist of objectRequiredShow 8 properties
typeenumRequiredAllowed valuesaudiostemmidiimagepersona
song_idstringor nullRequiredpersona_idstringor nullRequiredlabelstringor nullRequiredurlstringor nullRequiredurl_expires_atstringor nullRequiredcontent_typestringor nullRequiredduration_secondsnumberor nullRequired
credits_chargednumberor nullRequirednull while the job is pending; the settled ledger debit once it finishes; 0 for free operations, test keys and released or refunded holds
credits_refundedbooleanRequirederrorobjector nullRequiredShow 3 properties
codestringRequiredmessagestringRequirednext_stepstringor nullRequired
poll_after_secondsnumberor nullRequiredcreated_atstringRequiredcompleted_atstringor nullRequired
all_settledbooleanRequiredpoll_after_secondsnumberor nullRequired
Response headers
x-request-idThe id of this request; quote it when asking for help.x-mozart-api-versionThe API version that answered.x-ratelimit-limitRequests allowed in the current window for this caller.x-ratelimit-remainingRequests left in the current window.x-ratelimit-resetWhen the window resets, in Unix seconds.idempotent-replayedtruewhen this answer is the stored answer to an earlier call with the same idempotency key; the work was not done again.
Errors
What to do: PUBLIC_API_RATE_LIMITED: wait retry_after_seconds, then call again. A job with status failed has error with next_step, and its credits are refunded (credits_refunded); tell the user before trying again.
| Status | Type | Meaning |
|---|---|---|
| 400 | invalid_request | The request is malformed or an input is invalid. |
| 401 | authentication | The key or token is missing, invalid or revoked. |
| 402 | insufficient_credits | The account has too few credits for this call. A REST key also needs an API plan (Starter, Build, Scale or Growth) or API credits; with neither, every call is refused with PUBLIC_API_CREDITS_REQUIRED. payment_required: The account's plan does not include this; it needs an upgrade. |
| 403 | permission | The caller may not do this: a missing scope, a Mozart CLI sign-in whose account is below Pro, or access not enabled. |
| 404 | not_found | The resource or route does not exist for this caller. |
| 409 | conflict | The request conflicts with the current state, or an idempotency key was reused with a different body. |
| 422 | content_refused | The input was refused by content screening. |
| 429 | rate_limited | Too many requests; retry after Retry-After seconds. limit_reached: A daily, concurrent or total limit was reached. |
| 500 | internal | Mozart failed to answer; retry later. |
| 503 | provider_unavailable | A generation provider is unavailable; retry later. service_unavailable: A Mozart check the request needs, such as content screening, is temporarily unavailable; retry after retry_after_seconds. |