curl --request POST \
--url https://api.wondercraft.ai/v1/podcast/convo-mode/user-scripted \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"script": [
{
"text": "<string>",
"voice_id": "<string>"
}
],
"delivery_instructions": "<string>",
"music_spec": {
"music_id": "<string>",
"fade_in_ms": 0,
"fade_out_ms": 0,
"playback_start": 0,
"playback_end": 123,
"volume": 0.05,
"loop": false
}
}
'import requests
url = "https://api.wondercraft.ai/v1/podcast/convo-mode/user-scripted"
payload = {
"script": [
{
"text": "<string>",
"voice_id": "<string>"
}
],
"delivery_instructions": "<string>",
"music_spec": {
"music_id": "<string>",
"fade_in_ms": 0,
"fade_out_ms": 0,
"playback_start": 0,
"playback_end": 123,
"volume": 0.05,
"loop": False
}
}
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({
script: [{text: '<string>', voice_id: '<string>'}],
delivery_instructions: '<string>',
music_spec: {
music_id: '<string>',
fade_in_ms: 0,
fade_out_ms: 0,
playback_start: 0,
playback_end: 123,
volume: 0.05,
loop: false
}
})
};
fetch('https://api.wondercraft.ai/v1/podcast/convo-mode/user-scripted', 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.wondercraft.ai/v1/podcast/convo-mode/user-scripted",
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([
'script' => [
[
'text' => '<string>',
'voice_id' => '<string>'
]
],
'delivery_instructions' => '<string>',
'music_spec' => [
'music_id' => '<string>',
'fade_in_ms' => 0,
'fade_out_ms' => 0,
'playback_start' => 0,
'playback_end' => 123,
'volume' => 0.05,
'loop' => false
]
]),
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.wondercraft.ai/v1/podcast/convo-mode/user-scripted"
payload := strings.NewReader("{\n \"script\": [\n {\n \"text\": \"<string>\",\n \"voice_id\": \"<string>\"\n }\n ],\n \"delivery_instructions\": \"<string>\",\n \"music_spec\": {\n \"music_id\": \"<string>\",\n \"fade_in_ms\": 0,\n \"fade_out_ms\": 0,\n \"playback_start\": 0,\n \"playback_end\": 123,\n \"volume\": 0.05,\n \"loop\": false\n }\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.wondercraft.ai/v1/podcast/convo-mode/user-scripted")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"script\": [\n {\n \"text\": \"<string>\",\n \"voice_id\": \"<string>\"\n }\n ],\n \"delivery_instructions\": \"<string>\",\n \"music_spec\": {\n \"music_id\": \"<string>\",\n \"fade_in_ms\": 0,\n \"fade_out_ms\": 0,\n \"playback_start\": 0,\n \"playback_end\": 123,\n \"volume\": 0.05,\n \"loop\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wondercraft.ai/v1/podcast/convo-mode/user-scripted")
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 \"script\": [\n {\n \"text\": \"<string>\",\n \"voice_id\": \"<string>\"\n }\n ],\n \"delivery_instructions\": \"<string>\",\n \"music_spec\": {\n \"music_id\": \"<string>\",\n \"fade_in_ms\": 0,\n \"fade_out_ms\": 0,\n \"playback_start\": 0,\n \"playback_end\": 123,\n \"volume\": 0.05,\n \"loop\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Generate podcast with 2 hosts using Convo Mode, with a user provided script
Starts a background job to produce an audio file with the provided script segments in convo mode. The response
contains a job_id that can be used to query with the /podcast/{job_id} to query for status.
Requires a valid X-API-TOKEN header.
Note that generating via Convo Mode yields more natural results but takes longer. Expect at least 1 minute of processing per minute duration of audio before investigating a potential failure.
Throws:
- 429 if the user has too many jobs in flight.
- 400 if any voice_ids provided are invalid or if the length of voice_ids is not 2.
curl --request POST \
--url https://api.wondercraft.ai/v1/podcast/convo-mode/user-scripted \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"script": [
{
"text": "<string>",
"voice_id": "<string>"
}
],
"delivery_instructions": "<string>",
"music_spec": {
"music_id": "<string>",
"fade_in_ms": 0,
"fade_out_ms": 0,
"playback_start": 0,
"playback_end": 123,
"volume": 0.05,
"loop": false
}
}
'import requests
url = "https://api.wondercraft.ai/v1/podcast/convo-mode/user-scripted"
payload = {
"script": [
{
"text": "<string>",
"voice_id": "<string>"
}
],
"delivery_instructions": "<string>",
"music_spec": {
"music_id": "<string>",
"fade_in_ms": 0,
"fade_out_ms": 0,
"playback_start": 0,
"playback_end": 123,
"volume": 0.05,
"loop": False
}
}
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({
script: [{text: '<string>', voice_id: '<string>'}],
delivery_instructions: '<string>',
music_spec: {
music_id: '<string>',
fade_in_ms: 0,
fade_out_ms: 0,
playback_start: 0,
playback_end: 123,
volume: 0.05,
loop: false
}
})
};
fetch('https://api.wondercraft.ai/v1/podcast/convo-mode/user-scripted', 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.wondercraft.ai/v1/podcast/convo-mode/user-scripted",
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([
'script' => [
[
'text' => '<string>',
'voice_id' => '<string>'
]
],
'delivery_instructions' => '<string>',
'music_spec' => [
'music_id' => '<string>',
'fade_in_ms' => 0,
'fade_out_ms' => 0,
'playback_start' => 0,
'playback_end' => 123,
'volume' => 0.05,
'loop' => false
]
]),
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.wondercraft.ai/v1/podcast/convo-mode/user-scripted"
payload := strings.NewReader("{\n \"script\": [\n {\n \"text\": \"<string>\",\n \"voice_id\": \"<string>\"\n }\n ],\n \"delivery_instructions\": \"<string>\",\n \"music_spec\": {\n \"music_id\": \"<string>\",\n \"fade_in_ms\": 0,\n \"fade_out_ms\": 0,\n \"playback_start\": 0,\n \"playback_end\": 123,\n \"volume\": 0.05,\n \"loop\": false\n }\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.wondercraft.ai/v1/podcast/convo-mode/user-scripted")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"script\": [\n {\n \"text\": \"<string>\",\n \"voice_id\": \"<string>\"\n }\n ],\n \"delivery_instructions\": \"<string>\",\n \"music_spec\": {\n \"music_id\": \"<string>\",\n \"fade_in_ms\": 0,\n \"fade_out_ms\": 0,\n \"playback_start\": 0,\n \"playback_end\": 123,\n \"volume\": 0.05,\n \"loop\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wondercraft.ai/v1/podcast/convo-mode/user-scripted")
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 \"script\": [\n {\n \"text\": \"<string>\",\n \"voice_id\": \"<string>\"\n }\n ],\n \"delivery_instructions\": \"<string>\",\n \"music_spec\": {\n \"music_id\": \"<string>\",\n \"fade_in_ms\": 0,\n \"fade_out_ms\": 0,\n \"playback_start\": 0,\n \"playback_end\": 123,\n \"volume\": 0.05,\n \"loop\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
A request to start a job that generates an audio file for a podcast in convo mode with a script generated by the user.
The segments forming the script for the episode
Show child attributes
Show child attributes
An optional delivery instructions for the generated audio. This will be used to guide the generation of the audio.
An optional spec for adding background music to the generated script. Note that if the chosenmusic track is longer than the duration of the generated script, it will be cut off.
Show child attributes
Show child attributes
Response
Successful Response
The job ID for the episode generation. The status of this job can be queried using the/podcast/{job_id} endpoint.
