New: AI video tools. Cut, clip, caption and dub your videos. See all video tools →

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.

Part of the Desktop API, which runs in the desktop app on your own computer.

POST/api/v1/audiobook/projects
# 1. Create a project from a manuscript
printf '{"name": "The Lighthouse Keeper", "file_base64": "%s", "filename": "manuscript.txt"}' \
"$(base64 < manuscript.txt | tr -d '\n')" > body.json
curl -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 file
curl -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
See the product page

Produce a whole series of audiobooks from one script.

Endpoints

Audiobook endpoints

MethodPathWhat it does
POST/api/v1/audiobook/projectsCreate a project from a manuscript
POST/api/v1/audiobook/projects/{project_id}/assign-speakersDetect who speaks each line
POST/api/v1/audiobook/projects/{project_id}/design-castDesign a voice for every uncast character
POST/api/v1/audiobook/projects/{project_id}/generateGenerate audio for all segments
POST/api/v1/audiobook/projects/{project_id}/exportExport the finished audiobook

Install the desktop app and send your first request in a few minutes.

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.