Skip to Content
Getting Started

Start Building with PageIndex

PageIndex offers both a local and a cloud version:

  • Local — for text-based PDFs. Documents are indexed and stored on your own machine, free to use, with no PageIndex API key.
  • Cloud — for scanned and image-heavy documents. PageIndex handles OCR and image understanding, plus managed storage and more ways to integrate, such as MCP.

See the comparison and the full Client Configuration.

Your Documents ┌──────────────┴────────────────┐ ▼ ▼ ┌─────────────────────┐ ┌─────────────────────────┐ │ Local Indexing │ │ PageIndex Cloud │ │ (your machine) │ │ OCR, images, storage │ └──────────┬──────────┘ └────────────┬────────────┘ └──────────────┬────────────────┘ │ tree index ┌───────────────────────────────┐ │ Your LLM reasons │ │ chat() · agent tools · MCP │ └───────────────────────────────┘

Bring your own LLM. Retrieval quality depends on the model that searches the tree, so PageIndex keeps that model yours — OpenAI, Anthropic, OpenRouter, or any OpenAI-compatible endpoint.


Quick Start

Install the SDK

pip install -U pageindex

Set up the client

Generate a PageIndex API key , and PageIndex handles parsing, OCR, image understanding, and storage. The chat side stays yours.

import os from pageindex import PageIndexClient os.environ["PAGEINDEX_API_KEY"] = "your-pageindex-key" os.environ["OPENAI_API_KEY"] = "your-openai-key" client = PageIndexClient( index="cloud", # index and store in PageIndex Cloud chat="gpt-5.6-sol", # your own model still answers )

The examples above use OpenAI. Any provider works — see Use different LLMs.

Submit a document

# wait=True blocks until the document is ready doc_id = client.submit_document("./2023-annual-report.pdf", wait=True)["doc_id"]

For batch submission, metadata, and file organization, see the Document Processing reference.

Ask a question

answer = client.chat("What are the key findings in this document?", doc_id=doc_id) print(answer)

For streaming, multi-document search and citations, see the LLM Integration reference.


Integrations

chat() runs PageIndex’s own document-QA agent against your model. You can also take PageIndex’s retrieval tools into your own agent, or reach them over MCP.

Cost and Pricing

  • Index (Local) — free and open source . Runs on your machine, so the only cost is your own LLM provider’s.
  • Index (Cloud) — parsing, OCR, image understanding, and storage handled by PageIndex, billed against your plan. Free to get started , then see our subscription plans.
  • Chat — runs against your own model in either index mode, so this cost is your LLM provider’s too.

See the cost breakdown  for indexing cost by document length, and chat accuracy against cost per question.

Community & Support

Last updated on