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

# List vector stores

> Retrieve a paginated list of vector stores for a project.
    
    This endpoint returns all vector stores associated with the specified project,
    with optional filtering by name and engine type.
    
    **Filtering:**
    - `name`: Filter vector stores by exact name match
    - `engine`: Filter by vector store engine type (e.g., sgp_knowledge_base)
    - `ids`: Filter by vector store IDs (list)
    - `created_at_start`: Filter by creation time (start)
    - `created_at_end`: Filter by creation time (end)
    - `project_id`: Filter by project ID (if not provided in path)
    
    **Sorting:**
    - `sort_by`: Field to sort by (id, created_at, engine, project_id)
    - `sort_order`: Sort order (asc or desc)
    
    **Token-based Pagination:**
    - New syntax (recommended): Use `page_size`, `continuation_token`, `sort_by`, `sort_order` query parameters
    - Legacy syntax (deprecated): Use `size` and `continuation_token` query parameters
    - If no pagination parameters are provided, returns a plain list
    - Use the `next_token` from the response to fetch subsequent pages
    - When `next_token` is `null`, you have reached the last page
    
    **Returns:**
    - Paginated list of vector store entities
    - Total count of matching vector stores
    - `next_token` for pagination (null if no more pages)
    
    **Example Response:**
    ```json
    {
        "items": [
            {
                "id": "vs_123456789",
                "project_id": "proj_987654321",
                "name": "My Knowledge Base",
                "engine": "sgp_knowledge_base",
                "created_at": "2024-01-15T10:30:00Z"
            }
        ],
        "total_count": 1,
        "next_token": "eyJpZCI6InZlY3Rvcl9zdG9yZV8xMjM0NTY3ODkwYWJjZGVmIn0="
    }
    ```



## OpenAPI

````yaml https://dex.sgp.scale.com/openapi.json get /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:
    get:
      tags:
        - Vector Stores
      summary: List vector stores
      description: |-
        Retrieve a paginated list of vector stores for a project.
            
            This endpoint returns all vector stores associated with the specified project,
            with optional filtering by name and engine type.
            
            **Filtering:**
            - `name`: Filter vector stores by exact name match
            - `engine`: Filter by vector store engine type (e.g., sgp_knowledge_base)
            - `ids`: Filter by vector store IDs (list)
            - `created_at_start`: Filter by creation time (start)
            - `created_at_end`: Filter by creation time (end)
            - `project_id`: Filter by project ID (if not provided in path)
            
            **Sorting:**
            - `sort_by`: Field to sort by (id, created_at, engine, project_id)
            - `sort_order`: Sort order (asc or desc)
            
            **Token-based Pagination:**
            - New syntax (recommended): Use `page_size`, `continuation_token`, `sort_by`, `sort_order` query parameters
            - Legacy syntax (deprecated): Use `size` and `continuation_token` query parameters
            - If no pagination parameters are provided, returns a plain list
            - Use the `next_token` from the response to fetch subsequent pages
            - When `next_token` is `null`, you have reached the last page
            
            **Returns:**
            - Paginated list of vector store entities
            - Total count of matching vector stores
            - `next_token` for pagination (null if no more pages)
            
            **Example Response:**
            ```json
            {
                "items": [
                    {
                        "id": "vs_123456789",
                        "project_id": "proj_987654321",
                        "name": "My Knowledge Base",
                        "engine": "sgp_knowledge_base",
                        "created_at": "2024-01-15T10:30:00Z"
                    }
                ],
                "total_count": 1,
                "next_token": "eyJpZCI6InZlY3Rvcl9zdG9yZV8xMjM0NTY3ODkwYWJjZGVmIn0="
            }
            ```
      operationId: list_vector_stores_v1_projects__project_id__vector_stores_get
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
        - name: size
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: >-
              [DEPRECATED] Maximum number of vector stores to return per page.
              Use page_size instead.
            deprecated: true
            examples:
              - 20
            default: 999
            title: Size
          description: >-
            [DEPRECATED] Maximum number of vector stores to return per page. Use
            page_size instead.
          deprecated: true
        - name: continuation_token
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Pagination token
            title: Continuation Token
          description: Pagination token
        - name: ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: Filter by vector store IDs
            title: Ids
          description: Filter by vector store IDs
        - name: created_at_start
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter by creation time (start)
            title: Created At Start
          description: Filter by creation time (start)
        - name: created_at_end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter by creation time (end)
            title: Created At End
          description: Filter by creation time (end)
        - name: engine
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/VectorStoreEngines'
              - type: 'null'
            description: Filter by vector store engine type
            title: Engine
          description: Filter by vector store engine type
        - name: name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by vector store name (case-sensitive)
            title: Name
          description: Filter by vector store name (case-sensitive)
        - name: page_size
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 100
                minimum: 1
              - type: 'null'
            description: Number of items per page
            title: Page Size
          description: Number of items per page
        - name: sort_by
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Field to sort by
            title: Sort By
          description: Field to sort by
        - name: sort_order
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/SortOrder'
              - type: 'null'
            description: Sort order (asc or desc)
            title: Sort Order
          description: Sort order (asc or desc)
      responses:
        '200':
          description: List of vector stores retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedItems_VectorStoreEntity_'
        '404':
          description: Project not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    VectorStoreEngines:
      type: string
      enum:
        - sgp_knowledge_base
        - sgp_vector_store
      title: VectorStoreEngines
    SortOrder:
      type: string
      enum:
        - asc
        - desc
      title: SortOrder
      description: >-
        Enum for project sort fields.

        Note that only non-nullable fields can be sorted by (for

        details, see:
        https://github.com/djrobstep/sqlakeyset?tab=readme-ov-file#limitations
        ).
    PaginatedItems_VectorStoreEntity_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/VectorStoreEntity'
          type: array
          title: Items
        total_count:
          type: integer
          title: Total Count
        next_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Token
        prev_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Prev Token
      type: object
      required:
        - items
        - total_count
      title: PaginatedItems[VectorStoreEntity]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
    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

````