curl --request POST \
--url https://api.apimart.ai/v1/music/generations/createModel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "suno",
"name": "warm folk model",
"audio_urls": [
"https://example.com/ref-01.mp3",
"https://example.com/ref-02.mp3",
"https://example.com/ref-03.wav",
"https://example.com/ref-04.m4a",
"https://example.com/ref-05.mp3",
"https://example.com/ref-06.mp3"
]
}'
import requests
response = requests.post(
"https://api.apimart.ai/v1/music/generations/createModel",
headers={"Authorization": "Bearer <token>"},
json={
"model": "suno",
"name": "warm folk model",
"audio_urls": [
"https://example.com/ref-01.mp3",
"https://example.com/ref-02.mp3",
"https://example.com/ref-03.wav",
"https://example.com/ref-04.m4a",
"https://example.com/ref-05.mp3",
"https://example.com/ref-06.mp3",
],
},
)
print(response.json())
const response = await fetch("https://api.apimart.ai/v1/music/generations/createModel", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "suno",
name: "warm folk model",
audio_urls: [
"https://example.com/ref-01.mp3",
"https://example.com/ref-02.mp3",
"https://example.com/ref-03.wav",
"https://example.com/ref-04.m4a",
"https://example.com/ref-05.mp3",
"https://example.com/ref-06.mp3"
]
})
});
console.log(await response.json());
{
"code": 200,
"data": [
{"status": "submitted", "task_id": "task_01M24YMN4EV04M84R5QYM77R1E"}
]
}
{
"code": 200,
"data": {
"id": "task_01M24YMN4EV04M84R5QYM77R1E",
"status": "completed",
"progress": 100,
"result": {
"model_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "warm folk music model"
}
}
}
Suno
Create a Custom Model
Create a custom Suno V6 model from 6–24 reference audio clips
POST
/
v1
/
music
/
generations
/
createModel
curl --request POST \
--url https://api.apimart.ai/v1/music/generations/createModel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "suno",
"name": "warm folk model",
"audio_urls": [
"https://example.com/ref-01.mp3",
"https://example.com/ref-02.mp3",
"https://example.com/ref-03.wav",
"https://example.com/ref-04.m4a",
"https://example.com/ref-05.mp3",
"https://example.com/ref-06.mp3"
]
}'
import requests
response = requests.post(
"https://api.apimart.ai/v1/music/generations/createModel",
headers={"Authorization": "Bearer <token>"},
json={
"model": "suno",
"name": "warm folk model",
"audio_urls": [
"https://example.com/ref-01.mp3",
"https://example.com/ref-02.mp3",
"https://example.com/ref-03.wav",
"https://example.com/ref-04.m4a",
"https://example.com/ref-05.mp3",
"https://example.com/ref-06.mp3",
],
},
)
print(response.json())
const response = await fetch("https://api.apimart.ai/v1/music/generations/createModel", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "suno",
name: "warm folk model",
audio_urls: [
"https://example.com/ref-01.mp3",
"https://example.com/ref-02.mp3",
"https://example.com/ref-03.wav",
"https://example.com/ref-04.m4a",
"https://example.com/ref-05.mp3",
"https://example.com/ref-06.mp3"
]
})
});
console.log(await response.json());
{
"code": 200,
"data": [
{"status": "submitted", "task_id": "task_01M24YMN4EV04M84R5QYM77R1E"}
]
}
{
"code": 200,
"data": {
"id": "task_01M24YMN4EV04M84R5QYM77R1E",
"status": "completed",
"progress": 100,
"result": {
"model_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "warm folk music model"
}
}
}
Model creation is asynchronous. After submission, poll the task with its
task_id; when it completes, read the custom model ID from data.result.model_id.curl --request POST \
--url https://api.apimart.ai/v1/music/generations/createModel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "suno",
"name": "warm folk model",
"audio_urls": [
"https://example.com/ref-01.mp3",
"https://example.com/ref-02.mp3",
"https://example.com/ref-03.wav",
"https://example.com/ref-04.m4a",
"https://example.com/ref-05.mp3",
"https://example.com/ref-06.mp3"
]
}'
import requests
response = requests.post(
"https://api.apimart.ai/v1/music/generations/createModel",
headers={"Authorization": "Bearer <token>"},
json={
"model": "suno",
"name": "warm folk model",
"audio_urls": [
"https://example.com/ref-01.mp3",
"https://example.com/ref-02.mp3",
"https://example.com/ref-03.wav",
"https://example.com/ref-04.m4a",
"https://example.com/ref-05.mp3",
"https://example.com/ref-06.mp3",
],
},
)
print(response.json())
const response = await fetch("https://api.apimart.ai/v1/music/generations/createModel", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "suno",
name: "warm folk model",
audio_urls: [
"https://example.com/ref-01.mp3",
"https://example.com/ref-02.mp3",
"https://example.com/ref-03.wav",
"https://example.com/ref-04.m4a",
"https://example.com/ref-05.mp3",
"https://example.com/ref-06.mp3"
]
})
});
console.log(await response.json());
Authorizations
string
required
Bearer Token. Obtain API Key from the API Key Management page.
Body
string
default:"suno"
Always use
suno.string
required
Custom model name. It cannot be empty after trimming leading and trailing whitespace.
string[]
required
From 6 to 24 publicly accessible direct HTTP(S) audio URLs. MP3, WAV, and M4A are recommended. Each URL must return an audio file directly, not a page that requires sign-in.
An invalid media file may cause the entire model-creation task to fail. Upload local files first and use their public URLs; do not send local paths or
blob: URLs.Response
integer
Response Status Codes.
array
Submission result. Read from
data[0].task_id, then query the training status through GET /v1/music/tasks/{task_id}.{
"code": 200,
"data": [
{"status": "submitted", "task_id": "task_01M24YMN4EV04M84R5QYM77R1E"}
]
}
{
"code": 200,
"data": {
"id": "task_01M24YMN4EV04M84R5QYM77R1E",
"status": "completed",
"progress": 100,
"result": {
"model_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "warm folk music model"
}
}
}
Use the created model
After completion, saveresult.model_id. Use it as custom_model_id in later custom-model requests, and omit version and persona_id.
{
"model": "suno",
"custom_model_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"custom": true,
"instrumental": false,
"prompt": "[Verse]\nan old wooden guitar plays a new journey",
"style": "acoustic folk, warm vocals",
"max_mode": true,
"audio_format": "mp3"
}