Menu
API Status: Operational

ZenMic API Documentation

Transform text into natural-sounding audio with our simple, powerful REST API. Generate scripts, synthesize speech, and manage podcasts.

REST API Async Generation Bearer Auth JSON Responses

Introduction

The API is the latest version of the ZenMic API. It's a streamlined, unified API that powers both the Studio frontend and external integrations. Every endpoint uses Bearer token authentication with a single /api/ base path.

Base URL: https://zenmic.com/api/
All responses are JSON. Success: {"success":true,"data":{...}}. Errors include an "error" field.

Authentication

Include your API key in the Authorization header. Find your API key in the sidebar under Get Your API Key.

http
Authorization: Bearer YOUR_API_KEY
Keep it secret. Never expose your API key in client-side code.

POST Generate Script

Convert a topic, uploaded files, or both into a structured podcast script with scene, speaker profiles, and dialogue.

POST/api/script

Request Body

json
{
  "topic": "The future of AI in healthcare, 3 minutes, in English",
  "project_name": "Default Project",
  "files": [
    {
      "name": "report.pdf",
      "mimeType": "application/pdf",
      "data": "base64_encoded_content..."
    }
  ]
}
200 Response
json
{
  "success": true,
  "data": {
    "title": "AI in Healthcare",
    "transcript": "s1: Welcome to the project...\n\ns2: Thanks for having me...",
    "scene": "A bright modern studio...",
    "notes": "Style:\n* Warm, intimate pacing\n* Natural pauses",
    "voice1": "Charon",
    "voice2": "Zephyr",
    "full_script": "## \"AI in Healthcare\"\n\n..."
  }
}

POST Generate Audio

Convert a dialogue script into high-fidelity TTS audio. Returns a 202 with a polling URL. Audio is generated asynchronously in the background.

POST/api/audio

Request Body

json
{
  "script": "s1: Welcome to the project...\n\ns2: Thanks for having me, let's dive in...",
  "voice1": "Charon",
  "voice2": "Zephyr",
  "title": "AI in Healthcare",
  "scene": "A bright modern studio",
  "director_notes": "Warm, conversational pacing"
}
202 Accepted
json
{
  "success": true,
  "data": {
    "id": "a1b2",
    "status": "queued",
    "poll_url": "/api/status?id=a1b2"
  }
}

GET Poll Status

Poll the status of an audio generation job. No authentication required (audio IDs are public).

GET/api/status?id=AUDIO_ID
200 Response (succeeded)
json
{
  "success": true,
  "data": {
    "id": "a1b2",
    "status": "succeeded",
    "title": "AI in Healthcare",
    "duration": 187,
    "created_at": "2026-06-06 12:00:00",
    "audio_url": "https://zenmic.com/audio/a1b2"
  }
}

POST Generate Idea

Get a random podcast audio idea based on your project's context and past audios.

POST/api/ideas

Request Body

json
{
  "project_name": "Tech Talks"
}
200 Response
json
{
  "success": true,
  "data": {
    "idea": "In English language, 3 minutes long, discussion about how AI is transforming medical diagnosis."
  }
}

POST Audios (Manage)

List, delete, retry, or toggle publish status for audios. Requires authentication.

POST/api/audios

List audios

http
GET /api/audios?project_id=My%20Podcast
Authorization: Bearer YOUR_API_KEY

Delete audio

http
POST /api/audios
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{"action": "delete", "audio_id": "a1b2"}

Retry failed audio

http
POST /api/audios
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{"action": "retry", "audio_id": "a1b2"}

Toggle publish

http
POST /api/audios
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{"action": "toggle_publish", "audio_id": "a1b2"}

You can also fetch full audio details (including transcript) via GET:

http
GET /api/audios?id=a1b2
Authorization: Bearer YOUR_API_KEY

POST Projects (Manage)

Create, switch, or update podcast projects. Requires authentication.

POST/api/projects

Create project

http
POST /api/projects
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{"action": "create", "name": "My New Project"}

List projects

http
GET /api/projects
Authorization: Bearer YOUR_API_KEY

POST Login

Used by the frontend for Google and email magic link sign-in. This endpoint is not intended for external API use. It creates a PHP session and returns the user's API key for subsequent Bearer auth.

POST/api/login
This endpoint is designed for the frontend. External users should use their API key directly with the other endpoints.

Ready to Transform Your Content?

Join hundreds of content creators who are already using ZenMic to create amazing podcasts.

Open App