> ## Documentation Index
> Fetch the complete documentation index at: https://cet.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Pipelines API

> Create, read, update, delete, and execute CET pipelines.

# Pipelines API

Base path: `/api/v1/pipelines` · Requires `Authorization: Bearer <jwt>`

## GET /api/v1/pipelines

Returns all pipelines for the authenticated user.

## POST /api/v1/pipelines

```json theme={null}
{ "name": "My RAG Pipeline", "description": "...", "canvas_data": { "nodes": [], "edges": [] } }
```

**Response 201:** `{ "id": "uuid", "name": "My RAG Pipeline", "created_at": "..." }`

## GET /api/v1/pipelines/:id

Returns a single pipeline including full canvas state.

## PUT /api/v1/pipelines/:id

```json theme={null}
{ "name": "Updated Name", "canvas_data": { "nodes": [], "edges": [] } }
```

**Response 200:** `{ "success": true, "updated_at": "..." }`

## DELETE /api/v1/pipelines/:id

**Response 200:** `{ "success": true, "message": "Pipeline deleted" }`

## POST /api/v1/pipelines/:id/run

Rate limit: 20 req/min · Returns SSE stream

```json theme={null}
{ "user_message": "What is the refund policy?", "session_id": "optional-uuid" }
```

```json theme={null}
{
  "run_id": "uuid",
  "llm_response": "Based on our policy...",
  "model_used": "anthropic/claude-sonnet-4-6",
  "token_usage": { "prompt_tokens": 512, "completion_tokens": 128, "total_tokens": 640 },
  "cost_usd": 0.00354,
  "latency_ms": 1240
}
```

**SSE events:** `status: retrieving` → `status: budgeting` → `status: calling_llm` → `token: <chunk>` → `done: <analytics>`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.