curl --request POST \
--url https://api.newapi.si/suno/submit/music \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "suno_music",
"upstream_model": "sd-music-1.0-preview",
"duration": 60,
"prompt": "A quiet piano piece with gentle rain."
}
'{
"code": "success",
"message": "",
"data": "task_xxx"
}Tạo tác vụ tạo nhạc hoặc âm thanh
API gửi yêu cầu tạo nhạc và âm thanh, tương thích với đường dẫn cũ /suno/submit/music. Trả về ID tác vụ, sau đó truy vấn qua /suno/fetch/{task_id}.
Giao diện gửi tác vụ tạo nhạc và âm thanh. Truyền tên mô hình con qua upstream_model. Giao diện tạo trả về task_id, sau đó dùng /suno/fetch/{task_id} để truy vấn đầu ra.
Khi không truyền upstream_model (hoặc chỉ truyền {"model":"suno_music"}), mặc định dùng Suno v5.5. Nếu cần tiếp tục dùng phiên bản Suno cũ, vui lòng truyền rõ "upstream_model":"suno-v5".
SeedMusic sử dụng cùng một đường dẫn gửi yêu cầu và truy vấn. Truyền model: "suno_music", upstream_model: "sd-music-1.0-preview", prompt và số nguyên tùy chọn duration (30~360 giây, mặc định 30 giây). Prompt có độ dài từ 1 đến 4000 ký tự. Sau khi thành công, đọc âm thanh từ audio_url của đoạn.
{
"model": "suno_music",
"upstream_model": "sd-music-1.0-preview",
"prompt": "安静的钢琴曲,伴有轻柔的雨声",
"duration": 60
}
Mô hình con khả dụng
| Loại | upstream_model |
|---|---|
| Nhạc | suno-v6 |
| Tạo nhạc từ văn bản | sd-music-1.0-preview |
| Nhạc | suno-v5.5 |
| Nhạc | suno-v5 |
| Nhạc | lyria-3-pro |
| Âm thanh | seed-audio-1.0 |
| Âm thanh | minimax-speech-2.8-hd |
Chế độ mô tả prompt
Phù hợp khi chỉ mô tả phong cách, cảm xúc, ngôn ngữ, kiểu giọng hát và bối cảnh; mô hình sẽ tự động tạo nội dung bài hát.
{
"model": "suno_music",
"upstream_model": "suno-v6",
"prompt": "Create an energetic retro-pop DJ song about the artificial intelligence revolution.",
"make_instrumental": false
}
Tạo âm thanh
MiniMax Speech có thể thiết lập tham số giọng nói qua extraParams.
{
"model": "suno_music",
"upstream_model": "minimax-speech-2.8-hd",
"prompt": "欢迎使用新版语音生成服务。",
"extraParams": {
"voice": "moss_audio_ce44fc67-7ce3-11f0-8de5-96e35d26fb85",
"outputFormat": "mp3",
"sampleRate": 32000,
"speed": 1,
"volume": 1,
"pitch": 0
}
}
Khi MiniMax Speech không truyền tham số giọng nói, máy chủ mặc định gửi các giá trị voice, outputFormat=mp3, sampleRate=32000, speed=1, volume=1 và pitch=0 như trong ví dụ trên.
Lyria 3 Pro sử dụng upstream_model=lyria-3-pro:
{
"model": "suno_music",
"upstream_model": "lyria-3-pro",
"prompt": "Cinematic orchestral music with a hopeful finale."
}
Nhạc nhẹ hoặc nhạc nền không lời
Có thể dùng light_music=true hoặc make_instrumental=true. light_music biểu thị thiên về nhạc nhẹ/nhạc nền, make_instrumental biểu thị không tạo giọng hát.
{
"model": "suno_music",
"upstream_model": "minimax-music-v2.6",
"prompt": "Warm cafe background music with soft piano and strings, relaxing and cinematic.",
"light_music": true,
"make_instrumental": true
}
Chế độ nâng cao cho lời bài hát
Phù hợp khi phía nghiệp vụ đã chuẩn bị sẵn lời bài hát và cần chỉ định tiêu đề cùng nhãn phong cách. Truyền custom_mode=true và dùng lyrics để gửi lời bài hát.
{
"model": "suno_music",
"upstream_model": "mureka-v9",
"custom_mode": true,
"title": "Summer Sea Breeze",
"tags": "electro pop, female vocal, bright summer",
"lyrics": "[Verse]\nSea breeze moves across the white sand\n[Chorus]\nTurn the summer into a beam of light"
}
Truy vấn
Sau khi tạo thành công, hãy lưu lại data task ID được trả về, ví dụ task_xxx, rồi gọi GET /suno/fetch/{task_id} để truy vấn trạng thái, địa chỉ âm thanh, ảnh bìa, tiêu đề, lời bài hát và thông tin đoạn dữ liệu gốc do upstream trả về.
curl --request POST \
--url https://api.newapi.si/suno/submit/music \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "suno_music",
"upstream_model": "sd-music-1.0-preview",
"duration": 60,
"prompt": "A quiet piano piece with gentle rain."
}
'{
"code": "success",
"message": "",
"data": "task_xxx"
}Ủy quyền
Nội dung
MiniMax Speech 2.8 HD 的 voice、outputFormat、sampleRate、speed、volume、pitch 参数。
