Quick Start
Create your first AI-generated podcast in just a few steps. This guide shows you the complete workflow.
What you'll create
By the end of this guide, you'll have a working MP3 podcast file — a two-person conversation generated from your text content. The AI writes the script and synthesizes realistic voices automatically.
Before you start
- A Vozia account (sign up free)
- An API key from the Dashboard (Settings → API Keys)
- Node.js 18+ or Python 3.8+ (optional — you can also use cURL)
Install the SDK (Optional)
The SDK makes things easier, but you can also use plain HTTP requests with cURL or fetch.
npm install @vozia/sdkpip install voziaCreate a Podcast
This call does two things: (1) stores your content, and (2) uses AI to write a two-person podcast script. You get back a podcast.id to use in the next steps.
import { Vozia } from class="hl-string">39;@vozia/sdk39;;
const vozia = new Vozia({ apiKey: class="hl-string">39;vz_live_xxx39; });
class="hl-comment">// Create a podcast from text content
const podcast = await vozia.podcasts.create({
organizationId: class="hl-string">39;org_xxx39;,
title: class="hl-string">39;My First Podcast39;,
content: [
{
type: class="hl-string">39;text39;,
value: class="hl-string">`
Artificial Intelligence is transforming every industry.
From healthcare to finance, AI is making processes faster
and more efficient. Let39;s explore the key trends...
`
}
],
style: class="hl-string">39;conversational39;,
targetDuration: 5 class="hl-comment">// 5 minutes
});
console.log(class="hl-string">39;Podcast created:39;, podcast.id);Key parameters: content is your source material (text, URL, or file). style controls the tone (conversational, interview, educational). targetDuration sets length in minutes.
Generate Audio
Now trigger the actual audio synthesis. This is a separate step because generation can take 30 seconds to a few minutes depending on length.
class="hl-comment">// Start generation
const job = await vozia.podcasts.generate(podcast.id);
console.log(class="hl-string">39;Generation started:39;, job.jobId);
class="hl-comment">// job.status = class="hl-string">39;queued39;Important: This returns immediately with status queued. The audio is being generated in the background — you need to poll for completion (next step).
Check Status & Get Audio
Poll the status endpoint every few seconds. When status becomes ready, the audioUrl will contain your MP3 file.
class="hl-comment">// Poll for completion
async function waitForCompletion(podcastId) {
while (true) {
const status = await vozia.podcasts.status(podcastId);
console.log(class="hl-string">`Progress: ${status.job?.progress}%`);
if (status.status === class="hl-string">39;ready39;) {
console.log(class="hl-string">39;Audio URL:39;, status.audioUrl);
console.log(class="hl-string">39;Duration:39;, status.duration, class="hl-string">39;seconds39;);
return status;
}
if (status.status === class="hl-string">39;failed39;) {
throw new Error(status.errorMessage);
}
class="hl-comment">// Wait 2 seconds before checking again
await new Promise(r => setTimeout(r, 2000));
}
}
const result = await waitForCompletion(podcast.id);Status values: queued → processing → ready (or failed)
Complete Example
Here's everything together — copy this file, add your API key, and run it to create a podcast.
import { Vozia } from class="hl-string">39;@vozia/sdk39;;
async function createPodcast() {
const vozia = new Vozia({ apiKey: process.env.VOZIA_API_KEY });
class="hl-comment">// 1. Create podcast
const podcast = await vozia.podcasts.create({
organizationId: class="hl-string">39;org_xxx39;,
title: class="hl-string">39;AI Trends 202439;,
content: [
{ type: class="hl-string">39;text39;, value: class="hl-string">39;Your content here...39; }
],
speakers: {
host: { voice: class="hl-string">39;Alex39;, displayName: class="hl-string">39;Alex39; },
guest: { voice: class="hl-string">39;Olivia39;, displayName: class="hl-string">39;Dr. Smith39; }
},
style: class="hl-string">39;interview39;,
targetDuration: 10
});
class="hl-comment">// 2. Start generation
await vozia.podcasts.generate(podcast.id);
class="hl-comment">// 3. Wait for completion
let status;
do {
await new Promise(r => setTimeout(r, 3000));
status = await vozia.podcasts.status(podcast.id);
console.log(class="hl-string">`Status: ${status.status}, Progress: ${status.job?.progress}%`);
} while (status.status !== class="hl-string">39;ready39; && status.status !== class="hl-string">39;failed39;);
if (status.status === class="hl-string">39;ready39;) {
console.log(class="hl-string">39;[OK] Podcast ready!39;);
console.log(class="hl-string">39;Audio:39;, status.audioUrl);
console.log(class="hl-string">39;Duration:39;, Math.round(status.duration / 60), class="hl-string">39;minutes39;);
} else {
console.error(class="hl-string">39;[ERROR] Failed:39;, status.errorMessage);
}
}
createPodcast();Common Issues
Check that your API key is correct and starts with vz_live_ or vz_test_
Long podcasts can take several minutes. Keep polling — there's no timeout on our end.
Check errorMessage in the response. Common causes: empty content, unsupported file type.
What's Next?
Now that you've created your first podcast, explore more features: