---
title: "Create a new RAG collection"
method: POST
path: "/api/rag/{project_id}/collections"
tags: ["RAG"]
---

# Create a new RAG collection

`POST /api/rag/{project_id}/collections`

## Request

- Base URL: `https://core.blink.new`
- URL: `https://core.blink.new/api/rag/{project_id}/collections`
- Auth: HTTP bearer

Creates a vector collection for storing document embeddings

## Path parameters

- `project_id` string, required

## Request body

- object
  - `name` string, required: Collection name (alphanumeric, underscores, hyphens)
  - `description` string
  - `embedding_model` string
  - `embedding_dimensions` integer
  - `index_metric` 'cosine' | 'l2'
  - `chunk_max_tokens` integer
  - `chunk_overlap_tokens` integer
  - `shared` boolean

## Response `201`

Collection created

## Other responses

- `401`: Authentication required or invalid API key
- `409`: Collection with this name already exists

---

[API](https://skmtc.dev/blink/apis/blink-apis.md) - [All operations](https://skmtc.dev/blink/apis/blink-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/blink/apis/blink-apis/revisions/4c59c706078e?raw)
