What Are Pipelines?
A pipeline is a named, reusable configuration that describes a sequence of chunking and refinement steps. Instead of passing the same configuration on every request, you define it once and reference it by ID. A pipeline step is either:chunk— runs a chunker (e.g."semantic","token","recursive")refine— runs a refinery (e.g."embeddings","overlap")
Create a Pipeline
POST /v1/pipelines
Request Parameters
Request Parameters
Unique pipeline name. Used as a human-readable identifier.
Optional description of what this pipeline does.
Ordered list of steps to execute. Each step has:
type:"chunk"or"refine"chunker: chunker name (forchunksteps, e.g."semantic","token")refinery: refinery name (forrefinesteps, e.g."embeddings","overlap")config: step-specific parameters (same fields as the individual endpoints)
List Pipelines
GET /v1/pipelines
Get a Pipeline
GET /v1/pipelines/{pipeline_id}
Update a Pipeline
PUT /v1/pipelines/{pipeline_id}
You can update name, description, or steps independently:
Delete a Pipeline
DELETE /v1/pipelines/{pipeline_id}
204 No Content on success.
Pipeline Examples
Basic Token Chunking
Markdown Documents with Overlap
Full RAG Pipeline
Storage
Pipelines are stored in a local SQLite database (data/chonkie.db). The database is created automatically on first startup. When using Docker, mount ./data:/app/data to persist the database across container restarts.
Execute a Pipeline
POST /v1/pipelines/{pipeline_id}/execute
Runs the pipeline steps sequentially on the provided text. Each chunk step produces chunks; each refine step enriches them. Returns the final list of chunks.
Batch Execution
Submit a list of strings to process multiple documents in one request. The response is a list of lists — one inner list per input document.Request Parameters
Request Parameters
Text or list of texts to process through the pipeline.
Error Responses
| Status | Cause |
|---|---|
404 | Pipeline ID not found |
400 | Pipeline has no steps, a refine step appears before any chunk step, or a step is missing required fields |
500 | A step failed at runtime (e.g. missing extra, model error) |
