calesthio/OpenMontage · error · RuntimeError

Suno generation failed with status: {status}

Error message

Suno generation failed with status: {status}

What it means

Raised while polling a Suno task when the API reports a terminal failure status: CREATE_TASK_FAILED, GENERATE_AUDIO_FAILED, or SENSITIVE_WORD_ERROR. Unlike PENDING/GENERATING states, these statuses never resolve, so the client aborts instead of polling forever. The status string names the failure class: task creation rejected, audio generation failed server-side, or the prompt lyrics tripped content moderation.

Source

Thrown at tools/audio/suno_music.py:269

            response = requests.get(
                f"{self._BASE_URL}/generate/record-info",
                params={"taskId": task_id},
                headers={"Authorization": f"Bearer {api_key}"},
                timeout=30,
            )
            response.raise_for_status()
            result = response.json()

            status = result.get("data", {}).get("status") or result.get("status", "")

            if status == "SUCCESS":
                return result.get("data", result)
            elif status in (
                "CREATE_TASK_FAILED",
                "GENERATE_AUDIO_FAILED",
                "SENSITIVE_WORD_ERROR",
            ):
                raise RuntimeError(f"Suno generation failed with status: {status}")

            # PENDING, GENERATING, TEXT_SUCCESS, FIRST_SUCCESS — keep polling

        raise TimeoutError(
            f"Suno generation timed out after {self._MAX_WAIT}s (taskId: {task_id})"
        )

    def _download(self, audio_url: str, inputs: dict[str, Any], api_key: str) -> Path:
        """Download the audio file to the output path."""
        import requests

        output_path = Path(inputs.get("output_path", "suno_output.mp3"))
        output_path.parent.mkdir(parents=True, exist_ok=True)

        response = requests.get(audio_url, timeout=120)
        response.raise_for_status()
        output_path.write_bytes(response.content)

View on GitHub (pinned to 95e1c3d0ab)

Solutions

  1. If status is SENSITIVE_WORD_ERROR: rewrite the prompt/lyrics removing flagged terms (artist names, explicit language, brand names) and resubmit.
  2. If CREATE_TASK_FAILED: check account quota/credits on the Suno gateway and validate request parameters.
  3. If GENERATE_AUDIO_FAILED: retry once after a short delay — transient model failures are common; if persistent, check the provider status page.
  4. Handle this error in the caller to surface the status to the end user instead of retrying blindly.

Example fix

// before
result = tool.run({"prompt": "a song about [artist name]", ...})

// after (moderation-safe prompt + error handling)
try:
    result = tool.run({"prompt": "an upbeat acoustic song about summer", ...})
except RuntimeError as e:
    if "SENSITIVE_WORD_ERROR" in str(e):
        result = tool.run({"prompt": sanitize(prompt), ...})
    else:
        raise
Defensive patterns

Strategy: try-catch

Try / catch

try:
    result = tool.run(inputs)
except RuntimeError as e:
    if "SENSITIVE_WORD_ERROR" in str(e):
        result = tool.run({**inputs, "prompt": sanitize(prompt)})
    else:
        raise

Prevention

When it happens

Trigger: Polling GET on a Suno taskId after generation, where the gateway returns status CREATE_TASK_FAILED (bad request/quota), GENERATE_AUDIO_FAILED (model-side failure), or SENSITIVE_WORD_ERROR (prompt or lyrics contained flagged words).

Common situations: Lyrics or style prompt containing names of public figures, violence/sexual terms, or trademarked brands triggering moderation; account out of credits causing task creation failure; Suno service outage causing generation failures.

Related errors


AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15). Data as JSON: /api/errors/09ffef71744af143. Report an issue: GitHub.