Skip to main content
GET
Get Task

Get Task

Retrieve the current status, input, and output of a previously created task. If the task is still in progress, sunor will live-poll the upstream provider and return the latest status.

Request

Path parameters

taskId
string
required
The task ID returned from the Create Task endpoint.

Headers

x-api-key
string
required
Your API key.

Response

code
number
HTTP status code (200 on success).
data
object
task_id
string
The unique task identifier.
model
string
The model used (e.g., "suno").
type
string
The task type ("music", "lyrics", "upload", or "concat").
status
string
Current task status. One of: "pending", "running", "success", "failure", "timeout".
credits_cost
number
Credits charged (or frozen) for this task.
input
object
The original input parameters submitted with the task.
output
object | null
The task output. null while the task is still processing. Contains model-specific results on completion.
error
string | null
Error message if the task failed. null otherwise.
created_at
string
ISO 8601 timestamp of task creation.
completed_at
string | null
ISO 8601 timestamp of task completion. null if not yet completed.

Status values

Output format

The output field structure depends on the task type. All outputs share a common wrapper:
output.task_type
string
The task type ("music", "lyrics", "upload", or "concat").
output.status
string
Internal processing status: "queued", "processing", "completed", or "failed".
output.progress
string | null
Processing progress (e.g., "50%", "100%").
output.fail_reason
string | null
Reason for failure, if any.
output.result
array | object | null
The task-specific result. Shape varies by task type (see below).

Output by task type

result is an array of clip objects. Each music generation typically returns one or more clip variations.

Example responses

Task in progress

200

Task completed (music)

200

Task failed

200

Polling strategy

Tasks typically take 30 seconds to 5 minutes to complete, depending on the task type and upstream provider load.
Poll the Get Task endpoint every 5-10 seconds until the status is "success", "failure", or "timeout". Avoid polling more frequently than once per second.

Polling example

Errors