Docs / Music Series / Suno / Utilities
Crop an Audio Clip
Crop out or remove a specified time range of a generated clip.
Purpose#
Submit a crop (CROP) task to trim a clip generated by this service, producing a new clip. The endpoint 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 result afterwards with GET /v1/tasks/:id.
CROP works with the source clip_id and the crop range crop_start_s / crop_end_s: it does not regenerate music but crops the existing clip's audio to a time range. Use is_crop_remove to choose between keeping that range and removing it. The clip_id must come from a task result generated by this service.
CROP requires clip_id, crop_start_s, and crop_end_s; is_crop_remove, title, and callback_url are optional fields.
Request Fields#
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
clip_id | string | Yes | — | UUID of the target Suno clip; must come from a task result generated by this service |
crop_start_s | number | Yes | — | Crop start point in seconds; must be >= 0 |
crop_end_s | number | Yes | — | Crop end point in seconds; must be strictly greater than crop_start_s |
is_crop_remove | bool | No | false | true removes the range; false keeps the range |
title | string | No | — | Title of the new clip; auto-generated when left empty |
callback_url | string | No | — | Callback URL notified when the task reaches a terminal state |
clip_id, crop_start_s, and crop_end_s are all required:
- An empty clip_id returns clip_id_empty.
- If either crop_start_s or crop_end_s is missing, crop_range_empty is returned (an explicit 0 counts as set, preserving explicit-zero semantics).
- crop_end_s must be strictly greater than crop_start_s; otherwise crop_range_invalid is returned.
callback_url must be a publicly accessible HTTPS URL no longer than 2048 characters. Local, intranet, loopback, and link-local addresses are prohibited, as are domains that resolve to such addresses.
When the task completes or fails, the service sends a POST with a JSON payload to this URL. The receiving endpoint must return any 2xx status code within 10 seconds; timeouts, network errors, and non-2xx responses are all treated as failures.
After a failure, the service retries after 1, 2, and 4 seconds respectively, sending the request at most 4 times including the first attempt. The receiver should use the task ID for idempotent processing to avoid handling duplicates.
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/crop \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"clip_id": "1f78f8de-4ca6-4375-ae79-46c33a2c97f7",
"crop_start_s": 10.0,
"crop_end_s": 45.0,
"is_crop_remove": false,
"title": "Edited Version"
}'Success Response#
{
"created_at": 1795404668,
"id": "task_ALSGLOfQOKekf6SDtp7L1G1KByXc8MBO",
"model": "suno_crop",
"status": "queued",
"task_id": "task_ALSGLOfQOKekf6SDtp7L1G1KByXc8MBO"
}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_crop |
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 | plugin_request_invalid | crop_range_empty | crop_start_s or crop_end_s is missing |
| 400 | plugin_request_invalid | crop_range_invalid | crop_end_s is not greater than crop_start_s, or a value is negative |
| 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 |
Querying the Task Result#
After a successful submission, poll with the returned task_id:
- Single task 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 readable |
failed | Task failed; error is readable |
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_crop |
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)#
In the query result, the data field contains the new clip generated by the crop, including its audio URL and related information. The example below shows selected metadata fields only.
{
"created_at": 1795404668,
"data": [
{
"audio_url": "https://cdn2.suno.show/media/export/6b66f1d1-7fef-487d-87e6-0ffae9a062e8.mp3",
"created_at": "2026-11-23T03:31:13.621Z",
"id": "6b66f1d1-7fef-487d-87e6-0ffae9a062e8",
"image_url": "https://cdn2.suno.ai/image_6b66f1d1-7fef-487d-87e6-0ffae9a062e8.jpeg",
"status": "complete",
"title": "你在身旁",
"metadata": {
"duration": 30,
"edited_clip_id": "a1cfafb6-687a-472d-8493-35d0d621667f",
"type": "edit_crop"
}
}
],
"finished_at": 1795404734,
"id": "task_ALSGLOfQOKekf6SDtp7L1G1KByXc8MBO",
"model": "suno_crop",
"object": "task",
"platform": "suno",
"progress": 100,
"started_at": 1795404668,
"status": "completed",
"type": "suno"
}data[] is the array of new clips generated by the crop: audio_url / image_url are the result audio and cover art URLs, metadata.type is edit_crop, metadata.edited_clip_id points to the source clip, and duration is the new clip's length in seconds. Field names and structure are subject to the actual response.

