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 } }}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);