Skip to Content
Getting Started

💡 Start Building with PageIndex

☁️ PageIndex Cloud Service

PageIndex provides a cloud service. You upload documents to the PageIndex cloud, where they are processed into a tree index. Once processed, you can chat with the document in two ways:

Your Documents ┌───────────────────────────────┐ │ PageIndex Cloud │ │ Document Processing │ └───────────────┬───────────────┘ ┌────────────┴────────────┐ ▼ ▼ ┌────────────────────────┐ ┌────────────────────────┐ │ Your LLM / Agent │ │ Chat API │ │ (via MCP) │ │ (PageIndex LLM) │ └────────────────────────┘ └────────────────────────┘

What is MCP? MCP (Model Context Protocol) is an open standard that lets LLM agents call external tools. If you are building your own AI agent using a framework like LangChain or OpenAI Agents SDK etc, MCP lets your LLM call PageIndex as tools automatically, without custom integration code. See the setup guide.


Step 1 — Upload & Process a Document

To get started, generate your API key from the PageIndex Developer Dashboard.

This step is the same for both MCP and Chat API integrations.

Install the SDK

pip install -U pageindex

Initialize the client

from pageindex import PageIndexClient pi_client = PageIndexClient(api_key="YOUR_API_KEY")

Submit a document

result = pi_client.submit_document("./2023-annual-report.pdf") doc_id = result["doc_id"]

Check processing status

status = pi_client.get_document(doc_id)["status"] if status == "completed": print('Document processing completed')

Once processing is complete, the document is available to both integrations below using the same doc_id.

See Document Processing for the full document management reference.


Step 2 — Choose Your Integration

Option A: MCP — use with your own LLM (agent)

Connect PageIndex to your own LLM or agent framework via MCP. Your LLM receives PageIndex as a callable tool and uses it automatically for document retrieval.

  • Works with Claude Agent SDK, OpenAI Agents SDK, LangChain, Google ADK, and any MCP-compatible client.
  • Your LLM stays in control — PageIndex handles the retrieval.

See the MCP Setup Guide for configuration and integration examples.


Option B: Chat API — use with our hosted LLM

Use PageIndex’s own LLM to answer questions about your documents directly. No LLM setup required on your side.

response = pi_client.chat_completions( messages=[{"role": "user", "content": "What are the key findings in this document?"}], doc_id=doc_id ) print(response["choices"][0]["message"]["content"])

See Chat API reference for streaming support and more usage details.

📈 Plans & Pricing

PageIndex is free to get started. As your needs grow, explore our subscription plans for more credits and higher limits, or Enterprise for custom deployment, security, and dedicated support.

💬 Community & Support

Last updated on