Skip to content
Guide
Parse
Guides

REST API Guide

Parse REST API endpoints, request/response shapes, expand values, and presigned URL patterns.

For the complete SDK and API documentation, see the Parse API Reference →

This page covers REST API usage patterns: endpoint overview, request examples, response shapes, and the expand parameter quick-reference.

MethodURLUse case
POST /api/v2/parseParse a file by ID or URL (JSON body)
POST /api/v2/parse/uploadUpload a file and parse it in one request (multipart/form-data)
GET /api/v2/parseList and filter parse jobs with pagination
GET /api/v2/parse/{job_id}Check job status and retrieve results

Required header: Authorization: Bearer YOUR_API_KEY on all endpoints.

Optional header (Enterprise): Usage-Tags attributes a request’s usage to a team, environment, or customer for billing breakdowns. See Usage Tags.

Send a JSON body with file_id (or source_url), tier, version, and any options:

Terminal window
curl -X POST 'https://api.cloud.llamaindex.ai/api/v2/parse' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \
--data '{
"file_id": "<file_id>",
"tier": "agentic",
"version": "latest"
}'

The create response returns the job fields at the top levelid, project_id, status, and tier (there is no job wrapper here). Use the top-level id to retrieve results with the expand query parameter (see Retrieving results below). See Configuring Parse for every available option.

Options like page_ranges, crop_box, and output_options nest inside the same JSON body — they are not top-level fields. A bare "max_pages": 2 alongside file_id/tier/version returns 422 extra_forbidden; nest it under page_ranges instead:

Terminal window
curl -X POST 'https://api.cloud.llamaindex.ai/api/v2/parse' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \
--data '{
"file_id": "<file_id>",
"tier": "agentic",
"version": "latest",
"page_ranges": {"max_pages": 2}
}'

See Configuring Parse for every available option.

If you don’t already have a file_id, POST /api/v2/parse/upload uploads a file and starts a parse job in a single multipart/form-data request. Send the file as a file field and the parse configuration as a configuration JSON string field:

Terminal window
curl -X POST 'https://api.cloud.llamaindex.ai/api/v2/parse/upload' \
-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \
-F 'file=@/path/to/your/file.pdf' \
-F 'configuration={"tier": "agentic", "version": "latest"}'

Like the JSON create endpoint above, the response returns id and status at the top level. See Configuring Parse for every field you can set inside configuration.


Terminal window
curl 'https://api.cloud.llamaindex.ai/api/v2/parse?page_size=10&status=COMPLETED' \
-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"

Query parameters:

ParameterTypeDescription
page_sizeintegerMax items per page (optional)
page_tokenstringToken for the next page (from a previous response)
statusstringFilter: PENDING, RUNNING, COMPLETED, FAILED, CANCELLED

Response:

{
"items": [
{
"id": "job-uuid-1",
"project_id": "project-uuid",
"status": "COMPLETED",
"error_message": null
}
],
"next_page_token": "eyJsYXN0X2lkIjogImpvYi...",
"total_size": 42
}

Terminal window
curl 'https://api.cloud.llamaindex.ai/api/v2/parse/{job_id}?expand=markdown,items,metadata' \
-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"

The response always includes a job object with id, project_id, status, and error_message. Additional fields depend on the expand parameter.

ValueWhat it returns
textPlain text per page
markdownMarkdown per page
itemsStructured JSON items (tables, headings, paragraphs per page)
metadataPage-level metadata (confidence, speaker notes, cost_optimized, etc.)
job_metadataUsage and processing details
text_fullFull plain text as a single string (all pages concatenated)
markdown_fullFull markdown as a single string (all pages concatenated)
text_content_metadataText file presigned download URL
markdown_content_metadataMarkdown file presigned download URL
items_content_metadataItems file presigned download URL
metadata_content_metadataMetadata file presigned download URL
text_full_content_metadataFull text file presigned download URL
markdown_full_content_metadataFull markdown file presigned download URL
xlsx_content_metadataXLSX file presigned download URL
output_pdf_content_metadataOutput PDF presigned download URL
images_content_metadataImages metadata with per-image presigned URLs

Combine multiple values: ?expand=markdown,items,images_content_metadata

For detailed guidance on choosing expand values, see Retrieving Results.

When requesting *_content_metadata expand values, the response includes presigned URLs for direct download:

XLSX and PDF:

{
"result_content_metadata": {
"xlsx": {
"size_bytes": 15234,
"exists": true,
"presigned_url": "https://s3.amazonaws.com/..."
},
"outputPDF": {
"size_bytes": 102400,
"exists": true,
"presigned_url": "https://s3.amazonaws.com/..."
}
}
}

Images:

{
"images_content_metadata": {
"total_count": 3,
"images": [
{
"index": 0,
"filename": "image_0.png",
"content_type": "image/png",
"size_bytes": 12345,
"presigned_url": "https://s3.amazonaws.com/..."
}
]
}
}

You can filter images with the image_filenames query parameter:

Terminal window
curl 'https://api.cloud.llamaindex.ai/api/v2/parse/{job_id}?expand=images_content_metadata&image_filenames=image_0.png,image_1.jpg' \
-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"

Presigned URLs are temporary. Download files promptly after retrieving them, or call the endpoint again for fresh URLs.


v2 returns structured validation errors:

{
"detail": [
{
"type": "value_error",
"loc": ["tier"],
"msg": "Unsupported tier: invalid_tier. Must be one of: fast, cost_effective, agentic, agentic_plus",
"input": {}
}
]
}

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/