生成 Suno 人物
curl --request POST \
--url https://api.crun.ai/api/v1/client/job/suno-persona-generate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"task_id": "task_12345678",
"suno_id": "suno_abc123",
"name": "霓虹女妖",
"description": "一位烟熏感的深夜 R&B 女声,音色空灵且温暖,带有亲密感。",
"vocal_start": 12.5,
"vocal_end": 64,
"style": "西方 R&B,情绪化,私密感"
}
'import requests
url = "https://api.crun.ai/api/v1/client/job/suno-persona-generate"
payload = {
"task_id": "task_12345678",
"suno_id": "suno_abc123",
"name": "霓虹女妖",
"description": "一位烟熏感的深夜 R&B 女声,音色空灵且温暖,带有亲密感。",
"vocal_start": 12.5,
"vocal_end": 64,
"style": "西方 R&B,情绪化,私密感"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
task_id: 'task_12345678',
suno_id: 'suno_abc123',
name: '霓虹女妖',
description: '一位烟熏感的深夜 R&B 女声,音色空灵且温暖,带有亲密感。',
vocal_start: 12.5,
vocal_end: 64,
style: '西方 R&B,情绪化,私密感'
})
};
fetch('https://api.crun.ai/api/v1/client/job/suno-persona-generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.crun.ai/api/v1/client/job/suno-persona-generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'task_id' => 'task_12345678',
'suno_id' => 'suno_abc123',
'name' => '霓虹女妖',
'description' => '一位烟熏感的深夜 R&B 女声,音色空灵且温暖,带有亲密感。',
'vocal_start' => 12.5,
'vocal_end' => 64,
'style' => '西方 R&B,情绪化,私密感'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.crun.ai/api/v1/client/job/suno-persona-generate"
payload := strings.NewReader("{\n \"task_id\": \"task_12345678\",\n \"suno_id\": \"suno_abc123\",\n \"name\": \"霓虹女妖\",\n \"description\": \"一位烟熏感的深夜 R&B 女声,音色空灵且温暖,带有亲密感。\",\n \"vocal_start\": 12.5,\n \"vocal_end\": 64,\n \"style\": \"西方 R&B,情绪化,私密感\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.crun.ai/api/v1/client/job/suno-persona-generate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"task_id\": \"task_12345678\",\n \"suno_id\": \"suno_abc123\",\n \"name\": \"霓虹女妖\",\n \"description\": \"一位烟熏感的深夜 R&B 女声,音色空灵且温暖,带有亲密感。\",\n \"vocal_start\": 12.5,\n \"vocal_end\": 64,\n \"style\": \"西方 R&B,情绪化,私密感\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.crun.ai/api/v1/client/job/suno-persona-generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"task_id\": \"task_12345678\",\n \"suno_id\": \"suno_abc123\",\n \"name\": \"霓虹女妖\",\n \"description\": \"一位烟熏感的深夜 R&B 女声,音色空灵且温暖,带有亲密感。\",\n \"vocal_start\": 12.5,\n \"vocal_end\": 64,\n \"style\": \"西方 R&B,情绪化,私密感\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "success",
"data": {
"persona_id": "persona_123456"
}
}{
"code": 422,
"message": "task_id not found",
"data": null
}API参考
Suno API:人物(Persona)生成
基于已有 Suno 音乐作品生成一个音乐人物(Persona)。
POST
/
api
/
v1
/
client
/
job
/
suno-persona-generate
生成 Suno 人物
curl --request POST \
--url https://api.crun.ai/api/v1/client/job/suno-persona-generate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"task_id": "task_12345678",
"suno_id": "suno_abc123",
"name": "霓虹女妖",
"description": "一位烟熏感的深夜 R&B 女声,音色空灵且温暖,带有亲密感。",
"vocal_start": 12.5,
"vocal_end": 64,
"style": "西方 R&B,情绪化,私密感"
}
'import requests
url = "https://api.crun.ai/api/v1/client/job/suno-persona-generate"
payload = {
"task_id": "task_12345678",
"suno_id": "suno_abc123",
"name": "霓虹女妖",
"description": "一位烟熏感的深夜 R&B 女声,音色空灵且温暖,带有亲密感。",
"vocal_start": 12.5,
"vocal_end": 64,
"style": "西方 R&B,情绪化,私密感"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
task_id: 'task_12345678',
suno_id: 'suno_abc123',
name: '霓虹女妖',
description: '一位烟熏感的深夜 R&B 女声,音色空灵且温暖,带有亲密感。',
vocal_start: 12.5,
vocal_end: 64,
style: '西方 R&B,情绪化,私密感'
})
};
fetch('https://api.crun.ai/api/v1/client/job/suno-persona-generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.crun.ai/api/v1/client/job/suno-persona-generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'task_id' => 'task_12345678',
'suno_id' => 'suno_abc123',
'name' => '霓虹女妖',
'description' => '一位烟熏感的深夜 R&B 女声,音色空灵且温暖,带有亲密感。',
'vocal_start' => 12.5,
'vocal_end' => 64,
'style' => '西方 R&B,情绪化,私密感'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.crun.ai/api/v1/client/job/suno-persona-generate"
payload := strings.NewReader("{\n \"task_id\": \"task_12345678\",\n \"suno_id\": \"suno_abc123\",\n \"name\": \"霓虹女妖\",\n \"description\": \"一位烟熏感的深夜 R&B 女声,音色空灵且温暖,带有亲密感。\",\n \"vocal_start\": 12.5,\n \"vocal_end\": 64,\n \"style\": \"西方 R&B,情绪化,私密感\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.crun.ai/api/v1/client/job/suno-persona-generate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"task_id\": \"task_12345678\",\n \"suno_id\": \"suno_abc123\",\n \"name\": \"霓虹女妖\",\n \"description\": \"一位烟熏感的深夜 R&B 女声,音色空灵且温暖,带有亲密感。\",\n \"vocal_start\": 12.5,\n \"vocal_end\": 64,\n \"style\": \"西方 R&B,情绪化,私密感\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.crun.ai/api/v1/client/job/suno-persona-generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"task_id\": \"task_12345678\",\n \"suno_id\": \"suno_abc123\",\n \"name\": \"霓虹女妖\",\n \"description\": \"一位烟熏感的深夜 R&B 女声,音色空灵且温暖,带有亲密感。\",\n \"vocal_start\": 12.5,\n \"vocal_end\": 64,\n \"style\": \"西方 R&B,情绪化,私密感\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "success",
"data": {
"persona_id": "persona_123456"
}
}{
"code": 422,
"message": "task_id not found",
"data": null
}API 接口地址
POST https://api.crun.ai/api/v1/client/job/suno-persona-generate
该接口在完成校验后会同步返回 persona_id。
生成后的
生成后的
persona_id 可用于音乐生成、扩展、上传扩展以及翻唱等接口。请求示例
{
"task_id": "task_12345678",
"suno_id": "suno_abc123",
"name": "霓虹女妖",
"description": "一位烟熏感的深夜 R&B 女声歌手,音色轻柔空灵,高音细腻且富有亲密感。",
"vocal_start": 12.5,
"vocal_end": 64.0,
"style": "西方 R&B,氛围感,情绪化,私密感"
}
响应示例
success
{
"code": 200,
"message": "success",
"data": {
"persona_id": "persona_123456"
}
}
error
{
"code": 422,
"message": "task_id 不存在",
"data": null
}
相关资源
生成音乐
通过文本提示创建多种风格的歌曲。
扩展音乐
无缝续写并扩展已有音乐。
上传扩展
上传音频并对作品进行扩展与优化。
音乐翻唱
用新的风格或声音重新演绎歌曲。
授权
所有 API 均需通过 API Key 进行身份认证。
获取 API Key:
- 访问 API Key 管理页面 获取 API Key
使用方式: 在请求头中添加:
x-api-key: YOUR_API_KEY
注意:
- 请妥善保管 API Key,避免泄露
- 如怀疑泄露请立即重置
请求体
application/json
音乐任务 ID
示例:
"task_12345678"
Suno 歌曲 ID
示例:
"suno_abc123"
人物名称
Maximum string length:
100示例:
"霓虹女妖"
人物描述
Maximum string length:
1000示例:
"一位烟熏感的深夜 R&B 女声,音色空灵且温暖,带有亲密感。"
人声开始时间(秒)
必填范围:
x >= 0示例:
12.5
人声结束时间(秒)
必填范围:
x >= 0示例:
64
风格描述
Maximum string length:
1000示例:
"西方 R&B,情绪化,私密感"
此页面对您有帮助吗?
⌘I
