add background
curl --request POST \
--url https://api-services.podcastor.ai/open/podcast/v1/backgrounds \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"origin_url": "<string>",
"preview_url": "<string>"
}
'import requests
url = "https://api-services.podcastor.ai/open/podcast/v1/backgrounds"
payload = {
"origin_url": "<string>",
"preview_url": "<string>"
}
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({origin_url: '<string>', preview_url: '<string>'})
};
fetch('https://api-services.podcastor.ai/open/podcast/v1/backgrounds', 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-services.podcastor.ai/open/podcast/v1/backgrounds",
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([
'origin_url' => '<string>',
'preview_url' => '<string>'
]),
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-services.podcastor.ai/open/podcast/v1/backgrounds"
payload := strings.NewReader("{\n \"origin_url\": \"<string>\",\n \"preview_url\": \"<string>\"\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-services.podcastor.ai/open/podcast/v1/backgrounds")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"origin_url\": \"<string>\",\n \"preview_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-services.podcastor.ai/open/podcast/v1/backgrounds")
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 \"origin_url\": \"<string>\",\n \"preview_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"cause": "<string>",
"code": 123,
"data": {
"aspect_ratio": 123,
"avatar_type": "<string>",
"height": 123,
"id": 123,
"is_show": 123,
"label": "<string>",
"origin_url": "<string>",
"preview_url": "<string>",
"source": "<string>",
"typ": 123,
"width": 123
},
"details": "<unknown>",
"msg": "<string>",
"rid": "<string>"
}Media assets
Add background
Register an uploaded Podcast background in the shared Web library.
POST
/
open
/
podcast
/
v1
/
backgrounds
add background
curl --request POST \
--url https://api-services.podcastor.ai/open/podcast/v1/backgrounds \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"origin_url": "<string>",
"preview_url": "<string>"
}
'import requests
url = "https://api-services.podcastor.ai/open/podcast/v1/backgrounds"
payload = {
"origin_url": "<string>",
"preview_url": "<string>"
}
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({origin_url: '<string>', preview_url: '<string>'})
};
fetch('https://api-services.podcastor.ai/open/podcast/v1/backgrounds', 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-services.podcastor.ai/open/podcast/v1/backgrounds",
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([
'origin_url' => '<string>',
'preview_url' => '<string>'
]),
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-services.podcastor.ai/open/podcast/v1/backgrounds"
payload := strings.NewReader("{\n \"origin_url\": \"<string>\",\n \"preview_url\": \"<string>\"\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-services.podcastor.ai/open/podcast/v1/backgrounds")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"origin_url\": \"<string>\",\n \"preview_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-services.podcastor.ai/open/podcast/v1/backgrounds")
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 \"origin_url\": \"<string>\",\n \"preview_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"cause": "<string>",
"code": 123,
"data": {
"aspect_ratio": 123,
"avatar_type": "<string>",
"height": 123,
"id": 123,
"is_show": 123,
"label": "<string>",
"origin_url": "<string>",
"preview_url": "<string>",
"source": "<string>",
"typ": 123,
"width": 123
},
"details": "<unknown>",
"msg": "<string>",
"rid": "<string>"
}MCP tool:
podcast_add_background. OAuth scope: asset.write.Authorizations
Headers
Replay a completed identical request without repeating side effects.
Maximum string length:
128Body
application/json
请求体
指针字段确保 aspect_ratio=0、typ=0 不会被 binding 的 required 误判为空值。
Available options:
0, 1 数字人类型:default/cartoon/pet
Available options:
default, cartoon, pet user_id、space_id、真实宽高及时间字段均由服务端生成,禁止通过请求体透传。
Maximum string length:
512背景类型:0=Speaker Focus,2=Alternating shots
Available options:
0, 2 可选预览图 URL,为空时使用原图
Maximum string length:
512