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.
Install
Section titled “Install”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.
Authenticate
Section titled “Authenticate”Set your API key in the environment, or pass it per call with --api-key:
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).
First job
Section titled “First job”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:
llp files create --file report.pdf --purpose parsellp parsing create --file-id FILE_ID --tier agentic --version latestllp parsing get --job-id JOB_ID --expand markdownUse --help on any command group or subcommand for its full flag list:
llp parsing create --helpCommand groups
Section titled “Command groups”| Group | Subcommands | What it covers |
|---|---|---|
files | create, retrieve, list, delete, content, query | Upload files for a purpose (parse, extract, classify, split, sheet, user_data, agent_app), list and fetch them |
parsing | create, get, list, cancel, delete, list-versions | Parse jobs, results, and the versions each tier accepts |
extract | create, get, list, cancel, delete, generate-schema, validate-schema | Extract jobs and schema helpers |
classify | create, get, list, cancel | Classify jobs |
split | create, get, list, cancel, delete | Split jobs |
batches | create, get, list, cancel | Batch jobs over many files |
configurations | create, retrieve, update, list, delete | Saved configurations reused across jobs |
webhook-configs | create, retrieve, update, list, delete | Saved webhook endpoints for job notifications |
projects | list, get | Projects in your organization |
beta:indexes | create, get, list, delete, sync | Index: managed ingestion over your files |
beta:retrieval | retrieve, find, grep, read | Retrieval and file search over an Index |
beta:chat | create, retrieve, list, delete, get-summary, stream | Chat over an Index |
Run llp --help for the complete list; the groups above are the ones most jobs use.
Passing structured options
Section titled “Passing structured options”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:
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.
Output formats
Section titled “Output formats”The default output is indented JSON, coloured when stdout is a terminal. --format switches it:
| Value | Output |
|---|---|
json | Indented JSON, coloured on a terminal; plain when piped into jq or another program |
jsonl | One JSON object per line, for list results |
yaml | YAML |
pretty | A readable, non-JSON rendering of the response |
raw | The raw response body |
explore | An interactive viewer for large responses; falls back to json when not on a terminal |
auto | The 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:
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.
Global flags
Section titled “Global flags”| Flag | Purpose |
|---|---|
--api-key | API key, instead of LLAMA_CLOUD_API_KEY |
--base-url | API endpoint, for the EU region or a self-hosted deployment |
--format, --format-error | Output format for responses and errors |
--transform, --transform-error | GJSON transform for responses and errors |
--raw-output | Print string results without quotes |
--debug | Log requests and responses |
--version | Print the CLI version |
Using the CLI from an agent
Section titled “Using the CLI from an agent”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.
See also
Section titled “See also”- Quickstart for the same first job in Python, TypeScript, Go and Java
- API reference for every field each command accepts