音色提取
curl --request POST \
--url https://api.ephone.ai/suno/v2/persona \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"music_id": "曲目 ID",
"name": "我的音色"
}
'import requests
url = "https://api.ephone.ai/suno/v2/persona"
payload = {
"music_id": "曲目 ID",
"name": "我的音色"
}
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({music_id: '曲目 ID', name: '我的音色'})
};
fetch('https://api.ephone.ai/suno/v2/persona', 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/persona"
payload := strings.NewReader("{\n \"music_id\": \"曲目 ID\",\n \"name\": \"我的音色\"\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
/
persona
音色提取
curl --request POST \
--url https://api.ephone.ai/suno/v2/persona \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"music_id": "曲目 ID",
"name": "我的音色"
}
'import requests
url = "https://api.ephone.ai/suno/v2/persona"
payload = {
"music_id": "曲目 ID",
"name": "我的音色"
}
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({music_id: '曲目 ID', name: '我的音色'})
};
fetch('https://api.ephone.ai/suno/v2/persona', 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/persona"
payload := strings.NewReader("{\n \"music_id\": \"曲目 ID\",\n \"name\": \"我的音色\"\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/persona,参数放进 input。两种写法效果与计费完全一样。任务结果
任务成功后,查询结果里产物的格式
任务结果
任务成功后,查询结果里产物的格式
任务成功后,
data.persona_id 是创建出的音色 ID。生成、翻唱、续写时填进 persona_id,就会用这个音色演唱。{
"code": "success",
"data": {
"task_id": "5adac6ee-...",
"action": "persona",
"model": "suno/persona",
"status": "SUCCESS",
"progress": "100%",
"persona_id": "c2f0e6a1-..."
}
}
授权
在请求头 Authorization: Bearer YOUR_API_KEY 里带上 API Key。
请求体
application/json
源曲目:要处理的曲目,填之前生成结果里的 music_id。
名称:给创建出来的音色或模型起个名字。
说明:对这个音色的补充说明。
人声起点:从第几秒开始取这段人声。与人声终点一起填,区间须短于 30 秒。
必填范围:
x >= 0人声终点:取到第几秒结束。须大于人声起点,且区间短于 30 秒。
适合风格:这个音色适合演绎的曲风。
推送地址:任务结束后,把和查询结果相同的内容 POST 到这个地址(公网可以访问的 http / https 地址)。不传就自己查询。
此页面对您有帮助吗?