Skip to content

Using the Verify API

Upload a document, create a Verify job, retrieve its authenticity assessment, and inspect supporting evidence through the Preview REST API.

Preview

The Verify API runs an asynchronous authenticity review for a document or image. API access is limited during the Preview and the API may change.

To call the Verify API, you need:

  • A LlamaCloud API key with access to Verify
  • The ID of the LlamaCloud project that will own the job
  • A PDF, DOCX, PNG, JPEG, or WebP file to review

Set the API key and project ID as environment variables:

Terminal window
export LLAMA_CLOUD_API_KEY="llx-..."
export PROJECT_ID="YOUR_PROJECT_ID"

Upload the document with the Files API:

Terminal window
curl --request POST \
"https://api.cloud.llamaindex.ai/api/v1/beta/files?project_id=${PROJECT_ID}" \
--header "Authorization: Bearer ${LLAMA_CLOUD_API_KEY}" \
--form "file=@document.pdf" \
--form "purpose=user_data"

Save the id from the response as FILE_ID.

Create a Verify job for the uploaded file:

Terminal window
curl --request POST \
"https://api.cloud.llamaindex.ai/api/alpha/verify?project_id=${PROJECT_ID}" \
--header "Authorization: Bearer ${LLAMA_CLOUD_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"file_input": "FILE_ID",
"configuration": {
"tier": "agentic"
}
}'

The response includes the Verify job id and its initial status. Save the id as JOB_ID.

The configuration object accepts:

FieldDescription
tierfast for a quick initial screen or agentic for a more comprehensive review. The default is agentic.
target_pagesOptional comma-separated, 1-based PDF page numbers or ranges, such as 1,3,5-7. Omit it to review every page. This field is ignored for other file types.

Verify jobs move through PENDING and RUNNING before reaching COMPLETED, FAILED, or CANCELLED. Request the result while checking the job status:

Terminal window
curl --request GET \
"https://api.cloud.llamaindex.ai/api/alpha/verify/JOB_ID?project_id=${PROJECT_ID}&expand=result" \
--header "Authorization: Bearer ${LLAMA_CLOUD_API_KEY}"

When the status is COMPLETED, the result object includes:

FieldDescription
verdictThe overall authenticity assessment.
overall_scoreThe document’s doctoring likelihood from 0 to 1.
confidenceHow strongly the available evidence supports the verdict, from 0 to 1.
tampering_scoreLikelihood that a real document was edited locally, from 0 to 1.
synthetic_scoreLikelihood that the document was fabricated as a whole, from 0 to 1.
reasoningA plain-language explanation of the verdict.
composite_scoresScores for the different authenticity questions that applied to the document.
suspect_regionsRanked document areas that contributed to the assessment, when findings can be localized.

See Interpreting Verify findings for guidance on using these fields in a review workflow.

After a job completes, retrieve the detailed findings behind the result:

Terminal window
curl --request GET \
"https://api.cloud.llamaindex.ai/api/alpha/verify/JOB_ID/details?project_id=${PROJECT_ID}" \
--header "Authorization: Bearer ${LLAMA_CLOUD_API_KEY}"

The details include supporting evidence, grouped scores, localized regions, visual overlays, and checks that could not run. A check listed as unavailable did not produce a clean result; it did not run successfully for that file.

ActionMethod and path
Create a jobPOST /api/alpha/verify
Retrieve a jobGET /api/alpha/verify/{job_id}
Retrieve supporting evidenceGET /api/alpha/verify/{job_id}/details
List jobsGET /api/alpha/verify
Cancel a running jobPOST /api/alpha/verify/{job_id}/cancel

All requests require the project_id query parameter. List requests can be filtered by status, job ID, or creation time and use page_size and page_token for pagination.

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/