Zum Inhalt
HALOWERK

Medienwerk

doc convert

Takes one file, by URL or inline base64, and returns it in the format you ask for. Text documents go through pandoc, so DOCX, ODT, EPUB, HTML, Markdown, RST, Org, LaTeX, RTF, MediaWiki, Textile, CSV and Jupyter notebooks convert in both directions.

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

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
sourceobjectNeinThe file to convert. Either url or content_base64, not both.
textstringNeinAlternative to source for plain text input, e.g. Markdown or HTML source. Requires "from".
fromstringNeinOverride the detected input format. "auto" reads it from the bytes.
tostringJaTarget format. PDF is deliberately absent — see the description.
standalonebooleanNeinFor pandoc targets: emit a complete document with header rather than a fragment.
include_text_analysisbooleanNeinAlso return word, paragraph and heading counts of the extracted text.
imageobjectNeinOnly used for image targets.
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "required": [
    "to"
  ],
  "additionalProperties": false,
  "properties": {
    "source": {
      "type": "object",
      "additionalProperties": false,
      "description": "The file to convert. Either url or content_base64, not both.",
      "properties": {
        "url": {
          "type": "string",
          "maxLength": 2048,
          "description": "Public http(s) URL of the file. Private and local addresses are refused."
        },
        "content_base64": {
          "type": "string",
          "maxLength": 12000000,
          "description": "The file inline, base64. A data: prefix is accepted."
        },
        "filename": {
          "type": "string",
          "maxLength": 260,
          "description": "Optional. Only consulted when the bytes carry no recognisable signature."
        }
      }
    },
    "text": {
      "type": "string",
      "maxLength": 400000,
      "description": "Alternative to source for plain text input, e.g. Markdown or HTML source. Requires \"from\"."
    },
    "from": {
      "type": "string",
      "enum": [
        "auto",
        "pdf",
        "docx",
        "odt",
        "epub",
        "html",
        "markdown",
        "gfm",
        "commonmark",
        "rst",
        "org",
        "latex",
        "rtf",
        "textile",
        "mediawiki",
        "jira",
        "docbook",
        "csv",
        "tsv",
        "ipynb",
        "text",
        "png",
        "jpeg",
        "gif",
        "webp",
        "tiff",
        "avif",
        "heic",
        "svg"
      ],
      "default": "auto",
      "description": "Override the detected input format. \"auto\" reads it from the bytes."
    },
    "to": {
      "type": "string",
      "enum": [
        "markdown",
        "gfm",
        "commonmark",
        "html",
        "plain",
        "text",
        "rst",
        "org",
        "latex",
        "rtf",
        "textile",
        "mediawiki",
        "jira",
        "asciidoc",
        "docbook",
        "typst",
        "json",
        "ipynb",
        "docx",
        "odt",
        "epub",
        "png",
        "jpeg",
        "webp",
        "avif",
        "tiff"
      ],
      "description": "Target format. PDF is deliberately absent — see the description."
    },
    "standalone": {
      "type": "boolean",
      "default": false,
      "description": "For pandoc targets: emit a complete document with header rather than a fragment."
    },
    "include_text_analysis": {
      "type": "boolean",
      "default": true,
      "description": "Also return word, paragraph and heading counts of the extracted text."
    },
    "image": {
      "type": "object",
      "additionalProperties": false,
      "description": "Only used for image targets.",
      "properties": {
        "max_width": {
          "type": "integer",
          "minimum": 16,
          "maximum": 8000,
          "description": "Scale down so the width fits. Never scales up."
        },
        "max_height": {
          "type": "integer",
          "minimum": 16,
          "maximum": 8000,
          "description": "Scale down so the height fits."
        },
        "quality": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 82,
          "description": "For JPEG, WebP, AVIF and TIFF."
        },
        "dpi": {
          "type": "integer",
          "minimum": 36,
          "maximum": 400,
          "default": 150,
          "description": "Only when rendering PDF pages to images."
        },
        "first_page": {
          "type": "integer",
          "minimum": 1,
          "default": 1,
          "description": "First PDF page to render."
        },
        "last_page": {
          "type": "integer",
          "minimum": 1,
          "description": "Last PDF page to render. Capped by max_pages."
        },
        "max_pages": {
          "type": "integer",
          "minimum": 1,
          "maximum": 20,
          "default": 5,
          "description": "Hard ceiling on rendered pages."
        }
      }
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "source": {
    "url": "https://example.com/bericht.docx"
  },
  "to": "markdown"
}

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 →