Migrate · LlamaParse to Extend
Migrate from LlamaParse to Extend
Swap LlamaParse for Extend Parse and get extraction, splitting, and review in the same API.
View as MarkdownFive steps
- Calls to swap
- parse, extract, split, classify
- SDK
- pip install extend-ai or npm install extend-ai
- API key variable
- EXTEND_API_KEY
- Parsing accuracy
- Extend 95.7% vs. LlamaParse Agentic 92.1% on RealDoc-Bench
Concept map
- client.parsing.parse(file_id=..., tier=...)client.parse(file=...)
- Choose an engine instead of a tier: parse_performance (default), parse_light, or parse_auto.
- result.markdown.pages[i].markdownresponse.output.chunks[i].content
- Chunks are pages by default. Set chunkingStrategy to section or document for larger chunks.
- LlamaExtractclient.extract(config={'schema': ...})
- Inline JSON Schema with per-field confidence and citations.
- Split and classifyclient.split and client.classify
- Every split returns a standalone file ID; every classification returns an id and confidence to branch on.
- client.files.create(file=..., purpose=...)client.files.upload(file=...)
- One file ID works across every Extend processor.
- LLAMA_CLOUD_API_KEYEXTEND_API_KEY
- Both SDKs read the key from the environment.
Get an API key
Sign up, then export your key as EXTEND_API_KEY. You start with 10,000 free credits.
Swap one call
Add Extend next to your current call, behind a flag.
Swap parsing first and keep your index code.
Parse a document to Markdown
Read output.chunks instead of result.markdown.pages.
Remove · LlamaParse (Python) from llama_cloud import LlamaCloud client = LlamaCloud() # reads LLAMA_CLOUD_API_KEY file = client.files.create(file="./invoice.pdf", purpose="parse") result = client.parsing.parse( file_id=file.id, tier="agentic", version="latest", expand=["markdown"], ) print(result.markdown.pages[0].markdown)Add · Extend (Python) from extend_ai import Extend client = Extend() # reads EXTEND_API_KEY response = client.parse( file={"url": "https://example.com/invoice.pdf"} ) for chunk in response.output.chunks: print(chunk.content) # Markdown for the chunk for block in chunk.blocks: print(block.type, block.content)Extract fields with a schema
Pass a JSON Schema and get cited values back.
Add · Extend (Python) from extend_ai import Extend client = Extend() result = client.extract( file={"url": "https://example.com/invoice.pdf"}, config={ "schema": { "type": "object", "properties": { "invoice_number": {"type": ["string", "null"]}, "total": {"type": ["number", "null"]}, }, }, "advancedOptions": {"citationsEnabled": True}, }, ) print(result.output.value) # shaped like your schema print(result.output.metadata) # per-field confidence and citationsClassify and split mixed files
Describe each document type once and branch on the result.
Add · Extend (Python) from extend_ai import Extend client = Extend() result = client.classify( file={"url": "https://example.com/document.pdf"}, config={ "classifications": [ {"id": "invoice", "type": "invoice", "description": "An invoice requesting payment."}, {"id": "other", "type": "other", "description": "Any other document type."}, ], }, ) print(result.output.id, result.output.confidence)Run both side by side
Compare both on 50 to 100 of your documents, and save them as an evaluation set.
Scale with async
Use async runs with webhooks, or batches of up to 1,000 files.
Cut over
Switch traffic once results pass, and rerun the set after changes.
What you gain
- 95.7% vs. 92.1% on RealDoc-Bench parsing.
- 99.2% on LongArray-Extract with all 45 documents completed, vs. 47.2% (Standard) and 34.7% (Agentic).
- Schema extraction with citations and confidence.
- Built-in review and evaluation sets.
- Self-serve pricing with 10,000 free credits.
When to keep both
- Parsing feeds a LlamaIndex-native retrieval, indexing, or agent stack and you don't need schema extraction, review, or evaluation on the output.
Agent prompt
Paste into Claude Code, Cursor, or Codex to run the migration.
Migrate this codebase from LlamaParse to Extend. Read the guide at https://www.extend.ai/migrate/llamaparse.md, install the extend-ai SDK, and replace each LlamaParse call using its concept map and code samples. Keep the LlamaParse path behind a flag until both paths have run on the same documents, and read the API key from EXTEND_API_KEY.
SDK, CLI, and MCP
Pick how you want to work.
CLI
Run any processor from your terminal.
curl -fsSL https://extend.ai/install.sh | sh
extend setup
extend parse invoice.pdf > invoice.mdMCP server
Let your coding agent call Extend.
claude mcp add --transport http extend https://mcp.extend.ai/mcpAgent quickstart
Give your agent current Extend docs.
npx skills add extend-hq/extend-agent-plugin --skill extend-apiFAQ
LlamaParse is down. What should I do?
Check LlamaParse's status page first. To keep documents moving during an outage, send the same files to Extend: sign up at dashboard.extend.ai, export EXTEND_API_KEY, and call client.parse or client.extract with the same file URL. New accounts get 10,000 free credits with no contract or sales call, and Extend publishes its own status at status.extend.ai.
Can I use Extend as a fallback for LlamaParse?
Yes. Keep LlamaParse as your primary path and route a request to Extend when it fails, times out, or returns low-confidence output. LlamaParse returns Markdown per page and Extend returns Markdown per chunk (pages by default), so a fallback can feed the same index without changing your chunking. Score both paths on the same Extend evaluation set so you know the fallback meets your bar before you need it.
LlamaParse is slow or timing out on large documents. What are my options?
Use Extend's async run endpoints: create_and_poll while you test, or webhooks in production, instead of holding a connection open. Synchronous calls time out after five minutes, and batch requests accept up to 1,000 files each. For mixed batches, the parse_auto engine sends simple pages through the faster Light engine and only complex pages through Performance.
LlamaParse is returning wrong or incomplete results. Is there a more accurate alternative?
On RealDoc-Bench, Extend Parse 2.0 scored 95.7% field-level document Q&A accuracy against 92.1% for LlamaParse Agentic. On LongArray-Extract, Extend MAX completed all 45 long, table-heavy documents at 99.2% accuracy, against 47.2% for LlamaParse Standard and 34.7% for LlamaParse Agentic. With citations enabled, every extracted value points to its page and region, so you can see exactly where a wrong value came from.
Is Extend more accurate than LlamaParse?
On RealDoc-Bench, Extend Parse 2.0 scored 95.7% field-level document Q&A accuracy against 92.1% for LlamaParse Agentic. On LongArray-Extract, Extend MAX completed all 45 documents at 99.2% accuracy, against 47.2% for LlamaParse Standard and 34.7% for LlamaParse Agentic.
LlamaParse is getting expensive. How does Extend pricing work?
Extend publishes per-page pricing on a credit system: Parse costs $5 per 1,000 pages on Light and $20 per 1,000 pages on Performance on pay-as-you-go, at $0.01 per credit after 10,000 free credits, with no contract, monthly minimum, or platform fee. The parse_auto engine bills each page by its complexity, so clean pages stay cheap.
Does Extend keep my documents if I switch from LlamaParse?
Not if you don't want it to. Zero data retention can be enabled on every plan, including pay-as-you-go, and AI subprocessors operate under contractual zero-retention and no-training terms. Extend supports SOC 2 Type II, HIPAA with BAAs, GDPR, and EU processing.
Can I run Extend in my own cloud?
Yes. Extend runs as managed cloud in US or EU regions, as BYOC inside your own cloud account and VPC, or as a hybrid deployment.
When should I consider migrating from LlamaParse to Extend?
Consider Extend when accuracy on complex documents, traceable output, or production review starts to limit your pipeline. Extend Parse 2.0 scored 95.7% on RealDoc-Bench against 92.1% for LlamaParse Agentic, and Extend MAX completed all 45 LongArray-Extract documents at 99.2% accuracy against 47.2% for LlamaParse Standard and 34.7% for LlamaParse Agentic. Extend is self-serve, so you can test it on your own documents the same day with 10,000 free credits.
Can a coding agent migrate my LlamaParse integration for me?
Yes. Connect the Extend MCP server to Claude Code, Cursor, Codex, or VS Code, or install the extend-api context file with npx skills add extend-hq/extend-agent-plugin --skill extend-api, then ask the agent to replace each call using the concept map on this page.
Can I use Extend with LlamaIndex?
Yes. Extend Parse returns Markdown chunks that you can load into any index, including LlamaIndex. Replace the LlamaParse call with client.parse and read response.output.chunks instead of result.markdown.pages.
How do LlamaParse tiers map to Extend?
Extend uses engines instead of tiers. parse_performance is the default and the best choice when accuracy matters most, parse_light is faster and cheaper for high-volume cleaner documents, and parse_auto routes each page to the right engine by difficulty.
