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.
Request
Request body for converting a file to markdown or structured tree.
Input Types:
* file: Base64-encoded file content — set 'file_name' in metadata to specify the extension
* uri: Remote URL or S3 URI pointing to the file
* text: Plain text or markdown content
Format Options:
* markdown (default): Returns parsed content as a flat markdown string
* object: Returns a hierarchical content tree with typed nodes
Reader Selection:
* Omit 'reader' to use the default reader for the detected file type
* Use GET /v1/artifacts/readers to list available readers and their supported extensions
input
File content as base64, remote URI, or plain text
metadata
Optional metadata, must include ‘file_name’ to resolve file extension
reader
Reader to use for parsing. If omitted the default reader for the file type is used.
format
Output format: ‘markdown’ returns text, ‘object’ returns a content tree.
Response
Successful conversion
content
Parsed file content in the requested format
reader
Reader that was used to parse the file
Errors
401
Unauthorized Error
422
Unprocessable Entity Error

