Rename a song or change who can see it
https://api.mozartai.com/v1/songs/{song_id}Renames a song or changes who can see it.
- Cost
- Free
- Rate limit
- Write
- MCP tool
update_song- CLI (coming soon)
mozart songs update
When to use: The user asks to rename a song (title) or to make it private, unlisted or public (visibility). Change visibility only when the user asked for it.
When not to use: To change the music itself, make a new song with POST /v1/songs or POST /v1/covers; songs cannot be edited.
Side effects: Changes the song's title or visibility. Making it public shows it to everyone on Mozart. Repeating the same change is safe.
Authentication
Send your API key as Authorization: Bearer <key>. The key needs these scopes:
library:write
Path parameters
song_idstringRequired
Request body
titlestringOptional1 to 200 charactersvisibilityenumOptionalWho can open the song:
privateis only the owner,unlistedis anyone with the link,publicalso shows it on Discover. Leave it out to keep the current setting.Allowed valuesprivateunlistedpublic
Response 200
Success.
idstringRequiredobjectconstantRequiredproject_idstringor nullRequiredThe project the song is in. Null on the shared sample song a test key's jobs return, which is in no project of yours.
titlestringRequiredstatusenumRequiredAllowed valuesgeneratingreadyfailed
visibilityenumRequiredAllowed valuesprivateunlistedpublic
sourceenumRequiredHow the song was started:
apiwith an API key;mcporclifrom a connected app signed in with a Mozart account;webDesktop,webMobileoriphonein the Mozart apps;unknownwhen it was not recorded.Show 7 values
apimcpcliwebDesktopwebMobileiphoneunknown
modelstringor nullRequiredduration_secondsnumberor nullRequiredwaveform_readybooleanRequiredlyricsstringor nullRequiredcover_art_urlstringor nullRequiredapp_urlstringRequiredcreated_atstringRequired
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_RESOURCE_NOT_FOUND: the id is wrong or not yours; list to find it. PUBLIC_API_SCOPE_MISSING: the key lacks library:write; tell the user.
| 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. |