> ## 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 a new vector store

> Create a new vector store for a project.
    
    This endpoint creates a vector store using the specified engine and configuration.
    Currently supports SGP Knowledge Base engine, but we plan to support more engines in the future.
    
    **Authentication:**
    - For SGP Knowledge Base, SGP credentials are required
    
    **Returns:**
    - Created vector store entity with ID, name, engine, and creation timestamp
    
    **Example Request:**
    ```json
    {
        "engine": "sgp_knowledge_base",
        "name": "My Knowledge Base",
        "embedding_model": "openai/text-embedding-3-large",
    }
    ```
    
    **Example Response:**
    ```json
    {
        "id": "vs_123456789",
        "project_id": "proj_987654321",
        "name": "My Knowledge Base",
        "engine": "sgp_knowledge_base",
        "created_at": "2024-01-15T10:30:00Z"
    }
    ```



## OpenAPI

````yaml https://dex.sgp.scale.com/openapi.json post /v1/projects/{project_id}/vector-stores
openapi: 3.1.0
info:
  title: Document Understanding API
  description: API for uploading and processing documents
  version: 0.4.5
servers: []
security:
  - ApiKey: []
    AccountId: []
tags:
  - name: Projects
    description: Operations related to project creation and management
  - name: Files
    description: Operations related to file upload and access
  - name: Parse
    description: Operations related to starting parse jobs and accessing their results
  - name: Vector Stores
    description: Operations related to vector store creation and management
  - name: Extract
    description: Operations related to starting extract jobs and accessing their results
  - name: Research
    description: Dex Research agent kickoff and results.
  - name: Jobs
    description: Operations related to monitoring jobs and their status
paths:
  /v1/projects/{project_id}/vector-stores:
    post:
      tags:
        - Vector Stores
      summary: Create a new vector store
      description: |-
        Create a new vector store for a project.
            
            This endpoint creates a vector store using the specified engine and configuration.
            Currently supports SGP Knowledge Base engine, but we plan to support more engines in the future.
            
            **Authentication:**
            - For SGP Knowledge Base, SGP credentials are required
            
            **Returns:**
            - Created vector store entity with ID, name, engine, and creation timestamp
            
            **Example Request:**
            ```json
            {
                "engine": "sgp_knowledge_base",
                "name": "My Knowledge Base",
                "embedding_model": "openai/text-embedding-3-large",
            }
            ```
            
            **Example Response:**
            ```json
            {
                "id": "vs_123456789",
                "project_id": "proj_987654321",
                "name": "My Knowledge Base",
                "engine": "sgp_knowledge_base",
                "created_at": "2024-01-15T10:30:00Z"
            }
            ```
      operationId: create_vector_store_v1_projects__project_id__vector_stores_post
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/SGPVectorStoreCreateRequestBase'
                - $ref: '#/components/schemas/SGPVectorStoreCreateRequestModelsApi'
                - $ref: '#/components/schemas/SGPKnowledgeBaseCreateRequestBase'
                - $ref: '#/components/schemas/SGPKnowledgeBaseCreateRequestModelsApi'
              title: Request
      responses:
        '201':
          description: Vector store created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VectorStoreEntity'
        '400':
          description: Bad request - Missing required fields
        '404':
          description: Project not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: >-
            Internal server error - Failed to create vector store in third-party
            engine
