curl --request POST \
--url https://api.aiid.edu.kg/suno/submit/music \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "suno_music",
"upstream_model": "suno-v6",
"prompt": "Create an energetic retro-pop DJ song about the artificial intelligence revolution.",
"make_instrumental": false
}
'{
"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".
Mô hình con khả dụng
| Loại | upstream_model |
|---|---|
| Nhạc | suno-v6 |
| 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.aiid.edu.kg/suno/submit/music \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "suno_music",
"upstream_model": "suno-v6",
"prompt": "Create an energetic retro-pop DJ song about the artificial intelligence revolution.",
"make_instrumental": false
}
'{
"code": "success",
"message": "",
"data": "task_xxx"
}Ủy quyền
Sử dụng xác thực Bearer Token.
Định dạng: Authorization: Bearer sk-xxxxxx
Nội dung
Luôn truyền suno_music.
suno_music "suno_music"
Prompt mô tả âm nhạc hoặc âm thanh.
Tên mô hình con, ví dụ suno-v6 hoặc suno-v5.5; mặc định là suno-v5.5.
"suno-v6"
MiniMax Speech 2.8 HD 的 voice、outputFormat、sampleRate、speed、volume、pitch 参数。
Có tạo chỉ phần nhạc đệm thuần túy hay không.
Có tạo theo hướng nhạc nhẹ/nhạc nền không.
Có tạo theo hướng nhạc không lời không.
Có sử dụng chế độ tùy chỉnh hay không.
Tiêu đề bài hát.
Thẻ phong cách, ví dụ electro pop, female vocal.
Nội dung lời bài hát.
