cURL
curl --request POST \
--url https://api.ttapi.io/suno/v1/upload-extend \
--header 'Content-Type: application/json' \
--header 'TT-API-KEY: <api-key>' \
--data '
{
"audio_url": "<string>",
"continue_at": 10,
"mv": "chirp-v6",
"prompt": "<string>",
"title": "<string>",
"tags": "rock, blues, hip-hop, r&b",
"negative_tags": "<string>",
"style_weight": 0.5,
"weirdness_constraint": 0.5,
"audio_weight": 0.5,
"duration": 120,
"auto_lyrics": false,
"persona_id": "<string>",
"max_mode": false,
"audio_format": "mp3",
"hookUrl": "<string>",
"isStorage": true
}
'import requests
url = "https://api.ttapi.io/suno/v1/upload-extend"
payload = {
"audio_url": "<string>",
"continue_at": 10,
"mv": "chirp-v6",
"prompt": "<string>",
"title": "<string>",
"tags": "rock, blues, hip-hop, r&b",
"negative_tags": "<string>",
"style_weight": 0.5,
"weirdness_constraint": 0.5,
"audio_weight": 0.5,
"duration": 120,
"auto_lyrics": False,
"persona_id": "<string>",
"max_mode": False,
"audio_format": "mp3",
"hookUrl": "<string>",
"isStorage": True
}
headers = {
"TT-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'TT-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
audio_url: '<string>',
continue_at: 10,
mv: 'chirp-v6',
prompt: '<string>',
title: '<string>',
tags: 'rock, blues, hip-hop, r&b',
negative_tags: '<string>',
style_weight: 0.5,
weirdness_constraint: 0.5,
audio_weight: 0.5,
duration: 120,
auto_lyrics: false,
persona_id: '<string>',
max_mode: false,
audio_format: 'mp3',
hookUrl: '<string>',
isStorage: true
})
};
fetch('https://api.ttapi.io/suno/v1/upload-extend', 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.ttapi.io/suno/v1/upload-extend",
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([
'audio_url' => '<string>',
'continue_at' => 10,
'mv' => 'chirp-v6',
'prompt' => '<string>',
'title' => '<string>',
'tags' => 'rock, blues, hip-hop, r&b',
'negative_tags' => '<string>',
'style_weight' => 0.5,
'weirdness_constraint' => 0.5,
'audio_weight' => 0.5,
'duration' => 120,
'auto_lyrics' => false,
'persona_id' => '<string>',
'max_mode' => false,
'audio_format' => 'mp3',
'hookUrl' => '<string>',
'isStorage' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"TT-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.ttapi.io/suno/v1/upload-extend"
payload := strings.NewReader("{\n \"audio_url\": \"<string>\",\n \"continue_at\": 10,\n \"mv\": \"chirp-v6\",\n \"prompt\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": \"rock, blues, hip-hop, r&b\",\n \"negative_tags\": \"<string>\",\n \"style_weight\": 0.5,\n \"weirdness_constraint\": 0.5,\n \"audio_weight\": 0.5,\n \"duration\": 120,\n \"auto_lyrics\": false,\n \"persona_id\": \"<string>\",\n \"max_mode\": false,\n \"audio_format\": \"mp3\",\n \"hookUrl\": \"<string>\",\n \"isStorage\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("TT-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.ttapi.io/suno/v1/upload-extend")
.header("TT-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"audio_url\": \"<string>\",\n \"continue_at\": 10,\n \"mv\": \"chirp-v6\",\n \"prompt\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": \"rock, blues, hip-hop, r&b\",\n \"negative_tags\": \"<string>\",\n \"style_weight\": 0.5,\n \"weirdness_constraint\": 0.5,\n \"audio_weight\": 0.5,\n \"duration\": 120,\n \"auto_lyrics\": false,\n \"persona_id\": \"<string>\",\n \"max_mode\": false,\n \"audio_format\": \"mp3\",\n \"hookUrl\": \"<string>\",\n \"isStorage\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ttapi.io/suno/v1/upload-extend")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TT-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"audio_url\": \"<string>\",\n \"continue_at\": 10,\n \"mv\": \"chirp-v6\",\n \"prompt\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": \"rock, blues, hip-hop, r&b\",\n \"negative_tags\": \"<string>\",\n \"style_weight\": 0.5,\n \"weirdness_constraint\": 0.5,\n \"audio_weight\": 0.5,\n \"duration\": 120,\n \"auto_lyrics\": false,\n \"persona_id\": \"<string>\",\n \"max_mode\": false,\n \"audio_format\": \"mp3\",\n \"hookUrl\": \"<string>\",\n \"isStorage\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"message": "success",
"data": {
"jobId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}{
"status": "FAILED",
"message": "<string>",
"data": {}
}{
"status": "FAILED",
"message": "Wrong TT-API-KEY or email is not activated."
}Suno
Suno Upload Extend API 文档
通过一条请求上传外部音频并续写延伸。
POST
/
suno
/
v1
/
upload-extend
cURL
curl --request POST \
--url https://api.ttapi.io/suno/v1/upload-extend \
--header 'Content-Type: application/json' \
--header 'TT-API-KEY: <api-key>' \
--data '
{
"audio_url": "<string>",
"continue_at": 10,
"mv": "chirp-v6",
"prompt": "<string>",
"title": "<string>",
"tags": "rock, blues, hip-hop, r&b",
"negative_tags": "<string>",
"style_weight": 0.5,
"weirdness_constraint": 0.5,
"audio_weight": 0.5,
"duration": 120,
"auto_lyrics": false,
"persona_id": "<string>",
"max_mode": false,
"audio_format": "mp3",
"hookUrl": "<string>",
"isStorage": true
}
'import requests
url = "https://api.ttapi.io/suno/v1/upload-extend"
payload = {
"audio_url": "<string>",
"continue_at": 10,
"mv": "chirp-v6",
"prompt": "<string>",
"title": "<string>",
"tags": "rock, blues, hip-hop, r&b",
"negative_tags": "<string>",
"style_weight": 0.5,
"weirdness_constraint": 0.5,
"audio_weight": 0.5,
"duration": 120,
"auto_lyrics": False,
"persona_id": "<string>",
"max_mode": False,
"audio_format": "mp3",
"hookUrl": "<string>",
"isStorage": True
}
headers = {
"TT-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'TT-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
audio_url: '<string>',
continue_at: 10,
mv: 'chirp-v6',
prompt: '<string>',
title: '<string>',
tags: 'rock, blues, hip-hop, r&b',
negative_tags: '<string>',
style_weight: 0.5,
weirdness_constraint: 0.5,
audio_weight: 0.5,
duration: 120,
auto_lyrics: false,
persona_id: '<string>',
max_mode: false,
audio_format: 'mp3',
hookUrl: '<string>',
isStorage: true
})
};
fetch('https://api.ttapi.io/suno/v1/upload-extend', 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.ttapi.io/suno/v1/upload-extend",
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([
'audio_url' => '<string>',
'continue_at' => 10,
'mv' => 'chirp-v6',
'prompt' => '<string>',
'title' => '<string>',
'tags' => 'rock, blues, hip-hop, r&b',
'negative_tags' => '<string>',
'style_weight' => 0.5,
'weirdness_constraint' => 0.5,
'audio_weight' => 0.5,
'duration' => 120,
'auto_lyrics' => false,
'persona_id' => '<string>',
'max_mode' => false,
'audio_format' => 'mp3',
'hookUrl' => '<string>',
'isStorage' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"TT-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.ttapi.io/suno/v1/upload-extend"
payload := strings.NewReader("{\n \"audio_url\": \"<string>\",\n \"continue_at\": 10,\n \"mv\": \"chirp-v6\",\n \"prompt\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": \"rock, blues, hip-hop, r&b\",\n \"negative_tags\": \"<string>\",\n \"style_weight\": 0.5,\n \"weirdness_constraint\": 0.5,\n \"audio_weight\": 0.5,\n \"duration\": 120,\n \"auto_lyrics\": false,\n \"persona_id\": \"<string>\",\n \"max_mode\": false,\n \"audio_format\": \"mp3\",\n \"hookUrl\": \"<string>\",\n \"isStorage\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("TT-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.ttapi.io/suno/v1/upload-extend")
.header("TT-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"audio_url\": \"<string>\",\n \"continue_at\": 10,\n \"mv\": \"chirp-v6\",\n \"prompt\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": \"rock, blues, hip-hop, r&b\",\n \"negative_tags\": \"<string>\",\n \"style_weight\": 0.5,\n \"weirdness_constraint\": 0.5,\n \"audio_weight\": 0.5,\n \"duration\": 120,\n \"auto_lyrics\": false,\n \"persona_id\": \"<string>\",\n \"max_mode\": false,\n \"audio_format\": \"mp3\",\n \"hookUrl\": \"<string>\",\n \"isStorage\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ttapi.io/suno/v1/upload-extend")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TT-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"audio_url\": \"<string>\",\n \"continue_at\": 10,\n \"mv\": \"chirp-v6\",\n \"prompt\": \"<string>\",\n \"title\": \"<string>\",\n \"tags\": \"rock, blues, hip-hop, r&b\",\n \"negative_tags\": \"<string>\",\n \"style_weight\": 0.5,\n \"weirdness_constraint\": 0.5,\n \"audio_weight\": 0.5,\n \"duration\": 120,\n \"auto_lyrics\": false,\n \"persona_id\": \"<string>\",\n \"max_mode\": false,\n \"audio_format\": \"mp3\",\n \"hookUrl\": \"<string>\",\n \"isStorage\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"message": "success",
"data": {
"jobId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}{
"status": "FAILED",
"message": "<string>",
"data": {}
}{
"status": "FAILED",
"message": "Wrong TT-API-KEY or email is not activated."
}当你已有可公开访问的音频地址,又不想分别调用 上传 和 续写扩展 时,使用该接口即可一次完成上传并延伸。
- 提交可公开访问的
audio_url,建议音频时长不超过 8 分钟。 continue_at必须>= 1,且必须小于上传音频的实际时长。- 该接口始终按自定义模式处理。如果
prompt为空,则按纯音乐延伸。\ - 保存返回的
jobId,再通过 Suno Fetch V2 或hookUrl回调获取结果。
请求体
application/json
待上传并延伸的公开音频地址。建议时长不超过 8 分钟。
从原音频第几秒开始延伸。必须 >= 1,且必须小于上传音频的实际时长。
示例:
10
歌词
自定义模式下(custom=true):当 instrumental 为 false 时必填。将作为歌词使用并在生成的音轨中演唱,最多5000字符。
音乐标题
自定义模式下(custom=true)使用,最多80字符。
音乐风格
自定义模式下(custom=true)使用,最多1000字符
示例:
"rock, blues, hip-hop, r&b"
不想要生成的音乐风格
自定义模式下(custom=true)使用。
音乐风格权重,范围0.00-1.00
自定义模式下使用,赋值范围: 0 <= x <= 1。
示例:
0.5
音频奇妙度权重,范围0.00-1.00
自定义模式下使用,赋值范围: 0 <= x <= 1。
示例:
0.5
音频权重,范围0.00-1.00
自定义模式下使用,赋值范围: 0 <= x <= 1。
示例:
0.5
音频时长,单位:秒
自定义模式下使用,赋值范围: 10 <= x <= 360。
示例:
120
是否自动生成歌词,自定义模式专用
- true:根据输入的歌词进行二次创作,与灵感模式提示词效果一致
- false:使用输入的歌词生成音乐
音色性别
-
Male:男性
-
Female:女性
可用选项:
Male, Female 音乐风格id,自定义模式专用
使用此参数为音乐生成特定的音乐风格。不能与 mv=chirp-custom:{model_id} 同时使用。
风格多样性。控制生成结果相对指定风格的变化程度。
- off:Exact style(精确风格)
- normal:Balanced variety(均衡变化)
- high:Distinct styles(风格差异明显)
- extra:Bold exploration(大胆探索)
- max:Unreasonably varied(极度发散)
可用选项:
off, normal, high, extra, max 是否使用更多计算资源,以在整首歌中最大化一致性。仅自定义模式可用。
- false:否(默认)
- true:是。开启后额度消耗翻倍
任务最终成功后 audioUrl 的音频格式。
可用选项:
mp3, m4a, wav 示例:
"mp3"
回调通知地址
是否转存
- true:音频将进行转存,返回TTAPI CDN地址
- false:返回官方源地址
最后修改于 2026年8月25日