components:
  schemas:
    SGPVectorStoreCreateRequestBase:
      properties:
        engine:
          type: string
          const: sgp_vector_store
          title: Engine
          default: sgp_vector_store
        name:
          type: string
          title: Name
          description: Name of the vector store
        vector_store_metadata_schema:
          anyOf:
            - additionalProperties:
                type: string
                enum:
                  - string
                  - int
                  - double
                  - boolean
              type: object
            - type: 'null'
          title: Vector Store Metadata Schema
          description: >-
            Schema of the vector store metadata. You can set metadata for parsed
            documents and they will be indexed as extra metadata in the vector
            store to filter on when searching.
        embedding_type:
          type: string
          const: base
          title: Embedding Type
          description: Type of embedding configuration for standard models
          default: base
        embedding_model:
          anyOf:
            - 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
            - type: string
          title: Embedding Model
          description: >-
            Embedding model to use for SGP Vector Store. e.g.
            openai/text-embedding-3-large
      type: object
      required:
        - name
        - embedding_model
      title: SGPVectorStoreCreateRequestBase
      description: Base embedding configuration using standard models.
    SGPVectorStoreCreateRequestModelsApi:
      properties:
        engine:
          type: string
          const: sgp_vector_store
          title: Engine
          default: sgp_vector_store
        name:
          type: string
          title: Name
          description: Name of the vector store
        vector_store_metadata_schema:
          anyOf:
            - additionalProperties:
                type: string
                enum:
                  - string
                  - int
                  - double
                  - boolean
              type: object
            - type: 'null'
          title: Vector Store Metadata Schema
          description: >-
            Schema of the vector store metadata. You can set metadata for parsed
            documents and they will be indexed as extra metadata in the vector
            store to filter on when searching.
        embedding_type:
          type: string
          const: models_api
          title: Embedding Type
          description: Type of embedding configuration for custom deployed models
          default: models_api
        model_deployment_id:
          type: string
          title: Model Deployment Id
          description: Model deployment ID for 'models_api' type from Models API V4
      type: object
      required:
        - name
        - model_deployment_id
      title: SGPVectorStoreCreateRequestModelsApi
      description: Models API embedding configuration using custom deployed models.
    SGPKnowledgeBaseCreateRequestBase:
      properties:
        engine:
          type: string
          const: sgp_knowledge_base
          title: Engine
          default: sgp_knowledge_base
        name:
          type: string
          title: Name
          description: Name of the vector store
        vector_store_metadata_schema:
          anyOf:
            - additionalProperties:
                type: string
                enum:
                  - string
                  - int
                  - double
                  - boolean
              type: object
            - type: 'null'
          title: Vector Store Metadata Schema
          description: >-
            Schema of the vector store metadata. You can set metadata for parsed
            documents and they will be indexed as extra metadata in the vector
            store to filter on when searching.
        embedding_type:
          type: string
          const: base
          title: Embedding Type
          description: Type of embedding configuration for standard models
          default: base
        embedding_model:
          type: string
          title: Embedding Model
          description: >-
            Embedding model to use for 'base' type. e.g.
            openai/text-embedding-3-large
      type: object
      required:
        - name
        - embedding_model
      title: SGPKnowledgeBaseCreateRequestBase
      description: Base embedding configuration using standard models.
    SGPKnowledgeBaseCreateRequestModelsApi:
      properties:
        engine:
          type: string
          const: sgp_knowledge_base
          title: Engine
          default: sgp_knowledge_base
        name:
          type: string
          title: Name
          description: Name of the vector store
        vector_store_metadata_schema:
          anyOf:
            - additionalProperties:
                type: string
                enum:
                  - string
                  - int
                  - double
                  - boolean
              type: object
            - type: 'null'
          title: Vector Store Metadata Schema
          description: >-
            Schema of the vector store metadata. You can set metadata for parsed
            documents and they will be indexed as extra metadata in the vector
            store to filter on when searching.
        embedding_type:
          type: string
          const: models_api
          title: Embedding Type
          description: Type of embedding configuration for custom deployed models
          default: models_api
        model_deployment_id:
          type: string
          title: Model Deployment Id
          description: Model deployment ID for 'models_api' type from Models API V4
      type: object
      required:
        - name
        - model_deployment_id
      title: SGPKnowledgeBaseCreateRequestModelsApi
      description: Models API embedding configuration using custom deployed models.
    VectorStoreEntity:
      properties:
        id:
          type: string
          title: Id
          description: ID of the entity
        project_id:
          type: string
          title: Project Id
          description: ID of the project
        name:
          type: string
          title: Name
          description: Name of the vector store
        engine:
          $ref: '#/components/schemas/VectorStoreEngines'
          description: Engine used for vector store
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the vector store was created
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: >-
            Engine-specific external identifier used when calling the upstream
            API. For SGP Knowledge Base this equals the SGP KB UUID (same as
            id). For SGP Vector Store this is '<account_id>::<name>'.
      additionalProperties: true
      type: object
      required:
        - id
        - project_id
        - name
        - engine
        - created_at
      title: VectorStoreEntity
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    VectorStoreEngines:
      type: string
      enum:
        - sgp_knowledge_base
        - sgp_vector_store
      title: VectorStoreEngines
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication
    AccountId:
      type: apiKey
      in: header
      name: x-selected-account-id
      description: Selected Account ID

````