Infery.ai
← All tools

Convert document format

Document

document.convert_format

in: documentout: document

Convert between markdown, html, docx, pdf, epub, latex.

Pricing

Price
0.625 cr / request

Prices in credits (1 credit = $0.01).

Convert Document Format

Convert documents between formats: markdown ↔ HTML ↔ DOCX ↔ PDF ↔ EPUB ↔ LaTeX.

When to use

  • Generate PDFs from markdown for reports, invoices, or documentation.
  • Export DOCX for users who need to edit in Word.
  • Convert to HTML for embedding content in web pages.
  • Produce EPUB for e-reader distribution.

Inputs & outputs

Input modalityMarkdown (inline string or URL)
Output modalityDocument file (GCS URL)
Max inline size1 MB
Max URL input size50 MB

Parameters

ParamRequiredDescription
toyesTarget format — pdf, html, docx, epub, latex
tocnoInclude a table of contents. Default: false

Examples

Markdown → PDF with table of contents

{
  "type": "document.convert_format",
  "input": { "markdown_inline": "# Report\n\n## Section 1\n\nContent here." },
  "params": { "to": "pdf", "toc": true }
}

Markdown URL → DOCX

{
  "type": "document.convert_format",
  "input": { "markdown_url": "gs://infery-prod-media/content/article.md" },
  "params": { "to": "docx" }
}

Pricing

Billed per conversion. PDF conversions are slightly higher due to rendering cost. See pricing dashboard for current rates.

Related capabilities

  • document.extract_text — extract markdown from PDF/DOCX before converting
  • document.render_slides — render markdown as a slide deck instead of a document

Examples

Markdown → PDF with TOC

{
  "to": "pdf",
  "toc": true
}