Markdown Output Options
Markdown output options allow you to configure how the parsed content is formatted when output as Markdown.
Available Options
Section titled “Available Options”Annotate Links
Section titled “Annotate Links”Add annotations to links in the markdown output, providing additional context about the link destinations.
{ "output_options": { "markdown": { "annotate_links": true } }}Inline image
Section titled “Inline image”Inline images in the markdown output as a image tag \[description\]\(path\) instead of transcribing them,
{ "output_options": { "markdown": { "inline_images": true } }}Page Options
Section titled “Page Options”Configure page-level formatting for markdown output:
Table Options
Section titled “Table Options”Configure how tables are formatted in markdown output:
Compact Markdown Tables
Section titled “Compact Markdown Tables”Use compact formatting for markdown tables, reducing whitespace and creating more condensed table layouts.
{ "output_options": { "markdown": { "tables": { "compact_markdown_tables": true } } }}Output Tables as Markdown
Section titled “Output Tables as Markdown”Control whether tables are output in markdown format or as HTML. Set to false to output tables as HTML instead of markdown.
{ "output_options": { "markdown": { "tables": { "output_tables_as_markdown": false } } }}Multiline Separator
Section titled “Multiline Separator”Specify a separator for multiline content within markdown table cells.
{ "output_options": { "markdown": { "tables": { "markdown_table_multiline_separator": " | " } } }}Combined Configuration
Section titled “Combined Configuration”You can combine multiple markdown options:
{ "output_options": { "markdown": { "annotate_links": true, "tables": { "compact_markdown_tables": true, "output_tables_as_markdown": true } } }}Complete API Request Example
Section titled “Complete API Request Example”curl -X 'POST' \ 'https://api.cloud.llamaindex.ai/api/v2/parse' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \ --data '{ "file_id": "<file_id>", "tier": "agentic_plus", "version": "latest", "output_options": { "markdown": { "annotate_links": true, "tables": { "compact_markdown_tables": true } } } }'from llama_cloud import LlamaCloud
client = LlamaCloud(api_key="LLAMA_CLOUD_API_KEY")
result = client.parsing.parse( upload_file="example_file.pdf", tier="agentic_plus", version="latest", output_options={ "markdown": { "annotate_links": True, "tables": { "compact_markdown_tables": True } } })
print(result.markdown)import fs from "fs";import { LlamaCloud } from "@llamaindex/llama-cloud";
const client = new LlamaCloud({ apiKey: "LLAMA_CLOUD_API_KEY",});
const result = await client.parsing.parse({ upload_file: fs.createReadStream('example_file.pdf'), tier: "agentic_plus", version: "latest", output_options: { markdown: { annotate_links: true, tables: { compact_markdown_tables: true } } }});
console.log(result.markdown);