Skip to content

CBIndex Documentation

CBIndex is a FastAPI wrapper around PageIndex, a vectorless RAG system that transforms documents into hierarchical tree structures for LLM-based reasoning retrieval.

Getting Started

# Install
pip install -e ".[dev]"

# Set API key
export NOMINATE_API_KEY=your_key

# Run server
uvicorn app.main:app --reload

# Run example
pip install -e ".[examples]"
python examples/full-lifecycle.py

API Endpoints

Endpoint Method Description
/health GET Health check
/index/pdf POST Index PDF document
/index/markdown POST Index Markdown document
/workspaces POST Create workspace
/workspaces GET List workspaces
/workspaces/{id} GET Get workspace details
/workspaces/{id} DELETE Delete workspace
/workspaces/{id}/files POST Upload file
/workspaces/{id}/files GET List files
/ocr POST OCR image to text
/ocr/index POST OCR and index image
/intel/youtube POST Submit YouTube transcript job
/intel/jobs/{id} GET Get job status

Architecture

app/
├── main.py          # FastAPI routes
├── models.py        # Pydantic schemas
├── services.py      # PageIndex wrapper
├── ai/              # AI provider abstraction
├── auth/            # API key authentication
├── config/          # Settings management
├── intel/           # YouTube transcript extraction
├── ocr/             # Image OCR
└── workspace/       # File storage management

Configuration

Environment variables (.env):

NOMINATE_API_KEY=...      # AI provider API key
CBINDEX_API_KEY=...       # Optional: client auth
WORKSPACE_BASE_PATH=workspaces