> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gp.scale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Vector Store

> 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.



## OpenAPI

````yaml https://api.dev-sgp.scale.com/openapi-versions/v5/openapi.json post /v5/vector-stores/create
openapi: 3.1.0
info:
  title: EGP API V5
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
paths:
  /v5/vector-stores/create:
    post:
      tags:
        - Vector Stores
      summary: Create Vector Store
      description: >-
        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.
      operationId: POST-V5-/v5/vector-stores/create
      parameters:
        - name: x-selected-account-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Account ID Header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVectorStoreRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VectorStoreResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CreateVectorStoreRequest:
      properties:
        name:
          type: string
          title: Name
          description: A unique name for the vector store within the account
        embedding_config:
          $ref: '#/components/schemas/EmbeddingConfig'
          description: >-
            The embedding configuration. Either 'base' type with an
            embedding_model, or 'models_api' type with a model_deployment_id for
            custom models.
        embedding_model:
          $ref: '#/components/schemas/EmbeddingModelName'
          description: >-
            The base embedding model to use. Shorthand for embedding_config with
            type 'base'. Provide either embedding_config or embedding_model, not
            both.
        dimensions:
          title: Dimensions
          description: >-
            Dimension size of embedding vectors. Required when neither
            'embedding_config' nor 'embedding_model' is set. Automatically
            derived when an embedding model is provided.
          type: integer
          exclusiveMinimum: 0
        indexed_metadata_fields:
          title: Indexed Metadata Fields
          description: >-
            Dictionary mapping metadata field names to their types for efficient
            filtering. Only STRING, NUMBER, and BOOLEAN types can be indexed.
          additionalProperties:
            $ref: '#/components/schemas/DocumentFieldType'
          type: object
      type: object
      required:
        - name
      title: CreateVectorStoreRequest
      description: Request to create a vector store.
    VectorStoreResponse:
      properties:
        name:
          type: string
          title: Name
          description: The name of the vector store
        embedding_config:
          $ref: '#/components/schemas/EmbeddingConfig'
          description: >-
            Embedding configuration identifying the model and its type. None for
            raw-embedding-only stores.
        embedding_dimensions:
          type: integer
          title: Embedding Dimensions
          description: Dimensionality of the embedding vectors
        indexed_metadata_fields:
          title: Indexed Metadata Fields
          description: Dictionary mapping metadata field names to their types
          additionalProperties:
            $ref: '#/components/schemas/DocumentFieldType'
          type: object
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp of creation
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Timestamp of last update
      type: object
      required:
        - name
        - embedding_dimensions
        - created_at
        - updated_at
      title: VectorStoreResponse
      description: Response model for vector store operations.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EmbeddingConfig:
      anyOf:
        - $ref: '#/components/schemas/EmbeddingConfigModelsAPI'
        - $ref: '#/components/schemas/EmbeddingConfigBase'
      title: EmbeddingConfig
    EmbeddingModelName:
      type: string
      enum:
        - sentence-transformers/all-MiniLM-L12-v2
        - sentence-transformers/all-mpnet-base-v2
        - sentence-transformers/multi-qa-distilbert-cos-v1
        - sentence-transformers/paraphrase-multilingual-mpnet-base-v2
        - 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
      title: EmbeddingModelName
    DocumentFieldType:
      type: string
      enum:
        - string
        - number
        - boolean
      title: DocumentFieldType
      description: |-
        Supported document field types for indexed metadata fields.

        Only STRING, NUMBER, and BOOLEAN types can be indexed for filtering.
        OBJECT and LIST values in document metadata are automatically stored
        as non-indexed fields and do not need to be declared here.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          title: Error Type
          type: string
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    EmbeddingConfigModelsAPI:
      properties:
        type:
          type: string
          const: models_api
          title: Type
          description: The type of the embedding configuration.
        model_deployment_id:
          type: string
          title: Model Deployment Id
          description: The ID of the deployment of the created model in the Models API V3.
      type: object
      required:
        - type
        - model_deployment_id
      title: EmbeddingConfigModelsAPI
    EmbeddingConfigBase:
      properties:
        type:
          type: string
          const: base
          title: Type
          description: The type of the embedding configuration.
          default: base
        embedding_model:
          $ref: '#/components/schemas/EmbeddingModelName'
          description: >-
            The name of the base embedding model to use. To use custom models,
            change to type 'models'.
      type: object
      required:
        - embedding_model
      title: EmbeddingConfigBase
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````