Skip to main content
A collection is a named set of points (vectors with a payload) that you can search. Creating a collection is the first step before inserting data into Qdrant.

API Endpoint

PUT /collections/{collection_name}

Create Collection with Dense Vectors

1

Define collection parameters

Create a collection with a single dense vector configuration. This is the most common use case.
2

Send the request

Use the REST API or Python client to create the collection.
curl -X PUT http://localhost:6333/collections/my_collection \
  -H 'Content-Type: application/json' \
  -d '{
    "vectors": {
      "size": 384,
      "distance": "Cosine"
    }
  }'

Vector Configuration Parameters

vectors.size
integer
required
Size of the vector (number of dimensions).
vectors.distance
string
required
Distance metric for vector comparison. Available options:
  • Cosine - Cosine similarity
  • Euclid - Euclidean distance
  • Dot - Dot product
  • Manhattan - Manhattan distance
vectors.hnsw_config
object
HNSW index configuration for fast approximate nearest neighbor search.
vectors.quantization_config
object
Quantization configuration to reduce memory usage.
vectors.on_disk
boolean
default:"false"
Store vectors on disk instead of RAM to save memory.

Create Collection with Named Vectors

Use named vectors when you need multiple vector representations per point (e.g., text and image embeddings).
curl -X PUT http://localhost:6333/collections/multi_vector_collection \
  -H 'Content-Type: application/json' \
  -d '{
    "vectors": {
      "text": {
        "size": 768,
        "distance": "Cosine"
      },
      "image": {
        "size": 512,
        "distance": "Euclid"
      }
    }
  }'

Create Collection with Sparse Vectors

Sparse vectors are useful for keyword-based search and can be combined with dense vectors for hybrid search.
curl -X PUT http://localhost:6333/collections/sparse_collection \
  -H 'Content-Type: application/json' \
  -d '{
    "vectors": {
      "dense": {
        "size": 384,
        "distance": "Cosine"
      }
    },
    "sparse_vectors": {
      "text": {}
    }
  }'

Additional Configuration Options

Optimizers Config

Control how Qdrant optimizes storage and indexing.
curl -X PUT http://localhost:6333/collections/optimized_collection \
  -H 'Content-Type: application/json' \
  -d '{
    "vectors": {
      "size": 384,
      "distance": "Cosine"
    },
    "optimizers_config": {
      "indexing_threshold": 20000,
      "memmap_threshold": 50000
    }
  }'

Replication Factor

For distributed deployments, specify how many replicas to create.
curl -X PUT http://localhost:6333/collections/replicated_collection \
  -H 'Content-Type: application/json' \
  -d '{
    "vectors": {
      "size": 384,
      "distance": "Cosine"
    },
    "replication_factor": 2,
    "write_consistency_factor": 1
  }'
Replication factor must be less than or equal to the number of nodes in your cluster.

Response Format

Successful collection creation returns:
result
boolean
Indicates whether the operation was successful.
status
string
Operation status, typically “ok” on success.
time
number
Time taken to execute the operation in seconds.
Response Example
{
  "result": true,
  "status": "ok",
  "time": 0.031095
}

Query Parameters

timeout
integer
Wait timeout in seconds for the operation to complete. If timeout is reached, the service will return an error.
Collection names must be unique. Creating a collection with an existing name will return an error.

Check if Collection Exists

Before creating a collection, you can check if it already exists:
GET /collections/{collection_name}/exists
curl http://localhost:6333/collections/my_collection/exists