regenerate script
curl --request PUT \
--url https://api-services.podcastor.ai/open/podcast/v1/projects \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"attachments": [
{
"id": "<string>",
"type": "<string>",
"url": "<string>"
}
],
"input": [
{
"content": [
{
"file_id": "<string>",
"file_url": "<string>",
"image_url": "<string>",
"text": "<string>"
}
]
}
],
"language": "<string>",
"long_text": "<string>",
"mixInfo": 123,
"need_send_mq": true,
"network_enabled": true,
"podcast_template_id": 123,
"prj_id": "<string>",
"render_subtitle": 123,
"script_params": {
"duration_seconds": 123,
"language": "<string>",
"script_style": "<string>",
"speaker_count": 123,
"target_audience": "<string>"
},
"text": "<string>",
"tools": [
{
"type": "web_search",
"external_web_access": true
}
],
"url": "<string>",
"urls": [
"<string>"
]
}
'import requests
url = "https://api-services.podcastor.ai/open/podcast/v1/projects"
payload = {
"attachments": [
{
"id": "<string>",
"type": "<string>",
"url": "<string>"
}
],
"input": [{ "content": [
{
"file_id": "<string>",
"file_url": "<string>",
"image_url": "<string>",
"text": "<string>"
}
] }],
"language": "<string>",
"long_text": "<string>",
"mixInfo": 123,
"need_send_mq": True,
"network_enabled": True,
"podcast_template_id": 123,
"prj_id": "<string>",
"render_subtitle": 123,
"script_params": {
"duration_seconds": 123,
"language": "<string>",
"script_style": "<string>",
"speaker_count": 123,
"target_audience": "<string>"
},
"text": "<string>",
"tools": [
{
"type": "web_search",
"external_web_access": True
}
],
"url": "<string>",
"urls": ["<string>"]
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
attachments: [{id: '<string>', type: '<string>', url: '<string>'}],
input: [
{
content: [
{
file_id: '<string>',
file_url: '<string>',
image_url: '<string>',
text: '<string>'
}
]
}
],
language: '<string>',
long_text: '<string>',
mixInfo: 123,
need_send_mq: true,
network_enabled: true,
podcast_template_id: 123,
prj_id: '<string>',
render_subtitle: 123,
script_params: {
duration_seconds: 123,
language: '<string>',
script_style: '<string>',
speaker_count: 123,
target_audience: '<string>'
},
text: '<string>',
tools: [{type: 'web_search', external_web_access: true}],
url: '<string>',
urls: ['<string>']
})
};
fetch('https://api-services.podcastor.ai/open/podcast/v1/projects', 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/projects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'attachments' => [
[
'id' => '<string>',
'type' => '<string>',
'url' => '<string>'
]
],
'input' => [
[
'content' => [
[
'file_id' => '<string>',
'file_url' => '<string>',
'image_url' => '<string>',
'text' => '<string>'
]
]
]
],
'language' => '<string>',
'long_text' => '<string>',
'mixInfo' => 123,
'need_send_mq' => true,
'network_enabled' => true,
'podcast_template_id' => 123,
'prj_id' => '<string>',
'render_subtitle' => 123,
'script_params' => [
'duration_seconds' => 123,
'language' => '<string>',
'script_style' => '<string>',
'speaker_count' => 123,
'target_audience' => '<string>'
],
'text' => '<string>',
'tools' => [
[
'type' => 'web_search',
'external_web_access' => true
]
],
'url' => '<string>',
'urls' => [
'<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/projects"
payload := strings.NewReader("{\n \"attachments\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"input\": [\n {\n \"content\": [\n {\n \"file_id\": \"<string>\",\n \"file_url\": \"<string>\",\n \"image_url\": \"<string>\",\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"language\": \"<string>\",\n \"long_text\": \"<string>\",\n \"mixInfo\": 123,\n \"need_send_mq\": true,\n \"network_enabled\": true,\n \"podcast_template_id\": 123,\n \"prj_id\": \"<string>\",\n \"render_subtitle\": 123,\n \"script_params\": {\n \"duration_seconds\": 123,\n \"language\": \"<string>\",\n \"script_style\": \"<string>\",\n \"speaker_count\": 123,\n \"target_audience\": \"<string>\"\n },\n \"text\": \"<string>\",\n \"tools\": [\n {\n \"type\": \"web_search\",\n \"external_web_access\": true\n }\n ],\n \"url\": \"<string>\",\n \"urls\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api-services.podcastor.ai/open/podcast/v1/projects")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"attachments\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"input\": [\n {\n \"content\": [\n {\n \"file_id\": \"<string>\",\n \"file_url\": \"<string>\",\n \"image_url\": \"<string>\",\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"language\": \"<string>\",\n \"long_text\": \"<string>\",\n \"mixInfo\": 123,\n \"need_send_mq\": true,\n \"network_enabled\": true,\n \"podcast_template_id\": 123,\n \"prj_id\": \"<string>\",\n \"render_subtitle\": 123,\n \"script_params\": {\n \"duration_seconds\": 123,\n \"language\": \"<string>\",\n \"script_style\": \"<string>\",\n \"speaker_count\": 123,\n \"target_audience\": \"<string>\"\n },\n \"text\": \"<string>\",\n \"tools\": [\n {\n \"type\": \"web_search\",\n \"external_web_access\": true\n }\n ],\n \"url\": \"<string>\",\n \"urls\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-services.podcastor.ai/open/podcast/v1/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"attachments\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"input\": [\n {\n \"content\": [\n {\n \"file_id\": \"<string>\",\n \"file_url\": \"<string>\",\n \"image_url\": \"<string>\",\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"language\": \"<string>\",\n \"long_text\": \"<string>\",\n \"mixInfo\": 123,\n \"need_send_mq\": true,\n \"network_enabled\": true,\n \"podcast_template_id\": 123,\n \"prj_id\": \"<string>\",\n \"render_subtitle\": 123,\n \"script_params\": {\n \"duration_seconds\": 123,\n \"language\": \"<string>\",\n \"script_style\": \"<string>\",\n \"speaker_count\": 123,\n \"target_audience\": \"<string>\"\n },\n \"text\": \"<string>\",\n \"tools\": [\n {\n \"type\": \"web_search\",\n \"external_web_access\": true\n }\n ],\n \"url\": \"<string>\",\n \"urls\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"project_id": "<string>"
}Projects and scripts
Regenerate script
Update project input and regenerate its script using prj_id.
PUT
/
open
/
podcast
/
v1
/
projects
regenerate script
curl --request PUT \
--url https://api-services.podcastor.ai/open/podcast/v1/projects \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"attachments": [
{
"id": "<string>",
"type": "<string>",
"url": "<string>"
}
],
"input": [
{
"content": [
{
"file_id": "<string>",
"file_url": "<string>",
"image_url": "<string>",
"text": "<string>"
}
]
}
],
"language": "<string>",
"long_text": "<string>",
"mixInfo": 123,
"need_send_mq": true,
"network_enabled": true,
"podcast_template_id": 123,
"prj_id": "<string>",
"render_subtitle": 123,
"script_params": {
"duration_seconds": 123,
"language": "<string>",
"script_style": "<string>",
"speaker_count": 123,
"target_audience": "<string>"
},
"text": "<string>",
"tools": [
{
"type": "web_search",
"external_web_access": true
}
],
"url": "<string>",
"urls": [
"<string>"
]
}
'import requests
url = "https://api-services.podcastor.ai/open/podcast/v1/projects"
payload = {
"attachments": [
{
"id": "<string>",
"type": "<string>",
"url": "<string>"
}
],
"input": [{ "content": [
{
"file_id": "<string>",
"file_url": "<string>",
"image_url": "<string>",
"text": "<string>"
}
] }],
"language": "<string>",
"long_text": "<string>",
"mixInfo": 123,
"need_send_mq": True,
"network_enabled": True,
"podcast_template_id": 123,
"prj_id": "<string>",
"render_subtitle": 123,
"script_params": {
"duration_seconds": 123,
"language": "<string>",
"script_style": "<string>",
"speaker_count": 123,
"target_audience": "<string>"
},
"text": "<string>",
"tools": [
{
"type": "web_search",
"external_web_access": True
}
],
"url": "<string>",
"urls": ["<string>"]
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
attachments: [{id: '<string>', type: '<string>', url: '<string>'}],
input: [
{
content: [
{
file_id: '<string>',
file_url: '<string>',
image_url: '<string>',
text: '<string>'
}
]
}
],
language: '<string>',
long_text: '<string>',
mixInfo: 123,
need_send_mq: true,
network_enabled: true,
podcast_template_id: 123,
prj_id: '<string>',
render_subtitle: 123,
script_params: {
duration_seconds: 123,
language: '<string>',
script_style: '<string>',
speaker_count: 123,
target_audience: '<string>'
},
text: '<string>',
tools: [{type: 'web_search', external_web_access: true}],
url: '<string>',
urls: ['<string>']
})
};
fetch('https://api-services.podcastor.ai/open/podcast/v1/projects', 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/projects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'attachments' => [
[
'id' => '<string>',
'type' => '<string>',
'url' => '<string>'
]
],
'input' => [
[
'content' => [
[
'file_id' => '<string>',
'file_url' => '<string>',
'image_url' => '<string>',
'text' => '<string>'
]
]
]
],
'language' => '<string>',
'long_text' => '<string>',
'mixInfo' => 123,
'need_send_mq' => true,
'network_enabled' => true,
'podcast_template_id' => 123,
'prj_id' => '<string>',
'render_subtitle' => 123,
'script_params' => [
'duration_seconds' => 123,
'language' => '<string>',
'script_style' => '<string>',
'speaker_count' => 123,
'target_audience' => '<string>'
],
'text' => '<string>',
'tools' => [
[
'type' => 'web_search',
'external_web_access' => true
]
],
'url' => '<string>',
'urls' => [
'<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/projects"
payload := strings.NewReader("{\n \"attachments\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"input\": [\n {\n \"content\": [\n {\n \"file_id\": \"<string>\",\n \"file_url\": \"<string>\",\n \"image_url\": \"<string>\",\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"language\": \"<string>\",\n \"long_text\": \"<string>\",\n \"mixInfo\": 123,\n \"need_send_mq\": true,\n \"network_enabled\": true,\n \"podcast_template_id\": 123,\n \"prj_id\": \"<string>\",\n \"render_subtitle\": 123,\n \"script_params\": {\n \"duration_seconds\": 123,\n \"language\": \"<string>\",\n \"script_style\": \"<string>\",\n \"speaker_count\": 123,\n \"target_audience\": \"<string>\"\n },\n \"text\": \"<string>\",\n \"tools\": [\n {\n \"type\": \"web_search\",\n \"external_web_access\": true\n }\n ],\n \"url\": \"<string>\",\n \"urls\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api-services.podcastor.ai/open/podcast/v1/projects")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"attachments\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"input\": [\n {\n \"content\": [\n {\n \"file_id\": \"<string>\",\n \"file_url\": \"<string>\",\n \"image_url\": \"<string>\",\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"language\": \"<string>\",\n \"long_text\": \"<string>\",\n \"mixInfo\": 123,\n \"need_send_mq\": true,\n \"network_enabled\": true,\n \"podcast_template_id\": 123,\n \"prj_id\": \"<string>\",\n \"render_subtitle\": 123,\n \"script_params\": {\n \"duration_seconds\": 123,\n \"language\": \"<string>\",\n \"script_style\": \"<string>\",\n \"speaker_count\": 123,\n \"target_audience\": \"<string>\"\n },\n \"text\": \"<string>\",\n \"tools\": [\n {\n \"type\": \"web_search\",\n \"external_web_access\": true\n }\n ],\n \"url\": \"<string>\",\n \"urls\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-services.podcastor.ai/open/podcast/v1/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"attachments\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"input\": [\n {\n \"content\": [\n {\n \"file_id\": \"<string>\",\n \"file_url\": \"<string>\",\n \"image_url\": \"<string>\",\n \"text\": \"<string>\"\n }\n ]\n }\n ],\n \"language\": \"<string>\",\n \"long_text\": \"<string>\",\n \"mixInfo\": 123,\n \"need_send_mq\": true,\n \"network_enabled\": true,\n \"podcast_template_id\": 123,\n \"prj_id\": \"<string>\",\n \"render_subtitle\": 123,\n \"script_params\": {\n \"duration_seconds\": 123,\n \"language\": \"<string>\",\n \"script_style\": \"<string>\",\n \"speaker_count\": 123,\n \"target_audience\": \"<string>\"\n },\n \"text\": \"<string>\",\n \"tools\": [\n {\n \"type\": \"web_search\",\n \"external_web_access\": true\n }\n ],\n \"url\": \"<string>\",\n \"urls\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"project_id": "<string>"
}MCP tool:
podcast_regenerate_script. OAuth scope: podcast.generate.Authorizations
Headers
Replay a completed identical request without repeating side effects.
Maximum string length:
128Body
application/json
请求体
编辑态附件列表
Show child attributes
Show child attributes
OpenAI Responses 风格 input[].content[]
Show child attributes
Show child attributes
语言
长文本的内容
混合来源详情,Origin=8时会有值
是否发送mq消息
是否允许联网搜索
参考资料来源 1:网页 URL/2:YouTube URL/3:文档文件 URL/4:长文本/5:原文本驱动/6:上传脚本/7:上传音频
Available options:
1, 2, 3, 4, 5, 6, 7, 8 跟创模板
PutPodcastProject 接口使用,要编辑的项目ID
是否开启字幕 1:开启字幕/2:关闭字幕
GPT 脚本生成参数
Show child attributes
Show child attributes
编辑态文本,支持 {{ref:id}} 引用附件
none/auto/required
Available options:
none, auto, required 例如 [{"type":"web_search","external_web_access":true}]
Show child attributes
Show child attributes
链接, 上传文件后的地址或者站点地址,以逗号分割的字符串数组
链接数组;兼容 url 的逗号分隔格式
视频总时长
Available options:
-3, -5, 13-17, 18-22, 23-30, 4-6, 7-12, 22-28, 0.5, 0.5-1, 1-3, 3-5, 5-10 Response
200 - application/json
OK