AI podcast generator from text: script, voices, one file
An AI podcast generator is three steps: a speaker-tagged script, one voice per host, and a join into one audio file. How to do each with Sume's API.

An AI podcast generator turns text into an episode in three steps: write a script as speaker-tagged lines, synthesize each line in its host's voice, and join the lines in order into one audio file. With the Sume API, Agent Completions can draft the lines as JSON from your article or notes, TTS 1.0 speaks each line, and Timeline audio joins up to 20 clips per job with no gaps.
The steps follow Sume's Agent Completions and Timeline audio docs and the TTS schema in the Sume API reference, the OpenAPI document behind the API reference docs, read on 2026-09-27. Behavior described as current is read from Sume's code, and prices from the code behind API pricing.
How do I turn an article or notes into a podcast script?
Write it yourself, or ask a model for it as structured data. On Sume, send POST /v1/agent/completions with the task in instruction, the source text in input, and an output_schema for the lines. input is treated as data, never as instructions. generation_spend_cap_usd has no default: leave it out and the request fails with 400 invalid_request. The key needs the agent_completions:write scope.
The call returns 202 with a run receipt. Poll GET /v1/agent-runs/{id} until the run ends; when its status is completed, the run's output follows your schema, so each entry of output.lines becomes one speech request. Read the script before you pay for speech.
curl -X POST https://api.sume.com/v1/agent/completions \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: podcast-ep12-script" \
-d '{
"instruction": "Turn the article in input into a two-host podcast script, one line per turn.",
"input": { "article": "Paste the article text here." },
"output_schema": { "name": "podcast_script", "schema": {
"type": "object", "additionalProperties": false, "required": ["lines"],
"properties": { "lines": { "type": "array", "items": {
"type": "object", "additionalProperties": false, "required": ["speaker", "text"],
"properties": {
"speaker": { "type": "string", "enum": ["A", "B"] },
"text": { "type": "string" }
}
} } }
} },
"generation_spend_cap_usd": 1
}'How do I give each host a voice?
A TTS request speaks with one voice, so each line is its own POST /v1/tts-1.0/generate: the line as transcript, plus the host's avatar_id or avatar_handle (an avatar whose voice is ready) or a voice.id. Use the same language and a WAV output_format for every line. Text to speech with multiple voices covers the per-line requests and the voice rules.
How do I assemble the episode?
Join the finished lines in script order with POST /v1/timeline-1.0/audio and operation: "concat", then poll the job. Text to speech with multiple voices shows the call. For a whole episode, these rules matter:
- Each concat joins 1 to 20 parts of your workspace's
media.sume.comaudio, such as the TTS lines, with no silence at the seams. Past 20 lines, join in stages: a concat returns a durablemedia.sume.comfile, which can be a part of the next concat. - One output file holds at most 1,800 seconds, so a longer show is split across files.
- The result's
segments[]gives thestartof every part, which you can turn into timestamps for show notes. - WAV is the default output. MP3 is smaller but re-adds priming padding at every edge, so ask for
mp3only on a final file.
| Step | Call | Limit |
|---|---|---|
| Script | POST /v1/agent/completions | generation_spend_cap_usd is required |
| Voices | POST /v1/tts-1.0/generate | One voice; up to 20,000 characters and 1,200 seconds of audio per request |
| Episode | POST /v1/timeline-1.0/audio | 1–20 parts per job; up to 1,800 seconds of output |
Can I add intro music or a music bed?
An intro made on Sume, such as a sting from AI jingle generator from text, can go in front of the first line as its own part, since concat takes only your workspace's media.sume.com audio. It must share the voice clips' channel layout: in the current code concat doesn't convert between layouts, so a mono voice line and a stereo intro fail with audio_parts_channel_mismatch.
Music under the voices is a different job. Concat never mixes, so on Sume a bed under speech takes a Timeline 1.0 render: the joined voice file as the audio spine, at least one Sume-hosted still or clip on screen, and an optional soundtrack that can loop, fade out, and duck under the voice. The render is an MP4; Audio detach returns its audio track as WAV or MP3, up to 900 seconds per job. Add background music to a video shows the render.
What does an AI podcast episode cost?
Each line is billed on its transcript characters at $0.0475 per 1,000 characters, spaces and punctuation included. Each concat is billed per job, at the rate on the Timeline audio page, and a music bed adds a render and a detach job, each billed at the rate on its own docs page. The script run is metered too; the Agent Completions docs point to API pricing for sizing its spend cap. Each rate is plus a 5.5% agent fee by default.
Sources
Related posts
More in Use cases
- AI product commercial video generator API: Formats or DIY
Make a product commercial with the Sume API: run sume-product-commercial or sume-cinematic-studio-commercial, or generate the clip on /v1/videos.
- AI product demo video generator API: show one real action
Make a product demo video with Sume: run the sume-product-usage-demo Format with a packshot and one action, or animate stills and join on Timeline.
- AI product photography API: splash, drip and pour shots
Six Sume catalog Formats make splash, drip, pour, squeeze, and texture stills of beauty products; for anything else, edit a packshot via /v1/images.
- Can AI animate manga panels? Yes, one panel per clip
Yes: each manga panel can be the first frame of a short AI clip, and a timeline joins the clips in reading order into a motion comic with sound.
Written by Sume