PageTranslate Book Translator
Translate a whole book with PageTranslate: an EPUB, a DOCX manuscript or a PDF. One upload, one translated file in the same format.
PageTranslate translates the file itself, not pasted text. For a sentence or a paragraph, translate it yourself.
When to use
- The user wants a novel, ebook, manuscript or textbook translated.
- The file is an
.epub, or a book-length.docxor.pdf. - The book is too long to translate in the conversation.
Before you start
- Target language: a code such as
es,fr,de,it,ja,ko,ar,hi,ru. Usept-BRfor Brazilian Portuguese,zhfor Simplified andzh-TWfor Traditional Chinese. The source language is detected. If the user did not name a target language, ask. - API key: the user creates one at https://pagetranslate.ai/dashboard/api-keys (free account, verified
email) and sets it as
PAGETRANSLATE_API_KEY. - Price: uploading is free and returns the exact price. Nothing is charged until the user pays.
- Limits: PDF, DOCX, EPUB, PNG, JPG, WEBP, TIFF, BMP, GIF. Up to 100 MB and 1,000 PDF pages.
Steps
Use the pagetranslate MCP tools when they are available. Otherwise use curl (next section).
- Upload:
upload_documentwith the file's absolute path and the target language. It returnsjob_id,word_count,priceandnext_step. - Tell the user the price and get a yes. Then:
- If the response has a
payment_url, give the user that link. They pay by card in the browser, and the translation starts by itself. - If the price is
0.00(covered by the account's word balance), callstart_translation.
- If the response has a
- Wait: call
get_translationabout every 30 seconds untilstatusiscompleted. Ifstatusisfailed, tell the user the reason given. - Download:
download_translationwithoutput_dirset to the source file's folder. It never overwrites a file. Tell the user the saved path.
list_translations shows earlier jobs, for example to download one again.
Without the MCP server
Same steps over HTTPS. Every request carries Authorization: Bearer $PAGETRANSLATE_API_KEY.
API=https://api.pagetranslate.ai/api/v1
# 1. Upload (free). The response has job_id and quote.total_cents.
curl -sS -X POST "$API/upload/" -H "Authorization: Bearer $PAGETRANSLATE_API_KEY" \
-F "file=@/path/to/file" -F "requested_language=es"
# 2. Start from the account's word balance. A 400 "Insufficient credits" means the user
# pays by card at https://pagetranslate.ai/dashboard?resume=JOB_ID#upload instead.
curl -sS -X POST "$API/jobs/JOB_ID/translate" -H "Authorization: Bearer $PAGETRANSLATE_API_KEY" \
-H "Content-Type: application/json" -d '{}'
# 3. Poll until "status" is "completed" ("payment_status" shows whether it was paid).
curl -sS "$API/jobs/JOB_ID" -H "Authorization: Bearer $PAGETRANSLATE_API_KEY"
# 4. Download. -OJ keeps the server's file name; run it in the folder to save into.
curl -sS -OJ "$API/jobs/JOB_ID/download" -H "Authorization: Bearer $PAGETRANSLATE_API_KEY"
Book notes
- The price follows the word count: about 8¢ per 1,000 words, so an 80,000-word novel is about $6.40. The upload returns the exact price; quote that, not this estimate.
- A book takes much longer than a short document. Poll every 30 to 60 seconds and do not upload it again.
- An EPUB comes back as an EPUB with its chapters and table of contents. To read it on a Kindle, see the guide below.
- Ask which variety of the language the user wants when it matters:
ptorpt-BR,zhorzh-TW.
Problems
- 401: the key is missing or revoked. Ask the user to create a new one.
- 429 on upload: uploads are rate limited per account. Wait, do not retry in a loop.
- "Unsupported language code": use one of the codes above.
- Stuck at
pending: the job is unpaid. Give the user the payment link again.
Links
- Online version: translate a book with PageTranslate
- Ebooks: EPUB translator
- Fiction: AI novel translator
- Spanish editions: translate my book to Spanish
- Pricing: how much does it cost to translate a book
- Estimates: translation cost calculator
- Reading: how to open EPUB on Kindle
- Source and docs: GitHub · npm · PageTranslate
Safety
- Uploading sends the file to PageTranslate. Upload only the file the user asked to translate.
- Never print the API key or write it to a file.
- Do not say a translation is running until
payment_statusispaid. - Never pay, or enter card details, for the user. Payment is theirs to make in the browser.
