calesthio/OpenMontage · error · RuntimeError
No taskId in Suno response: {data}
Error message
No taskId in Suno response: {data} What it means
Raised by SunoTool after a successful HTTP POST to the Suno API when neither data.data.taskId nor data.taskId is present in the JSON response. The generation task was never created, so there is nothing to poll. It usually means the third-party Suno gateway returned an error payload or auth/quota message with HTTP 200, or the gateway's response schema differs from what this client expects.
Source
Thrown at tools/audio/suno_music.py:238
payload["title"] = inputs.get("title", "")
else:
payload["prompt"] = inputs["prompt"][:500] # description, max 500 chars
response = requests.post(
f"{self._BASE_URL}/generate",
headers={
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json",
},
json=payload,
timeout=30,
)
response.raise_for_status()
data = response.json()
task_id = data.get("data", {}).get("taskId") or data.get("taskId")
if not task_id:
raise RuntimeError(f"No taskId in Suno response: {data}")
return task_id
def _poll(self, task_id: str, api_key: str) -> dict:
"""Poll for task completion and return the result data."""
import requests
elapsed = 0
while elapsed < self._MAX_WAIT:
time.sleep(self._POLL_INTERVAL)
elapsed += self._POLL_INTERVAL
response = requests.get(
f"{self._BASE_URL}/generate/record-info",
params={"taskId": task_id},
headers={"Authorization": f"Bearer {api_key}"},
timeout=30,
)View on GitHub (pinned to 95e1c3d0ab)
Solutions
- Inspect the full response body included in the message — it states exactly what the gateway returned (auth error, quota, different schema).
- Verify the Suno API key is valid and the account has generation credits.
- Compare the returned JSON's task-id field name against data.data.taskId / taskId and add the correct key to the extraction in _create.
- Confirm the gateway base URL matches the provider documented for this tool version.
Example fix
// before
task_id = data.get("data", {}).get("taskId") or data.get("taskId")
// after (tolerate alternate schemas)
task_id = (
data.get("data", {}).get("taskId")
or data.get("taskId")
or data.get("data", {}).get("task_id")
or data.get("task_id")
)
if not task_id:
raise RuntimeError(f"No taskId in Suno response: {data}") Defensive patterns
Strategy: try-catch
Try / catch
try:
task_id = tool._create(payload, api_key)
except RuntimeError as e:
if "No taskId" in str(e):
# response body is embedded in the message; log it and check key/quota
raise Prevention
- Validate the Suno API key with a cheap endpoint before submitting generation jobs
- Log full gateway responses during integration to catch schema drift early
When it happens
Trigger: POSTing a generate-music payload to a Suno-compatible gateway (api-key via Bearer token) where the response body contains an error object, a different key name for the task id, or an HTML/login page instead of JSON with a taskId.
Common situations: Invalid or expired Suno API key; gateway quota exhausted; using a Suno proxy whose response schema (e.g. data.data.taskId vs taskId vs clipId) differs by version; base URL pointing to the wrong endpoint.
Related errors
- Suno generation failed with status: {status}
- Suno generation timed out after {self._MAX_WAIT}s (taskId: {
- Kling identify-face response missing data.session_id: {data}
- Refusing paid Atlas calls without --allow-paid
- Kling Classic task failed
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/d5999f98ed20c792.
Report an issue: GitHub.