API v1 Documentation — View changelog
Vozia

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)
1

Install the SDK (Optional)

The SDK makes things easier, but you can also use plain HTTP requests with cURL or fetch.

JavaScript
npm install @vozia/sdk
Python
pip install vozia
2

Create 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.

JavaScript
import { Vozia } from '@vozia/sdk';

const vozia = new Vozia({ apiKey: 'vz_live_xxx' });

// Create a podcast from text content
const podcast = await vozia.podcasts.create({
  organizationId: 'org_xxx',
  title: 'My First Podcast',
  content: [
    {
      type: 'text',
      value: `
        Artificial Intelligence is transforming every industry.
        From healthcare to finance, AI is making processes faster
        and more efficient. Let's explore the key trends...
      `
    }
  ],
  style: 'conversational',
  targetDuration: 5  // 5 minutes
});

console.log('Podcast created:', 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.

3

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.

JavaScript
// Start generation
const job = await vozia.podcasts.generate(podcast.id);

console.log('Generation started:', job.jobId);
class="hl-comment">// job.status = 'queued'

Important: This returns immediately with status queued. The audio is being generated in the background — you need to poll for completion (next step).

4

Check Status & Get Audio

Poll the status endpoint every few seconds. When status becomes ready, the audioUrl will contain your MP3 file.

JavaScript
// Poll for completion
async function waitForCompletion(podcastId) {
  while (true) {
    const status = await vozia.podcasts.status(podcastId);

    console.log(`Progress: ${status.job?.progress}%`);

    if (status.status === 'ready') {
      console.log('Audio URL:', status.audioUrl);
      console.log('Duration:', status.duration, 'seconds');
      return status;
    }

    if (status.status === 'failed') {
      throw new Error(status.errorMessage);
    }

    // Wait 2 seconds before checking again
    await new Promise(r => setTimeout(r, 2000));
  }
}

const result = await waitForCompletion(podcast.id);

Status values: queuedprocessingready (or failed)

Complete Example

Here's everything together — copy this file, add your API key, and run it to create a podcast.

create-podcast.js
import { Vozia } from '@vozia/sdk';

async function createPodcast() {
  const vozia = new Vozia({ apiKey: process.env.VOZIA_API_KEY });

  // 1. Create podcast
  const podcast = await vozia.podcasts.create({
    organizationId: 'org_xxx',
    title: 'AI Trends 2024',
    content: [
      { type: 'text', value: 'Your content here...' }
    ],
    speakers: {
      host: { voice: 'Alex', displayName: 'Alex' },
      guest: { voice: 'Olivia', displayName: 'Dr. Smith' }
    },
    style: 'interview',
    targetDuration: 10
  });

  // 2. Start generation
  await vozia.podcasts.generate(podcast.id);

  // 3. Wait for completion
  let status;
  do {
    await new Promise(r => setTimeout(r, 3000));
    status = await vozia.podcasts.status(podcast.id);
    console.log(`Status: ${status.status}, Progress: ${status.job?.progress}%`);
  } while (status.status !== 'ready' && status.status !== 'failed');

  if (status.status === 'ready') {
    console.log('[OK] Podcast ready!');
    console.log('Audio:', status.audioUrl);
    console.log('Duration:', Math.round(status.duration / 60), 'minutes');
  } else {
    console.error('[ERROR] Failed:', status.errorMessage);
  }
}

createPodcast();

Common Issues

401 Unauthorized

Check that your API key is correct and starts with vz_live_ or vz_test_

Status stuck on "processing"

Long podcasts can take several minutes. Keep polling — there's no timeout on our end.

Status is "failed"

Check errorMessage in the response. Common causes: empty content, unsupported file type.