Skip to content
Guide
General

CLI reference

Install and use llp, the LlamaParse command-line interface, to upload files and run Parse, Extract, Classify, Split and Index jobs from a shell or an agent.

llp is the command-line interface for the LlamaParse API. Every REST resource is a command group, every operation is a subcommand, and the flags mirror the request fields, so anything you can do with the SDKs you can do from a shell, a script or a coding agent. The CLI is generated from the same API definition as the SDKs and is open source at run-llama/llama-parse-cli.

Terminal window
go install 'github.com/run-llama/llama-parse-cli/cmd/llp@latest'

The binary lands in $HOME/go/bin (or $GOPATH/bin); make sure that directory is on your PATH. Go 1.22 or newer is required.

Set your API key in the environment, or pass it per call with --api-key:

Terminal window
export LLAMA_CLOUD_API_KEY=llx-...

Keys come from the API key page. For the EU region, point the CLI at the EU endpoint with --base-url https://api.cloud.eu.llamaindex.ai (see Regions).

Upload a file, then run a Parse job on it. files create returns the file object; parsing create starts the job and returns it with its status:

Terminal window
llp files create --file report.pdf --purpose parse
llp parsing create --file-id FILE_ID --tier agentic --version latest
llp parsing get --job-id JOB_ID --expand markdown

Use --help on any command group or subcommand for its full flag list:

Terminal window
llp parsing create --help
GroupSubcommandsWhat it covers
filescreate, retrieve, list, delete, content, queryUpload files for a purpose (parse, extract, classify, split, sheet, user_data, agent_app), list and fetch them
parsingcreate, get, list, cancel, delete, list-versionsParse jobs, results, and the versions each tier accepts
extractcreate, get, list, cancel, delete, generate-schema, validate-schemaExtract jobs and schema helpers
classifycreate, get, list, cancelClassify jobs
splitcreate, get, list, cancel, deleteSplit jobs
batchescreate, get, list, cancelBatch jobs over many files
configurationscreate, retrieve, update, list, deleteSaved configurations reused across jobs
webhook-configscreate, retrieve, update, list, deleteSaved webhook endpoints for job notifications
projectslist, getProjects in your organization
beta:indexescreate, get, list, delete, syncIndex: managed ingestion over your files
beta:retrievalretrieve, find, grep, readRetrieval and file search over an Index
beta:chatcreate, retrieve, list, delete, get-summary, streamChat over an Index

Run llp --help for the complete list; the groups above are the ones most jobs use.

Nested request fields take a JSON or YAML value. Supply it inline, from a file with the @ prefix, or one field at a time with a dotted flag:

Terminal window
llp parsing create --file-id FILE_ID --tier agentic --version latest \
--output-options '{"markdown": {"tables": {"output_tables_as_markdown": true}}}'
llp parsing create --file-id FILE_ID --tier agentic_plus --version latest \
--output-options.images-to-save '[screenshot]'
llp extract create --file-input FILE_ID \
--configuration @extract-config.json

@file reads the file’s contents, sniffing whether to send them as text or base64; @file://path forces text and @data://path forces base64. To pass a literal value that starts with @, escape it as \@. Flags that upload a file, such as files create --file, take a plain path with no prefix.

The default output is indented JSON, coloured when stdout is a terminal. --format switches it:

ValueOutput
jsonIndented JSON, coloured on a terminal; plain when piped into jq or another program
jsonlOne JSON object per line, for list results
yamlYAML
prettyA readable, non-JSON rendering of the response
rawThe raw response body
exploreAn interactive viewer for large responses; falls back to json when not on a terminal
autoThe default: json

--transform applies a GJSON path to the response before printing, and --raw-output prints a string result without JSON quotes, which is the combination to use when feeding one command’s output into another:

Terminal window
FILE_ID=$(llp files create --file report.pdf --purpose parse \
--transform 'id' --raw-output)
llp parsing create --file-id "$FILE_ID" --tier cost_effective --version latest

--format-error and --transform-error do the same for error responses.

FlagPurpose
--api-keyAPI key, instead of LLAMA_CLOUD_API_KEY
--base-urlAPI endpoint, for the EU region or a self-hosted deployment
--format, --format-errorOutput format for responses and errors
--transform, --transform-errorGJSON transform for responses and errors
--raw-outputPrint string results without quotes
--debugLog requests and responses
--versionPrint the CLI version

The CLI is a good fit for coding agents: the help text documents every flag, --format json gives machine-readable output, and @file arguments keep large configurations out of the command line. If you would rather give an agent a tool interface than a shell, see LlamaParse MCP.

  • Quickstart for the same first job in Python, TypeScript, Go and Java
  • API reference for every field each command accepts
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/for-agents/mcp/ - Other LlamaIndex tooling for agents — the LlamaParse Platform MCP server, agent skills and plugins, and the n8n node — is mapped at https://developers.llamaindex.ai/for-agents/