AI Tools
AI Translate
Translate a PDF into any target language while keeping its structure intact — headings, tables, lists and links survive. The document is converted to Markdown first, then translated chunk by chunk.
PRO / ENTERPRISE only 200 credits / callSynchronous
Overview
Upload a PDF and name a target language; the translated Markdown comes back inline (no download URL). Billed a flat 200 credits per call.
POST
https://api.bytefuse.in/api/v1/ai/translatePaid plans only
Requires a PRO or ENTERPRISE plan — anonymous →401, free-tier → 403.Request
Content type multipart/form-data:
filefilerequiredThe PDF to translate (must end in
.pdf, else 415).target_langstringrequiredTarget language as free text —
Spanish, fr, Hindi, etc. Blank returns 422.source_langstringoptionalSource language, or
auto to detect.Default: autoField names
The fields aretarget_lang and source_lang — not target_language / source. The translated output is returned in a field called markdown.Response
200 OK, application/json:
200 OK
{
"success": true,
"markdown": "# Título\n\nPárrafo traducido…\n\n| A | B |\n|---|---|\n| 1 | 2 |",
"credits_charged": 200,
"target_lang": "Spanish",
"source_lang": "auto",
"chunks": 2,
"word_count": 640,
"processing_time_ms": 8120
}markdownstringoptionalThe translated text, as Markdown with structure preserved. (The field is
markdown, not translation.)target_langstringoptionalEcho of the requested target language.
source_langstringoptionalEcho of the requested source (or
auto).chunksintoptionalNumber of translation chunks processed.
word_countintoptionalWord count of the translated output.
credits_chargedintoptionalAlways
200. Mirrors X-Credits-Charged.Examples
curl -X POST https://api.bytefuse.in/api/v1/ai/translate \
-H "X-API-Key: dt_live_your_key" \
-F "file=@contract.pdf" \
-F "target_lang=Spanish" \
-F "source_lang=auto"Errors
401Anonymous / no valid credential.
403Free-tier account — AI tools need PRO or ENTERPRISE.
415Missing filename or not a
.pdf.422
target_lang is blank, or the PDF has no extractable text.402 / 429 / 503Insufficient credits, rate limited, or capacity/config error.
500AI processing failed unexpectedly.
