Audiobook API
Audiobook API: narrate a full manuscript with a voice for each character
Upload a manuscript, give each character a voice, and export the finished audiobook as one file.
Available now as a local API in the desktop app. Cloud API coming soon.
# 1. Create a project from a manuscriptprintf '{"name": "The Lighthouse Keeper", "file_base64": "%s", "filename": "manuscript.txt"}' \ "$(base64 < manuscript.txt | tr -d '\n')" > body.jsoncurl -X POST "http://127.0.0.1:8100/api/v1/audiobook/projects" \ -H "Content-Type: application/json" \ -d @body.json # 2. Generate every segment, then export one filecurl -X POST "http://127.0.0.1:8100/api/v1/audiobook/projects/PROJECT_ID/generate" \ -H "Content-Type: application/json" -d '{}'curl -X POST "http://127.0.0.1:8100/api/v1/audiobook/projects/PROJECT_ID/export" \ -H "Content-Type: application/json" -d '{ "format": "mp3" }'What developers build with it
The API identifies the speakers in the text and assigns each one a voice. A pronunciation lexicon keeps names and terms consistent across every chapter.
- Audio editions for a publisher's back list
- Narrated versions of long reports and documentation
- Audio dramas with a designed voice for every character
Producing audiobooks at scale and want a cloud API?
Endpoints
Audiobook endpoints
| Method | Path | What it does |
|---|---|---|
| POST | /api/v1/audiobook/projects | Create a project from a manuscript |
| POST | /api/v1/audiobook/projects/{project_id}/assign-speakers | Detect who speaks each line |
| POST | /api/v1/audiobook/projects/{project_id}/design-cast | Design a voice for every uncast character |
| POST | /api/v1/audiobook/projects/{project_id}/generate | Generate audio for all segments |
| POST | /api/v1/audiobook/projects/{project_id}/export | Export the finished audiobook |
Cloud API
Join the cloud API waitlist
We're building a cloud API. Pick the features you need and roughly how much you'd use, and your answers decide which ones come first.
FAQ
Common Questions
Yes. It identifies the speakers in the text, using the LLM you set in the app, and assigns each one a voice. /design-cast can also design a new voice for every character that doesn't have one yet.
Add it to the project's lexicon with POST /api/v1/audiobook/projects/{project_id}/lexicon. The respelling is used on every generation, while the text keeps its normal spelling.
Yes. POST /api/v1/audiobook/projects/{project_id}/segments/{segment_id}/generate regenerates a single segment, and earlier takes stay in its history.
MP3 by default. Send a different format in the body of POST /api/v1/audiobook/projects/{project_id}/export to change it.
Explore
Related APIs
Text to speech
Turn text into speech with preset speakers in 10 languages.
Voice cloning
Clone a voice from a short clip and speak new text with it.
Voice design
Describe a voice in words and generate speech in it.
Speech to text
Transcribe audio with word timestamps and speaker labels.
Dubbing
Dub videos into 21 languages, keeping each speaker's voice.
Subtitles
Generate SRT caption files with word-level timing.
Clips
Cut long videos into short, captioned clips.
AI Cut
Remove silences, filler words and bad takes, then render.
Avatars
Make a lip-synced talking-head video from one photo.
Voice changer
Re-voice a recording while keeping its timing and emotion.