专属模型训练
curl --request POST \
--url https://api.ephone.ai/suno/v2/create-model \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"audio_urls": [
"https://example.com/a.mp3",
"https://example.com/b.mp3"
],
"name": "我的音色"
}
'import requests
url = "https://api.ephone.ai/suno/v2/create-model"
payload = {
"audio_urls": ["https://example.com/a.mp3", "https://example.com/b.mp3"],
"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({
audio_urls: ['https://example.com/a.mp3', 'https://example.com/b.mp3'],
name: '我的音色'
})
};
fetch('https://api.ephone.ai/suno/v2/create-model', 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/create-model"
payload := strings.NewReader("{\n \"audio_urls\": [\n \"https://example.com/a.mp3\",\n \"https://example.com/b.mp3\"\n ],\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"
}
}音色与模型
专属模型训练
用 6 到 24 段音频训练属于你的风格模型。
POST
/
suno
/
v2
/
create-model
专属模型训练
curl --request POST \
--url https://api.ephone.ai/suno/v2/create-model \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"audio_urls": [
"https://example.com/a.mp3",
"https://example.com/b.mp3"
],
"name": "我的音色"
}
'import requests
url = "https://api.ephone.ai/suno/v2/create-model"
payload = {
"audio_urls": ["https://example.com/a.mp3", "https://example.com/b.mp3"],
"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({
audio_urls: ['https://example.com/a.mp3', 'https://example.com/b.mp3'],
name: '我的音色'
})
};
fetch('https://api.ephone.ai/suno/v2/create-model', 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/create-model"
payload := strings.NewReader("{\n \"audio_urls\": [\n \"https://example.com/a.mp3\",\n \"https://example.com/b.mp3\"\n ],\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/create-model,参数放进 input。两种写法效果与计费完全一样。任务结果
任务成功后,查询结果里产物的格式
任务结果
任务成功后,查询结果里产物的格式
训练完成后,
data.model_id 是训练好的模型 ID。生成时填进 model_id,就会用这个模型创作。训练较慢,建议用 notify_hook 接收结果。{
"code": "success",
"data": {
"task_id": "5adac6ee-...",
"action": "create-model",
"model": "suno/create-model",
"status": "SUCCESS",
"progress": "100%",
"model_id": "7d9a2b44-..."
}
}
授权
在请求头 Authorization: Bearer YOUR_API_KEY 里带上 API Key。
请求体
application/json
此页面对您有帮助吗?