Self-hosted semantic text chunking for RAG/LLMs — REST API + Web UI, local ONNX embeddings
1.5K
Self-hosted semantic text chunking for RAG and LLM pipelines. Splits large documents into meaningful, context-preserving chunks using sentence similarity and local ONNX embeddings — no external API required. Ships a REST API and an optional Web UI.
Powered by the semantic-chunking
npm library (internally backed by embedding-utils).
chunkit (semantic), cramit (dense packing), sentenceit (sentence split)3001) + optional Web UI (port 3000)/api/* routes/api/healthAPI server (default):
docker run -d --name semantic-chunking-api \
-p 3001:3001 \
-v "$(pwd)/models:/app/models" \
jparkerweb/semantic-chunking:latest
Web UI (override the default command):
docker run -d --name semantic-chunking-webui \
-p 3000:3000 -e PORT=3000 \
-v "$(pwd)/models:/app/models" \
jparkerweb/semantic-chunking:latest node webui/server.js
Then open the Web UI at http://localhost:3000 or call the API at http://localhost:3001.
services:
api:
image: jparkerweb/semantic-chunking:latest
ports:
- "3001:3001"
volumes:
- ./models:/app/models
environment:
- PORT=3001
# - API_AUTH_TOKEN=your-secret-token-here
restart: unless-stopped
curl -X POST http://localhost:3001/api/chunkit \
-H "Content-Type: application/json" \
-d '{"documents":[{"document_name":"doc1","document_text":"Your long text here..."}]}'
| Method | Path | Description |
|---|---|---|
| GET | /api/health | Health check |
| GET | /api/version | Library/API version |
| POST | /api/chunkit | Semantic, similarity-based chunking |
| POST | /api/cramit | Dense token-packed chunking |
| POST | /api/sentenceit | Sentence-level splitting |
| Port | Service |
|---|---|
| 3001 | REST API (default) |
| 3000 | Web UI (optional) |
| Path | Purpose |
|---|---|
/app/models | Persist downloaded ONNX models between restarts |
Mount ./models:/app/models so the embedding model is downloaded once and reused.
| Variable | Default | Description |
|---|---|---|
PORT | 3001 | Port the server listens on |
NODE_ENV | production | Node environment |
API_AUTH_TOKEN | (unset) | If set, all /api/* routes require Authorization: Bearer <token> |
latest — most recent releaseContent type
Image
Digest
sha256:0f7b757b2…
Size
717.3 MB
Last updated
about 2 months ago
docker pull jparkerweb/semantic-chunking