Zum Inhalt
HALOWERK

Medienwerk

doc translate

Takes a document as text, a public URL or inline base64 — PDF, DOCX, ODT, HTML and Markdown are read — and returns it translated into the target language. Structure is the point: heading levels, indentation, blank lines, list markers, the number of table columns, placeholders such as double-brace tokens or printf specifiers, URLs, e-mail addresses, file names and fenced code blocks are meant to come through untouched. Rather than assert that, the endpoint measures it.

POST https://medien.halowerk.com/v1/doc-translate

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
textstringNeinThe document directly. Cheapest and clearest — its length is what you are billed for.
sourceobjectNeinAlternative to text: the document as a file.
target_languagestringJaTarget language as a BCP-47 code.
source_languagestringNeinSource language. "auto" lets the model detect it.
document_charsintegerNeinOnly needed when the document arrives by url or content_base64: its length in characters, which is what you are billed for.
formalitystringNeinRegister of address where the target language distinguishes it.
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "required": [
    "target_language"
  ],
  "additionalProperties": false,
  "properties": {
    "text": {
      "type": "string",
      "maxLength": 24000,
      "description": "The document directly. Cheapest and clearest — its length is what you are billed for."
    },
    "source": {
      "type": "object",
      "additionalProperties": false,
      "description": "Alternative to text: the document as a file.",
      "properties": {
        "url": {
          "type": "string",
          "maxLength": 2048,
          "description": "Public http(s) URL of a PDF, DOCX, ODT, HTML or text file."
        },
        "content_base64": {
          "type": "string",
          "maxLength": 12000000,
          "description": "The file inline, base64."
        },
        "filename": {
          "type": "string",
          "maxLength": 260
        },
        "format": {
          "type": "string",
          "enum": [
            "auto",
            "pdf",
            "docx",
            "odt",
            "html",
            "markdown",
            "rtf",
            "text"
          ],
          "default": "auto"
        }
      }
    },
    "target_language": {
      "type": "string",
      "enum": [
        "de",
        "en",
        "fr",
        "es",
        "it",
        "nl",
        "pt",
        "pl",
        "cs",
        "da",
        "sv",
        "no",
        "fi",
        "tr",
        "ro",
        "hu",
        "el"
      ],
      "description": "Target language as a BCP-47 code."
    },
    "source_language": {
      "type": "string",
      "enum": [
        "auto",
        "de",
        "en",
        "fr",
        "es",
        "it",
        "nl",
        "pt",
        "pl",
        "cs",
        "da",
        "sv",
        "no",
        "fi",
        "tr",
        "ro",
        "hu",
        "el"
      ],
      "default": "auto",
      "description": "Source language. \"auto\" lets the model detect it."
    },
    "document_chars": {
      "type": "integer",
      "minimum": 1,
      "maximum": 24000,
      "description": "Only needed when the document arrives by url or content_base64: its length in characters, which is what you are billed for."
    },
    "formality": {
      "type": "string",
      "enum": [
        "neutral",
        "formal",
        "informal"
      ],
      "default": "neutral",
      "description": "Register of address where the target language distinguishes it."
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "text": "# Wartungsvertrag\n\n| Leistung | Frist |\n|---|---|\n| Stoerungsannahme | 4 Stunden |\n| Entstoerung | 24 Stunden |\n\nAnsprechpartner: {{kontakt}}",
  "target_language": "en",
  "formality": "formal"
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →