OpenAPI 3.1.0raw.githubusercontent.com2026-08-191,3412,1385.0 MB

ec31f78cf002

AI Collections

Create a collection

Creates a new collection scoped to your organization. Optionally attach sources and retrieval settings at creation time. If slug is omitted, one is derived from name and must be unique within your organization.

post/ai/collections

Request body

descriptionstring

Optional description.

namestring required

Human-readable collection name.

slugstring

Optional slug (unique per organization). Derived from name when omitted.

Example request

{
  "description": "All customer support voice transcripts.",
  "name": "Support Transcripts",
  "settings": {
    "record_type": "ai_collection_settings",
    "retrieval": {
      "retrieval_type": "vector",
      "top_k": 5
    }
  },
  "slug": "support-transcripts",
  "sources": [
    {
      "bucket_id": "policy-docs",
      "source_type": "voice"
    }
  ]
}

Response

Collection created.

Example response

{
  "data": {
    "created_at": "2026-08-04T12:00:00Z",
    "description": "All customer support voice transcripts.",
    "name": "Support Transcripts",
    "record_type": "ai_collection",
    "settings": {
      "record_type": "ai_collection_settings",
      "retrieval": {
        "retrieval_type": "vector",
        "top_k": 5
      }
    },
    "slug": "support-transcripts",
    "sources": [
      {
        "bucket_id": "policy-docs",
        "collection_id": "6a09ccbd-8f9b-4c3a-9b0e-2f1d3c4b5a6e",
        "id": "source_8vkvtcksnawvbnxq48yv2l06wx",
        "record_type": "ai_collection_source",
        "source_type": "voice",
        "status": "ready"
      }
    ],
    "status": "ready",
    "updated_at": "2026-08-04T12:00:00Z",
    "uuid": "6a09ccbd-8f9b-4c3a-9b0e-2f1d3c4b5a6e"
  }
}