Skip to main content

Quick Start

The API is available at http://localhost:8000. Visit /docs for the interactive Swagger UI.

docker-compose.yml

The repository ships with a ready-to-use docker-compose.yml:
The ./data volume mount persists the SQLite database (chonkie.db) across container restarts.

Environment Variables

Pass them inline:
Or create a .env file in the project root:

Build and Run Without Compose

Image Details

The Dockerfile uses a multi-stage build to keep the final image lean:
  • Builder stage — installs chonkie[api,semantic,code,openai] into a virtual environment
  • Runtime stage — copies only the venv; runs as a non-root chonkie user
  • Exposed port — 8000
  • Health check — HTTP GET to /health every 30 seconds

Production Tips

Restrict CORS — in production, replace * with your actual domains:
Add a reverse proxy — put Nginx or Caddy in front for TLS termination and rate limiting:
Scale horizontally — run multiple replicas behind a load balancer:
The SemanticChunker loads its embedding model on first use. Send a warm-up request after startup to avoid cold-start latency on the first real request in production.