Register audio
curl --request POST \
--url https://apistable.com/api/v1/tasks/create_task \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "suno_upload",
"input": {
"upload_url": "https://example.com/sample.mp3"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'suno_upload', input: {upload_url: 'https://example.com/sample.mp3'}})
};
fetch('https://apistable.com/api/v1/tasks/create_task', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apistable.com/api/v1/tasks/create_task"
payload = {
"model": "suno_upload",
"input": { "upload_url": "https://example.com/sample.mp3" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"code": 200,
"msg": "success",
"data": {
"task_id": "<string>"
}
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}API reference
Register audio
Register an existing audio URL to obtain an APIstable audio ID for covering or extending it.
POST
/
api
/
v1
/
tasks
/
create_task
Register audio
curl --request POST \
--url https://apistable.com/api/v1/tasks/create_task \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "suno_upload",
"input": {
"upload_url": "https://example.com/sample.mp3"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'suno_upload', input: {upload_url: 'https://example.com/sample.mp3'}})
};
fetch('https://apistable.com/api/v1/tasks/create_task', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apistable.com/api/v1/tasks/create_task"
payload = {
"model": "suno_upload",
"input": { "upload_url": "https://example.com/sample.mp3" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"code": 200,
"msg": "success",
"data": {
"task_id": "<string>"
}
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}Operations are enabled individually by server configuration. Disabled operations return 503 without a task. Music credit deduction is currently disabled.
Using this operation
Register an existing audio URL to obtain an APIstable audio ID for covering or extending it.-
- Prepare the fields shown in the example below. Replace sample URLs and IDs with resources you can access.
-
- Set model to suno_upload and place the parameters inside input. Submit once and save the returned task_id.
-
- Query the saved task or receive its callback. A processing result is not a reason to submit the operation again.
- Read songs from result.data.data. Each song has its own APIstable id, which can be used as audio_id in a later task.
Create task
One operation, one execution item. The server records the provider, account, every upstream stage and output mapping. All IDs in the public API are APIstable IDs. Music credit deduction is not enabled.{
"model": "suno_upload",
"input": {
"upload_url": "https://example.com/sample.mp3"
}
}
Parameter reference
| Field | Type | Required | Description and limits |
|---|---|---|---|
| upload_url | string | Yes | Public HTTPS audio URL. Submit a URL, not a file or file ID. |
| copyright_audio | boolean | No / conditional | PayAPI upload extension, default false; enabling may incur additional supplier cost. default: false |
Inputs and limits
Read the input schema below for every supported field, required flag, enum, range and default. Unknown parameters are rejected. URL fields accept public HTTPS URLs, never file objects.{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"upload_url": {
"type": "string",
"format": "uri",
"description": "Public HTTPS audio URL. Submit a URL, not a file or file ID."
},
"copyright_audio": {
"default": false,
"type": "boolean",
"description": "PayAPI upload extension, default false; enabling may incur additional supplier cost."
}
},
"required": [
"upload_url"
],
"additionalProperties": false
}
Important conditions
- Song audio may be MP3 or M4A, matching the supplier media. M4A is never relabeled as MP3. Use suno_export_mp3 for an actual MP3. Unavailable optional covers are null; the audio remains usable.
- Uploads remain available for 24 hours, generated files for 14 days, task details for 30 days. MP3 reuse keeps the source expiry. Valid Voice identity mappings survive task-log cleanup.
Result
The creation response is {code:200,msg:“success”,data:{task_id}}. Poll GET /api/v1/tasks/{task_id}. On success, data.result is an object matching the schema below; it is otherwise null. input remains a JSON string.{
"type": "object",
"required": [
"code",
"msg",
"data"
],
"properties": {
"code": {
"const": 200
},
"msg": {
"type": "string"
},
"data": {
"type": "object",
"required": [
"callbackType",
"task_id",
"data"
],
"properties": {
"callbackType": {
"const": "complete"
},
"task_id": {
"type": "string"
},
"data": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"audio_url",
"stream_audio_url",
"image_url",
"prompt",
"lyrics",
"model_name",
"title",
"createTime",
"duration",
"tags",
"source_audio_url",
"source_image_url",
"source_stream_audio_url"
],
"properties": {
"id": {
"type": "string"
},
"audio_url": {
"type": "string"
},
"stream_audio_url": {
"type": [
"string",
"null"
]
},
"image_url": {
"type": [
"string",
"null"
]
},
"prompt": {
"type": "string"
},
"lyrics": {
"type": [
"string",
"null"
]
},
"model_name": {
"type": [
"string",
"null"
]
},
"title": {
"type": [
"string",
"null"
]
},
"createTime": {
"type": [
"integer",
"null"
]
},
"duration": {
"type": [
"number",
"null"
]
},
"tags": {
"type": [
"string",
"null"
]
},
"source_audio_url": {
"type": "string"
},
"source_image_url": {
"type": [
"string",
"null"
]
},
"source_stream_audio_url": {
"type": [
"string",
"null"
]
}
}
}
}
}
}
}
}
Related workflows
Voice: all four steps File uploads CallbacksAuthorizations
Every valid key can submit and query its own account. Revoked keys are rejected.
Body
application/json