Skip to main content

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
Response (201 Created):
name
string
required
Unique pipeline name. Used as a human-readable identifier.
description
string
Optional description of what this pipeline does.
steps
PipelineStep[]
required
Ordered list of steps to execute. Each step has:
  • type: "chunk" or "refine"
  • chunker: chunker name (for chunk steps, e.g. "semantic", "token")
  • refinery: refinery name (for refine steps, e.g. "embeddings", "overlap")
  • config: step-specific parameters (same fields as the individual endpoints)

List Pipelines

GET /v1/pipelines
Returns all pipelines ordered by creation date (newest first).

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}
Returns 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.
Response:

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.
text
string | string[]
required
Text or list of texts to process through the pipeline.

Error Responses