---
title: "Convert PDF to EPUB"
method: POST
path: "/pdf-to-epub"
---

# Convert PDF to EPUB

`POST /pdf-to-epub`

## Request

- Base URL: `https://epublys.com/v1`
- URL: `https://epublys.com/v1/pdf-to-epub`
- Auth: HTTP bearer

## Request body

- object
  - `file` string, required: Base64-encoded PDF
  - `name` string: Original filename — the output is named after its stem (e.g. "Book.epub" gives "Book (compressed).epub"); without it the output keeps a fixed name
  - `language` string: dc:language of the generated EPUB (BCP 47)
  - `chapterMode` 'auto' | 'every-n' | 'single'
  - `pagesPerChapter` integer: Pages per chapter when chapterMode is 'every-n'
  - `extractImages` boolean: Pro only — ignored on free tier

## Response `200`

Success — JSON envelope with the base64-encoded output file

- FileResult
  - `success` boolean
  - `file` string: Base64-encoded output file
  - `filename` string
  - `contentType` string
  - `message` string
  - `pro_tip` string: Present on free-tier responses only

## Other responses

- `400`: Invalid input — human message in `error`, machine category in `code`
- `401`: Missing or invalid API key
- `413`: Upload exceeds the per-request total cap
- `429`: Rate limited
- `500`: Processing failure

---

[API](https://skmtc.dev/epublys/apis/epublys-api.md) · [All operations](https://skmtc.dev/epublys/apis/epublys-api/llms.txt) · [OpenAPI document](https://skmtc.dev/epublys/apis/epublys-api/revisions/b705f822c814?raw)
