提交音乐封面生成任务
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "generate-music-cover",
"callback_url": "https://your-domain.com/callback",
"input": {
"task_id": "73d6128b3523a0079df10da9471017c8"
}
}
'import requests
url = "https://api.poyo.ai/api/generate/submit"
payload = {
"model": "generate-music-cover",
"callback_url": "https://your-domain.com/callback",
"input": { "task_id": "73d6128b3523a0079df10da9471017c8" }
}
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({
model: 'generate-music-cover',
callback_url: 'https://your-domain.com/callback',
input: {task_id: '73d6128b3523a0079df10da9471017c8'}
})
};
fetch('https://api.poyo.ai/api/generate/submit', 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.poyo.ai/api/generate/submit",
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([
'model' => 'generate-music-cover',
'callback_url' => 'https://your-domain.com/callback',
'input' => [
'task_id' => '73d6128b3523a0079df10da9471017c8'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.poyo.ai/api/generate/submit"
payload := strings.NewReader("{\n \"model\": \"generate-music-cover\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"task_id\": \"73d6128b3523a0079df10da9471017c8\"\n }\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))
}HttpResponse<String> response = Unirest.post("https://api.poyo.ai/api/generate/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"generate-music-cover\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"task_id\": \"73d6128b3523a0079df10da9471017c8\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.poyo.ai/api/generate/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"generate-music-cover\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"task_id\": \"73d6128b3523a0079df10da9471017c8\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2025-11-12T10:30:00"
}
}Suno AI
生成音乐封面
为生成的音乐创建封面图片。
POST
/
api
/
generate
/
submit
提交音乐封面生成任务
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "generate-music-cover",
"callback_url": "https://your-domain.com/callback",
"input": {
"task_id": "73d6128b3523a0079df10da9471017c8"
}
}
'import requests
url = "https://api.poyo.ai/api/generate/submit"
payload = {
"model": "generate-music-cover",
"callback_url": "https://your-domain.com/callback",
"input": { "task_id": "73d6128b3523a0079df10da9471017c8" }
}
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({
model: 'generate-music-cover',
callback_url: 'https://your-domain.com/callback',
input: {task_id: '73d6128b3523a0079df10da9471017c8'}
})
};
fetch('https://api.poyo.ai/api/generate/submit', 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.poyo.ai/api/generate/submit",
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([
'model' => 'generate-music-cover',
'callback_url' => 'https://your-domain.com/callback',
'input' => [
'task_id' => '73d6128b3523a0079df10da9471017c8'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.poyo.ai/api/generate/submit"
payload := strings.NewReader("{\n \"model\": \"generate-music-cover\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"task_id\": \"73d6128b3523a0079df10da9471017c8\"\n }\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))
}HttpResponse<String> response = Unirest.post("https://api.poyo.ai/api/generate/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"generate-music-cover\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"task_id\": \"73d6128b3523a0079df10da9471017c8\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.poyo.ai/api/generate/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"generate-music-cover\",\n \"callback_url\": \"https://your-domain.com/callback\",\n \"input\": {\n \"task_id\": \"73d6128b3523a0079df10da9471017c8\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2025-11-12T10:30:00"
}
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询音乐详情接口获取结果。
使用指南
- 此接口为现有音乐音轨创建翻唱版本
- 需要来自先前音乐生成任务的有效 task_id
- 翻唱版本是对原音轨的全新演绎
参数详情
task_id(必填):已完成的音乐生成任务的任务 ID- 必须是生成音乐或延长音乐接口返回的有效 task_id
- 原任务必须已成功完成
开发者说明
- 每个原任务只能生成一次封面
- 处理完成后,结果通过回调 URL 发送
授权
所有 API 接口都需要 Bearer Token 认证。
创建 API Key:登录 PoYo,进入 仪表盘 → API 密钥(poyo.ai/zh/dashboard/api-key),点击创建 Key。
在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
application/json
响应
200 - application/json
任务提交成功
Show child attributes
Show child attributes