Skip to content

Retrieving Exported PDF

A PDF version of each document is generated during parsing.

You can request a presigned url to retrieve the generated PDF after parsing completes.

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

After parsing completes, retrieve the exported PDF using the output_pdf_content_metadata expand parameter. This returns a presigned URL for direct download:

Terminal window
curl -X 'GET' \
'https://api.cloud.llamaindex.ai/api/v2/parse/{job_id}?expand=output_pdf_content_metadata' \
-H 'Accept: application/json' \
-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"

The response includes metadata with a presigned URL:

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

Use the presigned_url to download the PDF file directly. The URL is temporary and valid for a limited time.