Skip to content

LlamaParse Platform Quickstart

Install the SDK, get an API key, and run your first call against Parse, Extract, Classify, Split, or Index — all from one platform.

Build document agents powered by agentic OCR.

LlamaParse is the enterprise platform from LlamaIndex for turning documents into production AI pipelines. One API key, one SDK, and five composable products: Parse (agentic OCR), Extract (structured data), Classify, Split, and Index.

Terminal window
pip install "llama-cloud>=2.8"

Set your API key:

Terminal window
export LLAMA_CLOUD_API_KEY=llx-...

Get an API key from the LlamaParse dashboard.


Map what you’re trying to do to the right product:

I want to… Use
Turn PDFs, scans, or images into clean LLM-ready text Parse
Pull structured JSON out of documents that matches my schema Extract
Route documents into categories with natural-language rules Classify
Split concatenated documents into their logical parts Split
Build a hosted vector search pipeline for RAG Index
New here? Start with Parse—it’s the foundation most pipelines build on. Or explore the product quickstarts below.

Agentic OCR and parsing for 130+ formats. Turn PDFs and scans into LLM-ready text—the foundation for document agents.

Download the U.S. Treasury’s FY 2024 financial report executive summary as document.pdf:

Terminal window
curl -fL -o document.pdf https://fiscal.treasury.gov/system/files/files/reports-statements/financial-report/2024/executive-summary-2024.pdf
from llama_cloud import LlamaCloud
client = LlamaCloud() # Uses LLAMA_CLOUD_API_KEY env var
# Upload and parse a document
file = client.files.create(file="document.pdf", purpose="parse")
result = client.parsing.parse(
file_id=file.id,
tier="agentic",
version="latest",
expand=["markdown"],
)
# Get markdown output
print(result.markdown.pages[0].markdown)
import LlamaCloud from '@llamaindex/llama-cloud';
import fs from 'fs';
const client = new LlamaCloud(); // Uses LLAMA_CLOUD_API_KEY env var
// Upload and parse a document
const file = await client.files.create({
file: fs.createReadStream('document.pdf'),
purpose: 'parse',
});
const result = await client.parsing.parse({
file_id: file.id,
tier: 'agentic',
version: 'latest',
expand: ['markdown']
});
// Get markdown output
const [page] = result.markdown?.pages ?? [];
if (page?.success) console.log(page.markdown);
package main
import (
"context"
"fmt"
"log"
"os"
"time"
llamacloud "github.com/run-llama/llama-parse-go"
)
func main() {
ctx := context.Background()
client := llamacloud.NewClient() // Uses LLAMA_CLOUD_API_KEY env var
// Upload and parse a document
f, err := os.Open("document.pdf")
if err != nil {
log.Fatal(err)
}
defer f.Close()
file, err := client.Files.New(ctx, llamacloud.FileNewParams{
File: f,
Purpose: "parse",
})
if err != nil {
log.Fatal(err)
}
job, err := client.Parsing.New(ctx, llamacloud.ParsingNewParams{
FileID: llamacloud.String(file.ID),
Tier: llamacloud.ParsingNewParamsTierAgentic,
Version: llamacloud.ParsingNewParamsVersionLatest,
})
if err != nil {
log.Fatal(err)
}
// Poll until the job reaches a terminal state
getParams := llamacloud.ParsingGetParams{Expand: []string{"markdown"}}
result, err := client.Parsing.Get(ctx, job.ID, getParams)
if err != nil {
log.Fatal(err)
}
for result.Job.Status == "PENDING" || result.Job.Status == "RUNNING" {
time.Sleep(2 * time.Second)
result, err = client.Parsing.Get(ctx, job.ID, getParams)
if err != nil {
log.Fatal(err)
}
}
// Get markdown output
fmt.Println(result.Markdown.Pages[0].Markdown)
}
import ai.llamaindex.llamacloud.client.LlamaCloudClient;
import ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;
import ai.llamaindex.llamacloud.models.files.FileCreateParams;
import ai.llamaindex.llamacloud.models.files.FileCreateResponse;
import ai.llamaindex.llamacloud.models.parsing.ParsingCreateParams;
import ai.llamaindex.llamacloud.models.parsing.ParsingCreateResponse;
import ai.llamaindex.llamacloud.models.parsing.ParsingGetParams;
import ai.llamaindex.llamacloud.models.parsing.ParsingGetResponse;
import java.nio.file.Paths;
public class ParseQuickStart {
public static void main(String[] args) throws Exception {
LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv(); // Uses LLAMA_CLOUD_API_KEY env var
// Upload and parse a document
FileCreateResponse file = client.files().create(FileCreateParams.builder()
.file(Paths.get("document.pdf"))
.purpose("parse")
.build());
ParsingCreateResponse job = client.parsing().create(ParsingCreateParams.builder()
.fileId(file.id())
.tier(ParsingCreateParams.Tier.AGENTIC)
.version(ParsingCreateParams.Version.LATEST)
.build());
// Poll until the job reaches a terminal state
ParsingGetParams getParams = ParsingGetParams.builder()
.jobId(job.id())
.addExpand("markdown")
.build();
ParsingGetResponse result = client.parsing().get(getParams);
while (result.job().status().equals(ParsingGetResponse.Job.Status.PENDING)
|| result.job().status().equals(ParsingGetResponse.Job.Status.RUNNING)) {
Thread.sleep(2000);
result = client.parsing().get(getParams);
}
// Get markdown output
System.out.println(result.markdown().get().pages().get(0).asMarkdownResult().markdown());
}
}
Terminal window
# Upload and parse a document
FILE_ID=$(llp files create --file document.pdf --purpose parse | jq -r '.id')
JOB_ID=$(llp parsing create --file-id "$FILE_ID" --tier agentic --version latest | jq -r '.id')
# Poll until the job reaches a terminal state
while true; do
STATUS=$(llp parsing get --job-id "$JOB_ID" | jq -er '.job.status') || break
case "$STATUS" in COMPLETED|FAILED|CANCELLED) break ;; esac
sleep 2
done
# Get markdown output
llp parsing get --job-id "$JOB_ID" --expand markdown | jq -r 'if .job.status == "COMPLETED" then .markdown.pages[0].markdown
else "Parse job failed: \(.job.error_message // .)" end'

Full Guide | Examples | Tiers & Pricing


Download Skills

  • llamaparse: Advanced parsing for PDFs, docs, presentations and images (charts, tables, embedded visuals). Requires LLAMA_CLOUD_API_KEY and Node 18+.
  • liteparse: Local-first, fast parsing for text-dense PDFs and docs. No API key needed, requires @llamaindex/liteparse globally installed and Node 18+.

Install both skills with the skills CLI:

Terminal window
npx skills add run-llama/llamaparse-agent-skills

For single-skill installs, the agent plugins that bundle these skills, and Codex setup, see Skills and Plugins.


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/