## Create Vector Store

`vector_stores.create(VectorStoreCreateParams**kwargs)  -> VectorStore`

**post** `/v5/vector-stores/create`

Create a new vector store for storing and querying document embeddings.

The vector store name must be unique within your account and follow naming conventions (3-63 characters,
alphanumeric with hyphens/underscores). Once created, the embedding configuration and dimensions
are immutable and cannot be changed. To use a different model, you must create a new vector store.

**Embedding Configuration:** Provide `embedding_config` (for base or custom model deployments),
`embedding_model` (shorthand for a base model), or `dimensions` only (raw embeddings).

- With `embedding_config` or `embedding_model`: dimensions are auto-derived, and documents can be
  upserted with text content (auto-embedded) or with pre-computed embeddings.
- With `dimensions` only: the store accepts only pre-computed embeddings. Semantic/hybrid queries
  are not supported (lexical search only).

**Indexed Fields:** Optionally specify metadata fields to index at creation time. Only indexed fields
can be used for filtering -- indexing is required, not just a performance optimization. Additional indexed
fields can be added later using the configure endpoint, but cannot be removed once added. Keep in mind
that each indexed field increases write latency and storage overhead, so only index fields you actively filter on.

### Parameters

- `name: str`

  A unique name for the vector store within the account

- `dimensions: Optional[int]`

  Dimension size of embedding vectors. Required when neither 'embedding_config' nor 'embedding_model' is set. Automatically derived when an embedding model is provided.

- `embedding_config: Optional[EmbeddingConfigParam]`

  The embedding configuration. Either 'base' type with an embedding_model, or 'models_api' type with a model_deployment_id for custom models.

  - `class EmbeddingConfigModelsAPI: …`

    - `model_deployment_id: str`

      The ID of the deployment of the created model in the Models API V3.

    - `type: Literal["models_api"]`

      The type of the embedding configuration.

      - `"models_api"`

  - `class EmbeddingConfigBase: …`

    - `embedding_model: Union[EmbeddingModelName, str]`

      The name of the base embedding model to use. Either a known base model (EmbeddingModelName) or, in ray-serve deployments with NATIVE_OPENAI_EMBEDDING_GATEWAY enabled, any model id served by the OpenAI-compatible inference proxy (e.g. 'nomic-embed-text-v1.5'). For fully custom deployments, use type 'models_api' with a model_deployment_id.

      - `Literal["sentence-transformers/all-MiniLM-L12-v2", "sentence-transformers/multi-qa-distilbert-cos-v1", "openai/text-embedding-ada-002", 8 more]`

        - `"sentence-transformers/all-MiniLM-L12-v2"`

        - `"sentence-transformers/multi-qa-distilbert-cos-v1"`

        - `"openai/text-embedding-ada-002"`

        - `"openai/text-embedding-3-small"`

        - `"openai/text-embedding-3-large"`

        - `"embed-english-v3.0"`

        - `"embed-english-light-v3.0"`

        - `"embed-multilingual-v3.0"`

        - `"gemini/text-embedding-005"`

        - `"gemini/text-multilingual-embedding-002"`

        - `"gemini/gemini-embedding-001"`

      - `str`

    - `type: Optional[Literal["base"]]`

      The type of the embedding configuration.

      - `"base"`

- `embedding_model: Optional[EmbeddingModelName]`

  The base embedding model to use. Shorthand for embedding_config with type 'base'. Provide either embedding_config or embedding_model, not both.

  - `"sentence-transformers/all-MiniLM-L12-v2"`

  - `"sentence-transformers/multi-qa-distilbert-cos-v1"`

  - `"openai/text-embedding-ada-002"`

  - `"openai/text-embedding-3-small"`

  - `"openai/text-embedding-3-large"`

  - `"embed-english-v3.0"`

  - `"embed-english-light-v3.0"`

  - `"embed-multilingual-v3.0"`

  - `"gemini/text-embedding-005"`

  - `"gemini/text-multilingual-embedding-002"`

  - `"gemini/gemini-embedding-001"`

- `indexed_metadata_fields: Optional[Dict[str, Literal["string", "number", "boolean"]]]`

  Dictionary mapping metadata field names to their types for efficient filtering. Only STRING, NUMBER, and BOOLEAN types can be indexed.

  - `"string"`

  - `"number"`

  - `"boolean"`

### Returns

- `class VectorStore: …`

  Response model for vector store operations.

  - `id: str`

    The unique identifier of the vector store

  - `created_at: datetime`

    Timestamp of creation

  - `embedding_dimensions: int`

    Dimensionality of the embedding vectors

  - `name: str`

    The name of the vector store

  - `updated_at: datetime`

    Timestamp of last update

  - `embedding_config: Optional[EmbeddingConfig]`

    Embedding configuration identifying the model and its type. None for raw-embedding-only stores.

    - `class EmbeddingConfigModelsAPI: …`

      - `model_deployment_id: str`

        The ID of the deployment of the created model in the Models API V3.

      - `type: Literal["models_api"]`

        The type of the embedding configuration.

        - `"models_api"`

    - `class EmbeddingConfigBase: …`

      - `embedding_model: Union[EmbeddingModelName, str]`

        The name of the base embedding model to use. Either a known base model (EmbeddingModelName) or, in ray-serve deployments with NATIVE_OPENAI_EMBEDDING_GATEWAY enabled, any model id served by the OpenAI-compatible inference proxy (e.g. 'nomic-embed-text-v1.5'). For fully custom deployments, use type 'models_api' with a model_deployment_id.

        - `Literal["sentence-transformers/all-MiniLM-L12-v2", "sentence-transformers/multi-qa-distilbert-cos-v1", "openai/text-embedding-ada-002", 8 more]`

          - `"sentence-transformers/all-MiniLM-L12-v2"`

          - `"sentence-transformers/multi-qa-distilbert-cos-v1"`

          - `"openai/text-embedding-ada-002"`

          - `"openai/text-embedding-3-small"`

          - `"openai/text-embedding-3-large"`

          - `"embed-english-v3.0"`

          - `"embed-english-light-v3.0"`

          - `"embed-multilingual-v3.0"`

          - `"gemini/text-embedding-005"`

          - `"gemini/text-multilingual-embedding-002"`

          - `"gemini/gemini-embedding-001"`

        - `str`

      - `type: Optional[Literal["base"]]`

        The type of the embedding configuration.

        - `"base"`

  - `indexed_metadata_fields: Optional[Dict[str, Literal["string", "number", "boolean"]]]`

    Dictionary mapping metadata field names to their types

    - `"string"`

    - `"number"`

    - `"boolean"`

### Example

```python
import os
from scale_gp_beta import SGPClient

client = SGPClient(
    api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
)
vector_store = client.vector_stores.create(
    name="name",
)
print(vector_store.id)
```

#### Response

```json
{
  "id": "id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "embedding_dimensions": 0,
  "name": "name",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "embedding_config": {
    "model_deployment_id": "model_deployment_id",
    "type": "models_api"
  },
  "indexed_metadata_fields": {
    "foo": "string"
  }
}
```
