Ebook Conversion API — Free Tier + Pay-As-You-Go
Convert EPUB, MOBI, AZW3, FB2, LIT, and ebook formats programmatically. Calibre-backed with custom CSS, cover, metadata.
What it does
The Ebook Conversion API converts between EPUB (2 and 3), MOBI, AZW3, FB2, LIT, PDB, RB, SNB, TCR, LRF, and PDF outputs intended for e-reader display. Conversion is backed by Calibre's `ebook-convert` tool, augmented with a Pandoc fallback for markup-source ebooks (Markdown → EPUB, AsciiDoc → MOBI). Per-job parameters expose Calibre's full surface: custom CSS injection, font embedding, cover image replacement, metadata fields (title, author, publisher, ISBN, language, series, tags, description), chapter detection, level 1/2/3 TOC depth, page-break insertion rules, and EPUB 3 vs EPUB 2 output selection.
Outputs ship with embedded fonts to render consistently across Kindle, Kobo, Nook, Apple Books, and generic OPDS readers. The pipeline rebuilds the OPF spine on EPUB outputs so that even malformed source ebooks (common from older Project Gutenberg dumps) produce a valid, lintable target. KFX is read-only; we cannot write the proprietary Amazon format.
AZW3 is the recommended Kindle-compatible target; the latest-gen Kindles render it natively without conversion through Amazon's pipeline.
Supported formats
Source formats (16)
- epub
- mobi
- azw3
- azw
- fb2
- lit
- pdb
- rb
- snb
- tcr
- lrf
- txt
- html
- md
- rtf
Target formats (13)
- epub
- mobi
- azw3
- fb2
- lit
- pdb
- rb
- snb
- tcr
- lrf
- txt
- rtf
Quick start
All three SDK languages show the same conversion: a single POST to /v1/convert with your API key in the X-Api-Key header.
curl -X POST https://api.convertintomp4.com/v1/convert \
-H "X-Api-Key: ck_your_api_key" \
-F "file=@input.epub" \
-F "target=mobi"
-F "metadata.title=My Book" \
-F "metadata.author=Jane Doe"import { ConvertIntoMP4 } from "@convertintomp4/sdk";
import fs from "node:fs";
const client = new ConvertIntoMP4({ apiKey: process.env.CIM4_API_KEY });
const job = await client.convert({
file: fs.createReadStream("input.epub"),
target: "mobi",
});
const result = await client.waitForJob(job.id);
console.log("Output URL:", result.outputUrl);from convertintomp4 import Client
client = Client(api_key="ck_your_api_key")
with open("input.epub", "rb") as f:
job = client.convert(file=f, target="mobi")
result = client.wait_for_job(job.id)
print("Output URL:", result.output_url)Features
- Calibre-backed conversion across 15 ebook formats
- Custom CSS, font embedding, cover image replacement
- Per-job metadata: title, author, publisher, ISBN, series
- Chapter detection and configurable TOC depth
- EPUB 2 and EPUB 3 output selection
- Pandoc fallback for markup-source ebooks
- OPF spine rebuild for malformed inputs
Pricing
From $9.99/mo (Pro) or $24.99/mo (Business) — or pay-as-you-go on the API plan.
Free tier: 5 conversions/day, 100 MB file size, no API key required (IP-gated). Pro $9.99/mo: 100/day (2,000/month), 2 GB files. Business $24.99/mo: 1,000/day (20,000/month), 10 GB files, GPU encoding, dedicated support.
See full pricing breakdown →Built for production
99.9% uptime SLA
Multi-region failover, transparent status page, 60-second response-time guarantee on Business.
Encryption + auto-delete
TLS 1.2+ in transit, AES-256 at rest. Files deleted after 1h / 24h / 7d depending on plan, or instantly via DELETE endpoint. See the security page.
~7s median latency
Most sub-100 MB jobs complete in 6-9 seconds. Webhook-driven async for heavier workloads; waitForJob for synchronous flows.
Frequently Asked Questions
Why is AZW3 recommended over MOBI for Kindle?
Modern Kindles (since Paperwhite gen 3) render AZW3 natively with CSS-3 support, embedded fonts, and proper image scaling. MOBI is a legacy format with PalmDoc roots; AZW3 produces visibly better typography and is the default Amazon ships its own e-books in.
Can the API replace the cover image during conversion?
Yes — multipart-upload a second file with the form field name `cover` and the API substitutes it into the output ebook. JPG or PNG accepted; resized automatically to 1600×2400 for the Kindle store specification.
Does the API support KFX output for Kindle?
No. KFX is a proprietary Amazon format with no public encoder. AZW3 is the recommended Kindle target — every modern Kindle device renders it identically to KFX in practice.
How does chapter detection work?
Calibre's heuristic engine looks for headings (h1-h6), bold paragraphs, page breaks, and common patterns like 'Chapter N'. Override via `chapterRegex=` if your source uses a custom convention.
Are DRM-protected ebooks supported?
No. The API rejects DRM-locked files at upload time with `EBOOK_DRM_LOCKED`. Only DRM-free sources are processed — this is a legal compliance constraint, not a technical limitation.
Related APIs
- File Conversion APIOne unified file conversion API for video, audio, image, document, ebook, archive, and font formats — 255 formats, 2,290+ conversion pairs.
- Convert APIProduction-grade file conversion API with 9 language SDKs, async webhooks, and cloud-to-cloud workflows. Free tier available.
- Media Conversion APIVideo and audio conversion API in one endpoint. 27 video + 21 audio formats, FFmpeg-backed, GPU-accelerated.
Or browse the full catalogue of 23 API products →
Get an API key
Start integrating the Ebook Conversion API in five minutes. Read the docs, grab a key, and ship your first conversion before the trial coffee cools.