Skip to content

Vision infrastructure to turn complex documents into RAG/LLM-ready data

License

Notifications You must be signed in to change notification settings

lumina-ai-inc/chunkr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Chunkr | Open Source Document Intelligence API

Production-ready API service for document layout analysis, OCR, and semantic chunking.
Convert PDFs, PPTs, Word docs & images into RAG/LLM-ready chunks.

Layout Analysis | OCR + Bounding Boxes | Structured HTML and markdown | VLM Processing controls

Try it out! · Report Bug · Contact · Discord

Table of Contents

(Super) Quick Start

  1. Go to chunkr.ai
  2. Make an account and copy your API key
  3. Install our Python SDK:
    pip install chunkr-ai
  4. Use the SDK to process your documents:
    from chunkr_ai import Chunkr
    
    # Initialize with your API key from chunkr.ai
    chunkr = Chunkr(api_key="your_api_key")
    
    # Upload a document (URL or local file path)
    url = "https://chunkr-web.s3.us-east-1.amazonaws.com/landing_page/input/science.pdf"
    task = chunkr.upload(url)
    
    # Export results in various formats
    task.html(output_file="output.html")
    task.markdown(output_file="output.md")
    task.content(output_file="output.txt")
    task.json(output_file="output.json")
    
    # Clean up
    chunkr.close()

Documentation

Visit our docs for more information and examples.

LLM Configuration

You can use any OpenAI API compatible endpoint by setting the following variables in your .env file:

LLM__KEY:
LLM__MODEL:
LLM__URL:

OpenAI Configuration

LLM__KEY=your_openai_api_key
LLM__MODEL=gpt-4o
LLM__URL=https://api.openai.com/v1/chat/completions

Google AI Studio Configuration

For getting a Google AI Studio API key, see here.

LLM__KEY=your_google_ai_studio_api_key
LLM__MODEL=gemini-2.0-flash-lite
LLM__URL=https://generativelanguage.googleapis.com/v1beta/openai/chat/completions

OpenRouter Configuration

Check here for available models.

LLM__KEY=your_openrouter_api_key
LLM__MODEL=google/gemini-pro-1.5
LLM__URL=https://openrouter.ai/api/v1/chat/completions

Self-Hosted Configuration

You can use any OpenAI API compatible endpoint. To host your own LLM you can use VLLM or Ollama.

LLM__KEY=your_api_key
LLM__MODEL=model_name
LLM__URL=http://localhost:8000/v1

Self-Hosted Deployment Options

Quick Start with Docker Compose

  1. Prerequisites:

  2. Clone the repo:

git clone https://github.com/lumina-ai-inc/chunkr
cd chunkr
  1. Set up environment variables:
# Copy the example environment file
cp .env.example .env

# Configure your environment variables
# Required: LLM_KEY as your OpenAI API key
  1. Start the services:

With GPU:

docker compose up -d
  1. Access the services:
    • Web UI: http://localhost:5173
    • API: http://localhost:8000

Important:

  • Requires an NVIDIA CUDA GPU
  • CPU-only deployment via compose-cpu.yaml is currently in development and not recommended for use
  1. Stop the services when done:
docker compose down

Deployment with Kubernetes

For production environments, we provide a Helm chart and detailed deployment instructions:

  1. See our detailed guide at kube/README.md
  2. Includes configurations for high availability and scaling

For enterprise support and deployment assistance, contact us.

Licensing

The core of this project is dual-licensed:

  1. GNU Affero General Public License v3.0 (AGPL-3.0)
  2. Commercial License

To use Chunkr without complying with the AGPL-3.0 license terms you can contact us or visit our website.

Connect With Us