Doc Studio

Translation

Translate documents while preserving exact layout, tables, formatting, and fonts.

document.translate runs a multi-pass translation engine that deconstructs PDF, DOCX, or PPTX documents into structural chunks, performs localized contextual translation, and recomposes output files while preserving vector graphics and formatting.

Request Schema

uploadIdstringrequired

Identifier of an uploaded PDF, DOCX, or PPTX file obtained via POST /v1/uploads.

targetLanguagestringrequired

Target language name (e.g. 'French', 'Hindi', 'German') or BCP-47 code (e.g. 'fr', 'hi', 'de').

regionalVariantstringoptional

Optional regional variant (e.g. 'Mexican' for Spanish, 'Brazilian' for Portuguese).

tonestringoptionaldefault: professional

Voice tone for output translation: 'professional', 'casual', 'technical', or 'creative'.

Code Example

curl -X POST https://transpera-api-dev-vv55i7vbvq-el.a.run.app/v1/jobs \
  -H "authorization: Bearer tp_test_..." \
  -H "content-type: application/json" \
  -H "idempotency-key: $(uuidgen)" \
  -d '{
    "operation": "document.translate",
    "input": {
      "uploadId": "c3a9f0b2-1d4e-4f6a-8b2c-9e1d3f5a7b9c",
      "targetLanguage": "Spanish",
      "regionalVariant": "Latin America",
      "tone": "professional"
    },
    "webhookUrl": "https://api.yourdomain.com/webhooks/transpera"
  }'