v10

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-0643140398.0 KB
Artifacts

Convert File to Markdown or Tree

Parse a file using the document readers and return its content as markdown text or a structured content tree, without ingesting it into the knowledge base.

post/v1/artifacts/convert

Request body

metadataobject nullable

Optional metadata, must include 'file_name' to resolve file extension

readerstring nullable

Reader to use for parsing. If omitted the default reader for the file type is used.

format'object' | 'markdown'

Enumeration of content retrieval formats.

Example request

{
  "format": "markdown",
  "input": {
    "type": "text",
    "value": "# Hello\n\nThis is a simple markdown document."
  },
  "metadata": {
    "file_name": "hello.md"
  }
}

Response

Successful conversion

readerstring required

Reader that was used to parse the file

Example response

{
  "content": "# Annual Report 2023\n\nExecutive Summary\n\nFiscal year 2023 marked a transformative period...",
  "reader": "markitdown"
}