Skip to Content

Audiobooks

Generate, follow, stop, resume and delete audiobooks.

Request it

curl -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"format":"mp3","speed":1}' \
  https://reader.example/api/v1/documents/DOCUMENT_ID/audiobooks

200 means the matching file is ready. 202 returns its status and ID.

Follow it

Read GET /api/v1/documents/{id}/audiobooks/{audiobookId} until downloadUrl is present. If generation stops (see Progress), POST again to resume.

Deliver it

Follow downloadUrl, or give a person webDownloadUrl, a page that starts the download and offers to sign in or switch account.

Repeating a request with the same document version, settings, format, speed and chapter reuses the same audiobook.

Options

FieldEffect
formatmp3 (default) or m4b
speedSpeed of the finished file, 0.5 to 3, rounded to two decimals
modelSpeedSpeed the model speaks at, 0.5 to 3. Changes the generated audio.
provider, modelAny enabled provider and a model the instance allows
voiceA voice of that provider and model, including clone: voices
retrySkippedtrue retries skipped whole-book segments
chapterA zero-based chapter to assemble from settled audio. Starts no generation, and cannot be stopped.

Saved voices and options apply only to the saved provider and model; any other choice starts from that provider's defaults. The saved voice speed applies to any model that has one.

A disabled or unknown provider, or a voice it does not list, returns 400. A provider that cannot be reached to check the voice returns 503.

Progress

  • Signed-in whole-book requests continue after the tab closes. Guest requests advance only on the guest's own requests.
  • Only a caller with audio:generate advances a request by reading it. With documents:read alone, reading and lookup only observe.
  • An unparsed PDF returns 409 DOCUMENT_PREPARING with retryAfterMs. A POST starts the parse.
  • Work held back by admission limits reports waiting and can recover on a later read.
  • Usage-limited, failed or interrupted generation needs a new POST to resume.
  • If the provider fails several segments in a row, generation stops with PROVIDER_UNAVAILABLE or PROVIDER_REJECTED in generation.issue. POST again once it is back.

A request stays addressable for seven days after its last POST, and until it has finished or been cancelled. After that GET returns 404, but the audio and file remain: a new POST with the same settings finds them.

The specification also covers operation SSE streams, which last up to 300 seconds. Reconnect as needed, or poll.

List

GET /api/v1/documents/{id}/audiobooks lists the most recently requested first, 20 to a page (limit up to 50). Listing only observes. Each names its provider, model, voice, modelSpeed and requestedAt.

Stop or delete

CancelDelete
CallPOST .../{audiobookId}/cancelDELETE .../{audiobookId}
Scopeaudio:generatedocuments:write
Finished fileKeptRemoved
Generated audioKeptKept
To get it backPOST again to resumePOST again; only missing audio is generated

Formats and speeds of the same settings share one generation run. Cancelling stops the run, and with it the other whole-book requests on it. Deleting stops only a run nothing else shares.

While a file is being built, DELETE returns 409 AUDIOBOOK_BUILDING.

On this page

Edit this page