Skip to Content
Audiobooks

Create an audiobook

POST
/documents/{id}/audiobooks

Uses saved settings unless explicit settings are provided. Signed-in whole-book requests advance after the tab closes. Guests advance on their own requests. Repeated matching requests reuse the same identity; retrySkipped is for whole books only.

Authorization

headerAuthorizationBearer <token>

Authorization code with S256 PKCE. Discover issuer metadata at /.well-known/oauth-authorization-server/api/auth and resource metadata at /.well-known/oauth-protected-resource/api/v1. Request the /api/v1 resource explicitly. The same token endpoint also supports the advertised OAuth device grant.

Scope: audio:generate

Path Parameters

id*string
Match^[a-f0-9]{64}$

Request Body

application/json
  1. body
provider?string

Shared provider slug. Omit to use the saved provider.

Lengthlength <= 200
model?string

Model ID. Omit to use the saved model, or the default model of the named provider.

Lengthlength <= 512
voice?string

Voice ID within that provider and model. Omit to use the saved voice, or the first voice of the named provider. A named voice must be one the provider lists.

modelSpeed?number

Speaking rate the model generates at, for models that support one. Omit to use the saved voice speed. Unlike speed, it changes the generated audio.

Range0.5 <= value <= 3
format?string
Default"mp3"
Value in"mp3""m4b"
speed?number
Range0.5 <= value <= 3
Default1
chapter?|

Zero-based index. A chapter builds already-settled audio; it does not start generation.

Range0 <= value
retrySkipped?boolean

Retry skipped segments of a whole book.

includeProgress?boolean
Defaulttrue
settings?

Advanced explicit settings used by the web app. Omit to use saved preferences.

planning?
planObjectKey?string

Response Body

The matching file is ready.

application/json
  1. response
id*string
documentId*string
Match^[a-f0-9]{64}$
status*string

cancelled: someone stopped the request. A POST with the same settings resumes it from the cached audio.

Value in"idle""preparing""queued""generating""complete""stopped""usage_limited""interrupted""failed""building""waiting""ready""cancelled"
progress*|
Range0 <= value <= 1
provider*string

Speech provider, as a request names it.

model*string
voice*string
modelSpeed*number

The rate the model speaks at; speed is the finished file's playback speed.

requestedAt*|

When it was last requested or cancelled; null when nobody has asked for it.

Formatdate-time
format*string
Value in"mp3""m4b"
speed*number
chapter*integer|null
downloadUrl*string|null
filename*string|null
webUrl*string
Formaturi
webDownloadUrl*|
Formaturi
retryAfterMs*number|null
generation*
segments*|null
artifact*
Example Request
curl -X POST 'https://reader.example/api/v1/documents/string/audiobooks' \  -H 'Content-Type: application/json' \  -d '{  "format": "mp3",  "speed": 1}'
Example Response
{  "id": "string",  "documentId": "string",  "status": "idle",  "progress": 0,  "provider": "string",  "model": "string",  "voice": "string",  "modelSpeed": 0,  "requestedAt": "2019-08-24T14:15:22Z",  "format": "mp3",  "speed": 0,  "chapter": 0,  "downloadUrl": "string",  "filename": "string",  "webUrl": "http://example.com",  "webDownloadUrl": "http://example.com",  "retryAfterMs": 0,  "generation": {    "state": "idle",    "operationId": "string",    "issue": {      "code": "string",      "message": "string"    }  },  "segments": {    "plannedSegments": 0,    "completedSegments": 0,    "skippedSegments": 0,    "lastSkipIssue": {      "code": "string",      "message": "string"    },    "chapters": [      {        "index": 0,        "title": "string",        "spineHref": "string",        "page": 0,        "plannedSegments": 0,        "completedSegments": 0,        "skippedSegments": 0,        "generatingSegments": 0,        "durationMs": 0      }    ]  },  "artifact": {    "state": "none",    "operationId": "string",    "issue": {      "code": "string",      "message": "string"    }  }}