音效生成
curl --request POST \
--url https://api.ephone.ai/suno/v2/sounds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sound": "一声轻柔的雨滴"
}
'import requests
url = "https://api.ephone.ai/suno/v2/sounds"
payload = { "sound": "一声轻柔的雨滴" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({sound: '一声轻柔的雨滴'})
};
fetch('https://api.ephone.ai/suno/v2/sounds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ephone.ai/suno/v2/sounds"
payload := strings.NewReader("{\n \"sound\": \"一声轻柔的雨滴\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": "success",
"message": "success",
"data": {
"task_id": "5adac6ee-..."
}
}{
"code": "error",
"message": "music_id is required"
}{
"error": {
"message": "Invalid Token",
"type": "rix_api_error"
}
}{
"error": {
"message": "Too many requests, please try again later",
"type": "rix_api_error"
}
}生成新曲
音效生成
生成单次音效或可循环音效,可指定节拍与调性。
POST
/
suno
/
v2
/
sounds
音效生成
curl --request POST \
--url https://api.ephone.ai/suno/v2/sounds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sound": "一声轻柔的雨滴"
}
'import requests
url = "https://api.ephone.ai/suno/v2/sounds"
payload = { "sound": "一声轻柔的雨滴" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({sound: '一声轻柔的雨滴'})
};
fetch('https://api.ephone.ai/suno/v2/sounds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ephone.ai/suno/v2/sounds"
payload := strings.NewReader("{\n \"sound\": \"一声轻柔的雨滴\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": "success",
"message": "success",
"data": {
"task_id": "5adac6ee-..."
}
}{
"code": "error",
"message": "music_id is required"
}{
"error": {
"message": "Invalid Token",
"type": "rix_api_error"
}
}{
"error": {
"message": "Too many requests, please try again later",
"type": "rix_api_error"
}
}也可以用统一任务接口
POST /v1/task/submit 提交:model 填 suno/sounds,参数放进 input。两种写法效果与计费完全一样。任务结果
任务成功后,查询结果里产物的格式
任务结果
任务成功后,查询结果里产物的格式
任务成功后,
data.musics 里是产出的曲目,一次 1 条。部分成功时按实际成功的条数计费。{
"code": "success",
"data": {
"task_id": "5adac6ee-...",
"action": "sounds",
"model": "suno/sounds",
"status": "SUCCESS",
"progress": "100%",
"submit_time": 1757800000000,
"finish_time": 1757800120000,
"musics": [
{
"music_id": "89b20862-...",
"title": "Rain on Tin Roof",
"tags": "lo-fi piano",
"audio_url": "https://...",
"image_url": "https://...",
"duration": 187.56
}
]
}
}
string
必填
曲目 ID。续写、翻唱、分轨、导出等后续操作都填它。
string
标题。
string
风格标签。
string
歌词,纯伴奏没有这个字段。
string
音频地址,可直接下载。
string
封面图地址。
string
大尺寸封面图地址。
string
视频地址,没有视频时不返回。
number
时长,单位秒。
授权
在请求头 Authorization: Bearer YOUR_API_KEY 里带上 API Key。
请求体
application/json
音效描述:描述想要的音效,例如「一声轻柔的雨滴」。
模型版本:三个版本价格相同,按需要的风格选择。可选值:chirp-v6 v6(默认,均衡);chirp-v6-wild v6 Wild(风格更奔放);chirp-v6-mini v6 Mini(更快)。
可用选项:
chirp-v6, chirp-v6-wild, chirp-v6-mini 音效类型:单次触发的音效,还是可以无缝循环的音效。可选值:one-shot 单次触发;loop 无缝循环。
可用选项:
one-shot, loop 节拍:每分钟拍数,1 到 300 之间。
调性:音效所在的调。
可用选项:
C, C#, Cm, C#m, D, D#, Dm, D#m, F, F#, Fm, F#m, G, G#, Gm, G#m, A, A#, Am, A#m, B, B#, Bm, B#m 输出格式:成品音频的格式,不填默认 mp3。可选值:mp3 MP3(通用);m4a M4A;wav WAV(无损)。
可用选项:
mp3, m4a, wav 推送地址:任务结束后,把和查询结果相同的内容 POST 到这个地址(公网可以访问的 http / https 地址)。不传就自己查询。
此页面对您有帮助吗?