Docs / Music Series / Suno / Utilities
Get Waveform Aggregates
Retrieve multi-resolution waveform data for a generated clip.
Purpose#
Submit a Waveform Aggregates (WAVEFORM) task to retrieve multi-resolution waveform aggregate data for a clip, suitable for rendering waveform visualizations on the front end. The API is asynchronous: once validation passes, the service immediately returns a public task_id and does not wait for the task to finish. Poll the task status and results afterwards with GET /v1/tasks/:id.
This action is a read-only analysis and does not modify the source audio. The returned multi-level (mip-map) aggregates make it efficient to render waveforms at different zoom levels.
clip_id must come from a previously completed task on this service; otherwise the request will fail.
Request Fields#
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
clip_id | string | Yes | — | UUID of the target clip; must come from a previously completed task on this service |
callback_url | string | No | — | Callback URL notified when the task reaches a terminal state |
clip_id is required. If it is missing, the API returns 400 clip_id_empty.
callback_url must be a publicly accessible HTTPS address no longer than 2048 characters. Local, internal-network, loopback, and link-local addresses are not allowed, nor are domain names that resolve to such addresses.
When the task completes or fails, the service sends a POST JSON request to this address. The callback receiver must return any 2xx status code within 10 seconds; timeouts, network errors, and non-2xx responses are all treated as failures.
After a failure, retries occur after 1, 2, and 4 seconds respectively, for at most 4 requests in total including the first attempt. The receiver should handle callbacks idempotently by task ID to avoid duplicate processing.
An invalid callback_url does not fail the submission, but the task receives no callback.
Request Example#
curl --request POST \
--url https://api.apimax.ai/v1/music/waveform \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"clip_id": "1f78f8de-4ca6-4375-ae79-46c33a2c97f7"
}'Success Response#
{
"created_at": 1795404803,
"id": "task_QsjBt6RqUd2xJlGoqQRyRGPScARbMISE",
"model": "suno_waveform",
"status": "queued",
"task_id": "task_QsjBt6RqUd2xJlGoqQRyRGPScARbMISE"
}Response Fields#
| Field | Type | Description |
|---|---|---|
task_id | string | Public task ID, used for subsequent queries and callbacks |
id | string | Same value as task_id |
status | string | Always queued right after submission |
model | string | Model name, always suno_waveform |
created_at | integer | Task creation time (Unix seconds) |
Use task_id for all subsequent queries.
Error Response#
Errors use the structure below, where error.code is the error code and error.message is the specific reason:
{
"error": {
"code": "plugin_request_invalid",
"message": "clip_id_empty",
"type": "max_api_error"
}
}| HTTP | error.code | error.message | Scenario |
|---|---|---|---|
| 400 | plugin_request_invalid | clip_id_empty | clip_id is empty |
| 400 | invalid_request | The parse error | The request body is not a valid JSON object |
| 400 | upstream_error | clip_id not produced by this pool | clip_id is not a clip generated by this service; rejected at submission |
| 503 | model_not_found | No available channel (includes group and model name) | No channel is currently available |
Query Task Results#
After a successful submission, poll using the returned task_id:
- Single query:
GET /v1/tasks/:id
status Enum#
| Value | Description |
|---|---|
queued | Task created, waiting to be processed |
in_progress | Task is being processed |
completed | Task finished; data is available |
failed | Task failed; error is available |
completed and failed are terminal states; keep polling for any other status.
Response Fields#
| Field | Type | Description |
|---|---|---|
id | string | Public task ID |
object | string | Always task |
model | string | Model name, always suno_waveform |
platform / type | string | Always suno |
status | string | Task status; see the enum above |
progress | integer | Progress percentage, 0–100 |
created_at | integer | Submission time (Unix seconds) |
started_at | integer | Processing start time (Unix seconds); omitted until the task starts |
finished_at | integer | Finish time (Unix seconds); omitted until the task finishes |
data | — | Task result; returned only when completed, structure described below |
error | object | Failure details; returned only when failed, with code and message |
When a task fails, status is failed and the reason is in error.message (for example task_timeout when the upstream times out); the charge is refunded.
Result Fields (data)#
The data field in the query result contains the waveform aggregate data:
{
"id": "task_IKO8PAN7zimncosvptgGMP2RFy1vllKy",
"model": "suno_waveform",
"object": "task",
"platform": "suno",
"type": "suno",
"status": "completed",
"progress": 100,
"created_at": 1783072840,
"started_at": 1783072841,
"finished_at": 1783072852,
"data": [
{
"waveform_aggregates": [
{
"mip_map_level": 19,
"data": [
[-39, 2, -24, 19, -4096, 2476, -5413, 4761],
[-6478, 8712, -17296, 17630, -27457, 22314, -24350, 25321]
]
}
]
}
]
}Here mip_map_level indicates the aggregation level (higher values are coarser), and data is the sample sequence at that level (a two-dimensional integer array where each group is typically a min/max amplitude pair within a window). The arrays in the example are truncated; each level actually contains a large number of samples. Field names and structure are subject to the actual response.

