Docs / Music Series / Suno / Upload Audio
Upload Audio
Import user audio as a Suno-owned clip; returns an async upload task ID. With copyright=true the request switches to the copyright pipeline.
Purpose#
Import user audio as a Suno-owned clip. This endpoint is an async pass-through: it returns a task_id as soon as validation passes, a background worker completes the native Suno upload flow, and once the task reaches SUCCESS the result contains a clip_id that can be used for continuation, covers, and similar scenarios.
When the request includes copyright=true, it switches to the copyright pipeline instead and produces a finished track (see "Copyright music branch" below).
Payload formats#
Four formats are supported:
| Method | Content-Type | Description |
|---|---|---|
| multipart | multipart/form-data | The file field is file or audio |
| Binary stream | audio/mpeg, audio/wav, etc. | The entire request body is the audio bytes |
| Base64 JSON | application/json | audio is standard base64; filename is optional |
| URL-pull JSON | application/json | audio_url is an http or https audio URL |
The request body is passed through to the upstream as-is; the relay performs no business-level parsing.
Optional fields#
Besides the audio itself, the following fields are accepted (form fields for multipart, body fields for JSON; title / mode only take effect with copyright=true):
| Field | Type | Description |
|---|---|---|
copyright | bool | Whether to treat the audio as copyrighted music. true routes the request into the copyright pipeline, whose output is a finished track instead of a regular clip; omitted or false keeps the native upload behavior unchanged |
title | string | Optional (copyright branch): name of the finished track and its Studio project |
mode | string | Optional (copyright branch): processing mode, defaults to auto; an invalid value returns 400 |
Request examples#
multipart#
file: @song.mp3You can also use the audio field:
audio: @song.wavBinary stream#
<binary content of song.mp3>Base64 JSON#
{
"audio": "SUQzBAAAAA...",
"filename": "song.mp3"
}URL-pull JSON#
{
"audio_url": "https://example.com/song.mp3"
}Copyright music branch#
Additional form fields for multipart:
curl -X POST https://api.apimax.ai/v1/music/upload/audio \
-H "Authorization: Bearer <your API key>" \
-F "file=@song.mp3" \
-F "copyright=true" \
-F "title=My Copyrighted Audio"Body fields for JSON (base64 / URL-pull):
{
"audio_url": "https://example.com/song.mp3",
"copyright": true,
"title": "My Copyrighted Audio",
"mode": "auto"
}Success response#
{
"code": "success",
"message": "",
"data": "task_UDLWWA3OKdbBgbTnae6qQdMLCrd03IXB"
}The task ID is generated by the gateway and looks like task_ followed by a random string.
Response fields#
| Field | Type | Description |
|---|---|---|
code | string | Response code; fixed to success on success |
message | string | Status message; usually empty on success |
data | string | Public task ID used for subsequent fetch queries |
Constraints and Errors#
A native upload needs at least 6 seconds of audio; shorter audio is rejected with 400 at submission. Errors use the structure below, where error.message is the reason returned by the upstream:
{
"error": {
"code": "upstream_error",
"message": "audio too short: record at least 6 seconds",
"type": "max_api_error",
"upstream": {
"code": "task_request_invalid"
}
}
}| HTTP | error.code | error.message | Scenario |
|---|---|---|---|
| 400 | upstream_error | one of audio or audio_url required | No audio was provided |
| 400 | upstream_error | audio too short: record at least 6 seconds | The audio is shorter than 6 seconds |
| 400 | upstream_error | only http/https allowed | audio_url is not an http/https URL |
| 400 | upstream_error | target resolves to a private address | audio_url points to a private or local address |
Fetching the result#
After a successful submission, poll with the returned task_id:
- Single task query:
GET /v1/tasks/:id
Once the task reaches SUCCESS, the result contains the imported clip_id.
Result example (native upload)#
The query endpoint returns a unified task object. When the task status is completed, the imported clip is in the data array; data[0].id is the clip_id used by subsequent generation actions such as continuation and covers:
{
"created_at": 1795404826,
"data": [
{
"duration": 6,
"id": "0116532b-5730-4319-b309-e9b82df74cc5",
"image_url": "https://cdn2.suno.ai/image_0116532b-5730-4319-b309-e9b82df74cc5.jpeg",
"status": "complete",
"title": "upload"
}
],
"finished_at": 1795404836,
"id": "task_UDLWWA3OKdbBgbTnae6qQdMLCrd03IXB",
"model": "suno_upload_audio",
"object": "task",
"platform": "suno",
"progress": 100,
"started_at": 1795404827,
"status": "completed",
"type": "suno"
}The result contains no audio_url, and title is always upload rather than the uploaded file name. With URL-pull uploads, the returned duration may be inaccurate.
Copyright music branch (copyright=true)#
With copyright=true, the uploaded audio no longer produces a regular clip; it is processed by the copyright pipeline and yields a finished audio track (m4a) plus the corresponding Suno clip_id. See the example below for the data[0] structure.
Constraints#
- Size limit 100MB (native upload allows 500MB); exceeding it returns
413. - Duration window 6 seconds to 8 minutes; out-of-range audio returns
400. - At least one available account is required, otherwise the API returns
503. - Duration varies by
mode, roughly 2–20 minutes.
Result example (copyright branch)#
Once the task status is completed, the finished track is in data[0]:
{
"created_at": 1785309517,
"data": [
{
"audio_url": "https://<platform-storage>/media/cdn/12d766df-257c-4874-9293-1d72a80072c4.m4a?<presigned-params>",
"clip_count": 6,
"duration": 206.59,
"final_clip_id": "12d766df-257c-4874-9293-1d72a80072c4",
"id": "12d766df-257c-4874-9293-1d72a80072c4",
"project_id": "b611dc6e-9eeb-4665-b706-cd1e2609d794",
"project_url": "https://suno.com/studio/b611dc6e-9eeb-4665-b706-cd1e2609d794",
"song_url": "https://suno.com/song/12d766df-257c-4874-9293-1d72a80072c4",
"status": "complete",
"title": "My Copyrighted Audio"
}
],
"finished_at": 1785309619,
"id": "task_EIGnOu1GpdX2moifZl3BbajqhNnadqGp",
"model": "suno_upload_audio",
"object": "task",
"platform": "suno",
"progress": 100,
"started_at": 1785309518,
"status": "completed",
"type": "suno"
}| Field | Description |
|---|---|
id / final_clip_id | Suno clip ID of the rendered finished track |
audio_url | Download URL of the finished audio (m4a, served from platform-owned storage; presigned link valid for about 7 days — transfer it promptly) |
song_url | Suno song page |
project_url / project_id | Studio project page / project ID |
clip_count | Segment count |
duration | Source audio duration (seconds) as sniffed at submission |
Copyright uploads are submitted through this endpoint withcopyright=true; the old standalone endpoint/v1/music/upload/copyright-audiohas been removed.

