---
title: "Generate AI-scripted podcast with 2 hosts using Convo Mode"
method: POST
path: "/podcast/convo-mode/ai-scripted"
tags: ["Podcasts"]
---

# Generate AI-scripted podcast with 2 hosts using Convo Mode

`POST /podcast/convo-mode/ai-scripted`

Starts a background job that creates an AI generated script and produces an audio file in convo mode.
    The response contains a `job_id` that can be used with the `/podcast/{job_id}` endpoint
    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.

## Request body

- GenerateAiScriptedConvoModeEpisodeRequest — A request to start a job that generates an audio file for a podcast in convo mode with a script generated by AI using the provided prompt. An optional list of Voice IDs can be provided to control the audio generation output. If no voice_ids are provided, defaults of up to 2 convo-mode voices will be chosen.
  - `prompt` string, required — The prompt to instruct the AI to generate the script. You can specify the duration, and include links. Sometimes, the AI hallucinates, so it helps to mention that this podcast has two hosts.
  - `voice_ids` string[] — A list of voice_ids to use for the generated audio. **Must provide exactly 2 voices for this endpoint.** If the script has multiple speakers, we will use the voices from this list in the order they appear in. All ids in this list must be unique. If no IDs are provided, 2 defaults will be used.
  - `delivery_instructions` string, nullable — An optional delivery instructions for the generated audio. This will be used to guide the generation of the audio.
  - `music_spec` MusicTrackSpec — A music track to add to the generated audio. Note that the music will always be added at the very beginning of the generated podcast and will be automatically trimmed to match the content length.
    - `music_id` string, required — The ID of the music track to used in the background. This can be copied from theWondercraft platform
    - `fade_in_ms` integer — The number of milliseconds to fade in from the start of the music track
    - `fade_out_ms` integer — The number of milliseconds to fade out from the end of the music track
    - `playback_start` integer — A millisecond into the music track at which we start playing. Equivalent to trimming thebeginning of the music track. Defaults to 0 (i.e. no trimming)
    - `playback_end` integer, nullable — How many milliseconds into the music should we playback. Equivalent to trimming up to this numberof milliseconds from the music track. Defaults to the entire music track.
    - `volume` number — The volume to apply to the music track. Defaults to 0.05. Must be between 0.0 and 1.0
    - `loop` boolean — Whether to loop the music track. Defaults to False.

## Response `200`

Successful Response

- GenerateEpisodeResponse
  - `job_id` string, uuid, required — The job ID for the episode generation. The status of this job can be queried using the`/podcast/{job_id}` endpoint.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/wondercraft/apis/wondercraft-public-api.md) · [All operations](https://skmtc.net/wondercraft/apis/wondercraft-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/wondercraft/wondercraft-public-api/versions/046fc4202fa8/schema)
