Errors
Every error answers with the same JSON envelope. Read the type first: it sets the HTTP status and what to do next. The code names the exact case.
The details below are generated from the definitions the server runs, in English.
{
"error": {
"type": "limit_reached",
"code": "PUBLIC_API_DAILY_LIMIT_REACHED",
"message": "You reached today's limit for this. Try again tomorrow.",
"request_id": "req_...",
"details": {
"limit": "stemSplits",
"limit_value": 100,
"resets_at": "2026-11-28T00:00:00Z"
}
}
}Error types
| Type | HTTP status |
|---|---|
| invalid_request | 400 |
| authentication | 401 |
| permission | 403 |
| not_found | 404 |
| conflict | 409 |
| insufficient_credits | 402 |
| payment_required | 402 |
| rate_limited | 429 |
| limit_reached | 429 |
| content_refused | 422 |
| provider_unavailable | 503 |
| service_unavailable | 503 |
| internal | 500 |
Error codes
invalid_request (HTTP 400)
| Code | Meaning |
|---|---|
| GENERATION_CAPABILITY_NOT_SUPPORTED_BY_MODEL | This model doesn't support those settings. Adjust them and try again. |
| GENERATION_INPUT_NOT_SUPPORTED_BY_MODEL | This model doesn't support those settings. Adjust them and try again. |
| GENERATION_INPUT_OUT_OF_RANGE | This model doesn't support those settings. Adjust them and try again. |
| GENERATION_INPUT_REQUIRED_BY_MODEL | This model needs more input before it can generate. |
| GENERATION_INPUT_VALUE_NOT_SUPPORTED | This model doesn't support those settings. Adjust them and try again. |
| LYRICS_MODE_NOT_SUPPORTED_BY_MODEL | This model doesn't support that lyrics mode. |
| LYRICS_REQUIRED_BY_MODEL | This model needs lyrics. Add lyrics or transcribe them first. |
| LYRICS_TOO_LONG | Your lyrics are too long for this model. Please shorten them. |
| LYRICS_TOO_SHORT | Your lyrics are too short for this model. |
| PUBLIC_API_IDEMPOTENCY_KEY_REQUIRED | Send an idempotency key with this request. |
| PUBLIC_API_INPUT_INVALID | The request is not valid. Check the fields and try again. |
| PUBLIC_API_MODEL_NOT_AVAILABLE | That model is not available through the API. List the models to see which are. |
| PUBLIC_API_REQUEST_TOO_LARGE | The request is too large. |
| PUBLIC_API_UPLOAD_FETCH_FAILED | The file at that address could not be downloaded. |
| PUBLIC_API_UPLOAD_TOO_LARGE | That file is too large. |
| PUBLIC_API_URL_NOT_ALLOWED | That address cannot be used. Use a public https address. |
authentication (HTTP 401)
| Code | Meaning |
|---|---|
| PUBLIC_API_CREDENTIALS_MISSING | Send an API key or sign in to call the API. |
| PUBLIC_API_KEY_EXPIRED | This API key has expired. Create a new one in settings. |
| PUBLIC_API_KEY_INVALID | This API key is not valid. Check the key or create a new one in settings. |
| PUBLIC_API_KEY_REVOKED | This API key was revoked. Create a new one in settings. |
| PUBLIC_API_OAUTH_REQUIRED | MCP and the CLI sign in with OAuth. API keys work only with the REST API. |
| PUBLIC_API_TOKEN_INVALID | This sign-in has expired or was revoked. Connect the app again. |
permission (HTTP 403)
| Code | Meaning |
|---|---|
| ACCOUNT_PENDING_DELETION | This account is scheduled for deletion. Restore it to keep using Mozart. |
| ACCOUNT_RESTRICTED | Your account has been restricted for violating our terms of service. Contact support@mozartai.com to unblock your account. |
| GENERATION_INPUT_TIER_REQUIRED | That setting needs a paid plan. |
| GENERATION_MODEL_NOT_ENABLED | This model isn't available right now. Pick another model. |
| GENERATION_TIER_REQUIRED | This model needs a paid plan. |
| PERMISSION_DENIED | You don't have access to that. |
| PUBLIC_API_AGE_ATTESTATION_REQUIRED | Confirm you are 18 or older to use the API. |
| PUBLIC_API_CONNECTED_APP_NOT_ON_REST | This connected app works only through the MCP server. Use an API key to call the REST API. |
| PUBLIC_API_NOT_ENABLED | The API is not available for this account yet. |
| PUBLIC_API_PERMISSION_DENIED | You don't have access to that. |
| PUBLIC_API_PLAN_REQUIRED | A sign-in with a Mozart account whose plan does not include this. An API key never gets this code: a REST key needs an API plan or prepaid API credits, and without either it gets PUBLIC_API_CREDITS_REQUIRED. |
| PUBLIC_API_SCOPE_MISSING | This key is not allowed to do that. Create a key with the needed permission. |
| PUBLIC_API_VOICE_CONSENT_REQUIRED | Confirm you have the right to use this voice. |
| STEM_SEPARATION_TIER_REQUIRED | This stem split needs a paid plan. |
not_found (HTTP 404)
| Code | Meaning |
|---|---|
| GENERATION_PERSONA_UNAVAILABLE | That persona isn't available. Pick another persona. |
| NOT_FOUND | We couldn't find what you were looking for. |
| PROJECT_NOT_FOUND | This project doesn't exist or was deleted. |
| PUBLIC_API_OPERATION_NOT_FOUND | That operation does not exist. |
| PUBLIC_API_RESOURCE_NOT_FOUND | Nothing was found with that id. |
| SONG_REMIX_SOURCE_NOT_FOUND | This song is no longer available. |
| STORAGE_FILE_NOT_FOUND | That file is no longer available. |
conflict (HTTP 409)
| Code | Meaning |
|---|---|
| AUDIO_ATTACHMENT_UNMEASURED | Your audio is still being analyzed. Try again in a moment. |
| OPERATION_IN_PROGRESS | Another request is still running. Please wait for it to finish. |
| PREVIOUS_ATTEMPT_FAILED | The previous request didn't complete. Please try again. |
| PUBLIC_API_CONFLICT | That cannot be done in its current state. |
| PUBLIC_API_IDEMPOTENCY_KEY_REUSED | This idempotency key was already used with a different request. |
| PUBLIC_API_IDEMPOTENCY_REQUEST_IN_PROGRESS | A request with this idempotency key is still running. |
| PUBLIC_API_JOB_NOT_CANCELLABLE | This job has already finished. |
| PUBLIC_API_WAVEFORM_NOT_READY | This song's waveform is still being measured. Try again in a few seconds. |
insufficient_credits (HTTP 402)
| Code | Meaning |
|---|---|
| AI_CREDITS_INSUFFICIENT | Insufficient credits. Please purchase more credits to continue. |
| INSUFFICIENT_CREDITS | Insufficient credits. Please purchase more credits to continue. |
| PUBLIC_API_CREDITS_REQUIRED | The REST API needs an API plan or API credits. Subscribe or buy credits in developer settings. |
rate_limited (HTTP 429)
| Code | Meaning |
|---|---|
| AI_GENERATION_REQUEST_REJECTED | You already have several generations in flight. Please wait for some to finish before starting new ones. |
| AI_RATE_LIMITED | Too many requests. Please wait a moment and try again. |
| PUBLIC_API_RATE_LIMITED | Too many requests. Wait and try again. |
| RATE_LIMITED | Too many requests. Please wait a moment and try again. |
limit_reached (HTTP 429)
| Code | Meaning |
|---|---|
| GENERATION_RATE_LIMITED | You've hit the rate limits. Please try again later. |
| PUBLIC_API_CONCURRENCY_LIMIT_REACHED | Too many jobs are running. Wait for one to finish. |
| PUBLIC_API_CONNECTED_APP_LIMIT_REACHED | You have the maximum number of connected apps. Disconnect one to add another. |
| PUBLIC_API_DAILY_LIMIT_REACHED | You reached today's limit for this. Try again tomorrow. |
| PUBLIC_API_KEY_CREDIT_LIMIT_REACHED | This key reached its daily credit limit. Raise the limit in settings or try again tomorrow. |
| PUBLIC_API_KEY_LIMIT_REACHED | You have the maximum number of API keys. Revoke one to create another. |
| PUBLIC_API_PROJECT_SONG_LIMIT_REACHED | This project is full. Start a new project to keep creating. |
| PUBLIC_API_WEBHOOK_ENDPOINT_LIMIT_REACHED | You have the maximum number of webhook endpoints. Delete one to add another. |
content_refused (HTTP 422)
| Code | Meaning |
|---|---|
| AI_GENERATION_PROVIDER_REJECTED_INPUT | The model couldn't work with this request. Try changing it. |
| GENERATION_INPUT_NAMES_EXISTING_SONG | The input names an existing song. Song prompts, lyrics and titles get this only on a model that screens them, and no v1 song model does today; the prompts for lyrics and cover art can still get it. |
| GENERATION_INPUT_NAMES_REAL_ARTIST | The input names a real artist. Song prompts, lyrics and titles get this only on a model that screens them, and no v1 song model does today; the prompts for lyrics and cover art can still get it. Describe the sound instead. |
| GENERATION_LYRICS_MATCH_EXISTING_SONG | These lyrics match a song that already exists. Change the lyrics and try again. |
provider_unavailable (HTTP 503)
| Code | Meaning |
|---|---|
| AI_GENERATION_FAILED | Music generation failed. Please try again with different settings. |
| AI_GENERATION_PROVIDER_UNAVAILABLE | Generation is temporarily unavailable. Please try again shortly. |
| AI_GENERATION_TIMEOUT | Request timed out. Please try again. |
| COVER_PROVIDER_FAILED | Music generation failed. Please try again with different settings. |
| EXTERNAL_API_TIMEOUT | Request timed out. Please try again. |
| GENERATION_MODEL_IN_MAINTENANCE | This model is under maintenance. Pick another model or try later. |
| PUBLIC_API_CAPACITY_REACHED | The API is busy. Try again in a few minutes. |
service_unavailable (HTTP 503)
| Code | Meaning |
|---|---|
| SCREENING_UNAVAILABLE | Safety check temporarily unavailable, retry shortly. |
internal (HTTP 500)
| Code | Meaning |
|---|---|
| PUBLIC_API_INTERNAL_ERROR | Something went wrong on our side. Try again. |
content_refused codes and SCREENING_UNAVAILABLE come from models that screen their inputs, and from the checks on song titles and on lyrics and cover-art prompts. Hans 2.0 (hans-2 and hans-2-cover) does not screen song prompts or lyrics today.
Internal failures are not listed one by one: they answer type `internal` (HTTP 500). Retry once, then send the `request_id` to support.