Translate a document and keep its layout
translate_documentTranslates a PDF or a scanned document / photo of one into another language and returns the same document as a PDF: layout, tables, logos and every number kept and checked. For payslips, bank statements, official and government letters, birth and marriage certificates, diplomas, school reports, contracts, leases and forms, e.g. for a visa, immigration, a bank or a school. Strong on right-to-left sources (Hebrew, Arabic), which it can also mirror into a left-to-right layout. Use when the user says 'translate this PDF / document / scan', 'keep the formatting / layout', 'give me back the PDF', or when a translation in chat lost the tables or layout. Give the document as file (a file the user attached) or file_url (an https link). Up to 5 pages per document. Takes 30-90 seconds; if it takes longer, returns an id for get_translation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Target language, e.g. English, Spanish, German. Defaults to English. | |
| file | No | The document the user attached (ChatGPT file). | |
| from | No | Source language. Leave out to detect it. | |
| layout | No | keep = same layout as the original (default); ltr = mirror a right-to-left page (Hebrew, Arabic) into a left-to-right layout. | |
| file_url | No | https link to the PDF or image, when no file is attached. | |
| keep_logos | No | true = don't translate logos and wordmarks. |