bigRAG
API Reference

Collections

API endpoints for managing collections.

Base path: /v1/collections

List Collections

GET /v1/collections

Query parameters:

ParameterTypeDefaultDescription
namestringFilter by name prefix (case-insensitive)
limitinteger100Results per page (1–1,000)
offsetinteger0Pagination offset

Response 200:

{
  "collections": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "research_papers",
      "description": "Academic research papers",
      "embedding_provider": "openai",
      "embedding_model": "text-embedding-3-small",
      "dimension": 1536,
      "chunk_size": 512,
      "chunk_overlap": 50,
      "document_count": 15,
      "has_api_key": false,
      "reranking_enabled": false,
      "reranking_model": "rerank-v3.5",
      "has_reranking_api_key": false,
      "default_top_k": 10,
      "default_min_score": null,
      "default_search_mode": "semantic",
      "metadata": {},
      "created_at": "2026-04-01T00:00:00Z",
      "updated_at": "2026-04-01T12:00:00Z"
    }
  ],
  "total": 1
}

Create Collection

POST /v1/collections

Request body:

{
  "name": "research_papers",
  "description": "Academic research papers",
  "embedding_provider": "openai",
  "embedding_model": "text-embedding-3-small",
  "dimension": 1536,
  "chunk_size": 512,
  "chunk_overlap": 50,
  "default_top_k": 10,
  "default_min_score": 0.3,
  "default_search_mode": "semantic",
  "metadata": { "team": "research" }
}
FieldTypeRequiredDefaultConstraints
namestringyes1-128 chars, [a-zA-Z][a-zA-Z0-9_]*
descriptionstringno""
embedding_providerstringnoServer defaultopenai, cohere
embedding_modelstringnoServer defaultModel name
embedding_api_keystringnoRequired for openai, cohere
dimensionintegernoServer defaultEmbedding vector dimension
chunk_sizeintegerno51264–10,000
chunk_overlapintegerno500–5,000, must be < chunk_size
default_top_kintegerno101–1,000
default_min_scorefloatnonullMinimum similarity score
default_search_modestringno"semantic"semantic, keyword, hybrid
reranking_enabledbooleannofalseEnable reranking
reranking_modelstringno"rerank-v3.5"Cohere reranking model
reranking_api_keystringnoCohere API key
metadataobjectno{}Arbitrary key-value pairs

Response 201: Full collection object.

Errors:

  • 400 — Invalid name format, invalid chunk config
  • 409 — Collection name already exists

Get Collection

GET /v1/collections/{name}

Response 200: Full collection object.

Errors: 404 — Collection not found

Get Collection Stats

GET /v1/collections/{name}/stats

Lightweight endpoint returning document and chunk counts for a single collection.

Response 200:

{
  "collection": "research_papers",
  "document_count": 15,
  "total_chunks": 482,
  "total_tokens": 125000,
  "total_size_bytes": 52428800,
  "status_counts": {
    "ready": 12,
    "pending": 2,
    "processing": 1,
    "failed": 0
  }
}

Errors: 404 — Collection not found

Update Collection

PUT /v1/collections/{name}

Request body:

{
  "description": "Updated description",
  "metadata": { "team": "engineering" },
  "reranking_enabled": true,
  "default_top_k": 20,
  "default_search_mode": "hybrid",
}
FieldTypeRequiredNotes
descriptionstringnoPass null to keep current
metadataobjectnoPass null to keep current
reranking_enabledbooleannoEnable/disable reranking
reranking_modelstringnoCohere reranking model
reranking_api_keystringnoCohere API key
default_top_kintegernoDefault results count (1–1,000)
default_min_scorefloatnoDefault minimum similarity score
default_search_modestringnosemantic, keyword, hybrid

Response 200: Updated collection object.

Errors: 404 — Collection not found

Delete Collection

DELETE /v1/collections/{name}

Deletes the collection and all its documents and vectors.

Response 200:

{
  "status": "ok",
  "message": "Collection 'research_papers' deleted"
}

Errors: 404 — Collection not found

On this page