---
title: "Create vector store"
method: POST
path: "/vector-stores"
tags: ["VectorStore"]
---

# Create vector store

`POST /vector-stores`

Create a new vector store configuration for the current workspace

## Request body

- InternalHandlerCreateStoreRequest
  - `connection_config` GithubComTencentWeKnoraInternalTypesConnectionConfig, required
    - `addr` string — Common
    - `api_key` string — AES-GCM encrypted
    - `database` string — Database name used by engines that support database-level namespaces (currently Milvus, Tencent VectorDB, and Doris).
    - `grpc_address` string — Weaviate
    - `host` string — Qdrant
    - `http_port` integer — Doris: HTTP port for Stream Load API (FE default 8030). Addr is reused for the MySQL protocol "host:9030"; HTTPPort + the host of Addr together form the FE HTTP endpoint used by Stream Load.
    - `insecure_skip_verify` boolean — InsecureSkipVerify disables TLS certificate verification when talking to the backing store over HTTPS. Defaults to false (secure). Set to true ONLY for self-signed development clusters; production deployments should provide trusted certificates via the system CA pool. Cross-driver applicable but currently only the OpenSearch driver (Phase 3) reads this field. Note: this differs from the Qdrant-specific UseTLS below, which *enables* TLS on gRPC connections — InsecureSkipVerify only controls *verification* of an already-TLS connection.
    - `password` string — AES-GCM encrypted
    - `port` integer
    - `scheme` string
    - `use_default_connection` boolean — Postgres
    - `use_tls` boolean
    - `username` string
    - `version` string — Version is the detected server version (e.g., "7.10.1", "16.2", "1.12.6"). Auto-populated by TestConnection on successful connectivity check.
  - `engine_type` 'postgres' | 'elasticsearch' | 'infinity' | 'elasticfaiss' | 'qdrant' | 'milvus' | 'weaviate' | 'doris' | 'sqlite' | 'tencent_vectordb' | 'opensearch', required
  - `index_config` GithubComTencentWeKnoraInternalTypesIndexConfig
    - `buckets_num` integer — Doris: number of buckets per table (DISTRIBUTED BY HASH ... BUCKETS N)
    - `collection_name` string — Milvus
    - `collection_prefix` string — Qdrant, Weaviate
    - `desired_shard_count` integer — Weaviate: number of shards per collection
    - `hnsw_ef_construction` integer — OpenSearch: HNSW index-build candidate list size
    - `hnsw_ef_search` integer — OpenSearch: HNSW search candidate list size (faiss; lucene reads at query time)
    - `hnsw_m` integer — --- OpenSearch k-NN HNSW fields --- All omitempty so other engines' serialized IndexConfig is unchanged. Zero / empty values fall back to the driver defaults in buildInternalCfg.
    - `index_name` string — --- Existing fields ---
    - `knn_engine` string — OpenSearch: k-NN backend ("lucene" | "faiss")
    - `number_of_replicas` integer — ES, OpenSearch
    - `number_of_shards` integer — ES, OpenSearch
    - `replica_number` integer — Milvus LoadCollection / Tencent VectorDB CreateCollection replicas
    - `replication_factor` integer — Qdrant, Weaviate: number of replicas
    - `replication_num` integer — Doris: replication_num PROPERTIES
    - `shard_number` integer — --- Scalability fields ---
    - `shards_num` integer — Milvus: number of shards per collection (CreateCollection)
  - `name` string, required

## Response `201`

Created vector store

- object

## Other responses

- `400` — Invalid request or validation error
- `401` — Unauthorized
- `409` — Duplicate endpoint and index

---

[API](https://skmtc.net/tencentblueking/apis/weknora-api.md) · [All operations](https://skmtc.net/tencentblueking/apis/weknora-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tencentblueking/weknora-api/revisions/abce9036def5/schema)
