The document retrieval layer for AI

Vectorless RAG for long, complex documents — accurate, traceable, context-aware, and cost efficient.

How PageIndex works
Sourcereport.pdf — a 120-page annual report
report.pdf120 pagesBusiness Overviewp. 1-24Financial Resultsp. 25-78Risk Factorsp. 79-120Revenue and Cost of Salesp. 26-40Operating Margin Analysisp. 41-52
A 120-page PDF arrives — headings, sections, page numbers, and nothing a machine can navigate.
Operating margin was 18.4% in 2023. <cite doc="report.pdf" page="43"/>

Get started in seconds

0

Install the SDK

$pip install -U pageindex
1

Get a PageIndex API key

Create one in the Developer Dashboard.

$export PAGEINDEX_API_KEY="key"
2

Prepare your LLM model

Any model works — OpenAI here as an example.

$export OPENAI_API_KEY="key"
3

Index a document and query it

Generate a tree index, then let your LLM or agent search it for answers.

View Documentation
from pageindex import PageIndexClient client = PageIndexClient(    index="cloud",       # index and store in PageIndex Cloud    chat="gpt-5.6-sol",  # your own LLM answers) doc_id = client.submit_document("report.pdf", wait=True)["doc_id"] messages = "What benchmarks are used?" for chunk in client.chat(messages, doc_id=doc_id, stream=True):    print(chunk, end="", flush=True) 

Retrieval accuracy scales with the model

With PageIndex, you can switch to a better model or raise the thinking effort for better accuracy instantly — no re-indexing, no re-embedding.

Retrieval accuracyThinking effort none
85%90%95%100%gpt-5.6-luna85.5%gpt-5.6-terra90.3%gpt-5.6-sol96.8%$0.003$0.03$0.10

Average cost per question · log scale

Text lookup questions from MMLongBench-Doc-V2

See the benchmark

Compare ways to query a document.

PageIndex gives LLMs a persistent structure to retrieve only the information they need.

Document arrives

PageIndex

Navigate the document structure and search by node relevance.

Annual report / 420 pages
Build a persistent document tree
  • Company
  • Business
  • Financials
  • Revenue
  • Asia · p.92
  • Margin
  • Cash Flow
  • Risks
  • Notes
LLM navigates

Relevant pages, with their context

Vector DB

Break the document into chunks and search by vector similarity.

Annual report / 420 pages
Chunk
Embed
Query embedding → similarity search

Top-K chunks

Higher accuracyRetrieval accuracy comparison on FinanceBench

See benchmark

PageIndex

98.7%

Uses reasoning-based tree search to determine relevance.

Vector DB

50.0%

Approximate search via semantic similarity.

Run it anywhere

The same SDK runs on your laptop, on our cloud, or inside your own private cloud.

PageIndex Local

Open source, on your machine, with your own model key.

  • Documents never leave your disk
  • Cost-efficient indexing with PageIndex Flash
  • Text-based PDFs, read directly — no OCR
  • Open source, 35k+ stars on GitHub
View on GitHub

PageIndex Cloud

Managed indexing, storage, and retrieval. Nothing to run.

  • Our best indexing model, fully managed
  • Scanned files and image understanding
  • Hosted storage and retrieval API
  • Free tier — 30k+ developers already building
Start on Cloud

PageIndex Enterprise

All of Cloud, deployed in your own private cloud.

  • Runs in your VPC on AWS, Azure, or GCP
  • Documents and indexes stay in your account
  • On-premises and air-gapped options
  • Audit logs, dedicated support, and SLA
Talk to our team

Start building with PageIndex

Get started