---
title: "Create collection"
method: PUT
path: "/collections/{collection_name}"
tags: ["Collections"]
---

# Create collection

`PUT /collections/{collection_name}`

Create a new collection with a specified vector configuration. You must provide the vector dimension and distance metric. Supported distance metrics are `Cosine`, `Euclid`, `Dot`, and `Manhattan`.

## Path parameters

- `collection_name` string, required

## Query parameters

- `timeout` integer

## Request body

- object
  - `vectors` object, required
    - `size` integer, required — The number of dimensions for vectors in this collection.
    - `distance` 'Cosine' | 'Euclid' | 'Dot' | 'Manhattan', required
  - `hnsw_config` object
    - `m` integer — The number of bidirectional links per element in the HNSW graph.
    - `ef_construct` integer — The size of the dynamic candidate list during index construction. Higher values improve index quality at the cost of slower builds.
    - `ef_search` integer — The size of the dynamic candidate list during search. Higher values improve recall at the cost of latency.

## Response `200`

Collection created successfully

- object
  - `usage` object
    - `hardware` object, nullable — Hardware resource counters for the operation, including CPU, payload I/O, payload index I/O, and vector I/O metrics.
  - `time` number, double — Time spent to process this request, in seconds.
  - `status` string — Operation status.
  - `result` boolean — Whether the operation completed successfully.

---

[API](https://skmtc.net/actiancorp/apis/actian-vectorai-db-collections-api.md) · [All operations](https://skmtc.net/actiancorp/apis/actian-vectorai-db-collections-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/actiancorp/actian-vectorai-db-collections-api/revisions/af01467a9a12/schema)
