Skip to content
⌘K

Screenshots Options

Screenshots options allow you to configure whether page screenshots are generated during document parsing.

When enabled, this feature takes a screenshot of each page in the document, providing a visual representation of the original page layout alongside the extracted text content.

In v2, screenshot generation is controlled via the images_to_save array. Include "screenshot" in the array to enable screenshot generation.

Enable screenshot generation for each page of the document:

{
"output_options": {
"images_to_save": ["screenshot"]
}
}

You can combine screenshots with other image types:

{
"output_options": {
"images_to_save": ["screenshot", "embedded", "layout"]
}
}

To disable screenshots, simply omit "screenshot" from the array, or use an empty array to disable all image saving:

{
"output_options": {
"images_to_save": []
}
}

Note: If images_to_save is not specified, no images (including screenshots) are saved by default.

Parse the Document with Screenshot Generation Enabled

Section titled “Parse the Document with Screenshot Generation Enabled”
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": "cost_effective",
"version": "latest",
"output_options": {
"images_to_save": ["screenshot"]
}
}'

After parsing completes, retrieve screenshot metadata using the images_content_metadata expand parameter. This returns presigned URLs for direct download:

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

The response includes metadata with presigned URLs:

{
"job": { ... },
"images_content_metadata": {
"total_count": 5,
"images": [
{
"filename": "screenshot_page_0.png",
"content_type": "image/png",
"size_bytes": 45678,
"presigned_url": "https://s3.amazonaws.com/..."
},
{
"filename": "screenshot_page_1.png",
"content_type": "image/png",
"size_bytes": 52341,
"presigned_url": "https://s3.amazonaws.com/..."
}
]
}
}

Use the presigned_url for each image to download the screenshots directly. URLs are temporary and valid for a limited time.