v3

latestOpenAPI 3.0.3raw.githubusercontent.com2026-04-276139.8 KB
Collections

Create collection

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.

put/collections/{collection_name}

Path parameters

collection_namestring required
Example:my_collection

The name of the new collection.

Query parameters

timeoutinteger
Example:30

The maximum time to wait for the operation to complete, in seconds.

Request body

Example request

{
  "vectors": {
    "size": 128,
    "distance": "Cosine"
  },
  "hnsw_config": {
    "m": 16,
    "ef_construct": 200,
    "ef_search": 50
  }
}

Response

Collection created successfully

timenumber double

Time spent to process this request, in seconds.

statusstring

Operation status.

resultboolean

Whether the operation completed successfully.

Example response

{
  "time": 0.06091602,
  "status": "ok",
  "result": true
}