Skip to content

Read one EPUB chapter as HTML with rewritten resource refs

GET
/assets/{id}/epub/chapters/{idx}

Streams the chapter’s XHTML body with every relative href / src / srcset rewritten to point at /assets/{id}/epub/resources/{path}. The frontend reader injects this directly into an iframe srcdoc; resources resolve through us so auth cookies travel + CORS isn’t a concern.

id
required
string format: uuid
idx
required
integer

Zero-based spine index.

Chapter HTML

string format: binary

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

Resource not found

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Unexpected server error

object
error
required

Human-readable error summary

string
Example
the request could not be completed