Skip to content
Guide
Parse
v1
Presets and Modes

Auto Mode

LlamaParse auto_mode parses each page in Balanced mode and upgrades it to Premium only when triggers fire on tables, images, regex, or text matches.

Automatically routes each page to Balanced or Premium preset

Auto Mode analyzes each page individually and dynamically chooses between Balanced and Premium parsing. This allows for higher accuracy while reducing unnecessary cost.

When auto_mode=True is enabled, LlamaParse first attempts to parse each page using Balanced Mode. If specific conditions are met, it will automatically reparse that page using Premium Mode for improved fidelity.

This mode enables flexibility but may result in variable and less predictable costs depending on the content of the file.

To use this mode, set auto_mode=True.

parser = LlamaParse(
auto_mode=True
)


If you want to upgrade parsing to Premium when a table is detected on the page, set auto_mode_trigger_on_table_in_page=True.

parser = LlamaParse(
auto_mode_trigger_on_table_in_page=True
)


If you want to upgrade parsing to Premium when images are present on a page, set auto_mode_trigger_on_image_in_page=True.

parser = LlamaParse(
auto_mode_trigger_on_image_in_page=True
)


To trigger Premium parsing when a regular expression matches text on the page, set auto_mode_trigger_on_regexp_in_page to your pattern (ECMA262 format).

parser = LlamaParse(
auto_mode_trigger_on_regexp_in_page="/((total cost)|(tax))/g"
)


To trigger Premium parsing when specific text appears on a page, use auto_mode_trigger_on_text_in_page.

parser = LlamaParse(
auto_mode_trigger_on_text_in_page="total"
)


Note for AI agents: this documentation is built for programmatic access. - Overview of all docs: https://developers.llamaindex.ai/llms.txt - Any page is available as raw Markdown by appending index.md to its URL — e.g. https://developers.llamaindex.ai/llamaparse/parse/getting_started/index.md - Agent-friendly REST search APIs live under https://developers.llamaindex.ai/api/ — search (BM25 full-text), grep (regex), read (fetch a page), and list (browse the doc tree). See https://developers.llamaindex.ai/llms.txt for parameters. - A hosted documentation MCP server is available at https://developers.llamaindex.ai/mcp. If you support MCP, you can ask the user to install it for browsing these docs directly (an alternative to the REST API). Setup: https://developers.llamaindex.ai/python/shared/mcp/