Base URL: / (frontend) and /api (backend proxy).
Accepts an ePub via multipart/form-data (field: file).
- Validations: only
.epub, size ≤ 100 MB. - Response 200:
{ "task_id": string } - Errors: JSON
{ "error": string, "code": int }- 415 unsupported type
- 413 too large
- 500 conversion unavailable
curl -F "file=@/path/book.epub" https://yourdomain/api/convertPoll every 2 seconds.
- Response 200 (processing):
{ "progress": 0-100, "status": "processing", "message": "string" }- Response 200 (complete):
{
"progress": 100,
"status": "complete",
"message": "Complete",
"download_url": "/api/download/{task_id}",
"expires_in": seconds
}- Response 200 (error):
{ "progress": N, "status": "error", "message": "reason" }Returns the PDF file for completed tasks (until expiry).
- Success:
200 OK,Content-Type: application/pdf - Errors: JSON
{ "error": string, "code": int }- 425 not ready
- 410 expired
- 404 not found
All errors follow:
{ "error": "message", "code": int }- Converted files and task state are in-memory + temp-dir only and expire after 30 minutes.
- Conversion uses Calibre’s
ebook-convert.