> ## 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 files in vector store

> Retrieve a paginated list of files that have been added to a vector store.
    
    This endpoint returns all files that are currently indexed in the specified vector store,
    including their metadata such as file name, size, MIME type, and creation timestamp.
    
    **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 file entities
    - Total count of files in the vector store
    - `next_token` for pagination (null if no more pages)
    - File metadata including ID, name, size, and MIME type
    
    **Example Response:**
    ```json
    {
        "items": [
            {
                "id": "vsf_123456789",
                "vector_store_id": "vs_123456789",
                "parse_result_id": "pres_987654321",
                "file_id": "file_987654321",
                "file_name": "document.pdf",
                "file_size": 1024000,
                "file_mime_type": "application/pdf",
                "created_at": "2024-01-15T10:30:00Z"
            }
        ],
        "total_count": 1,
        "next_token": "eyJmaWxlX2lkIjoiZmlsZV85ODc2NTQzMjEifQ=="
    }
    ```



## OpenAPI

````yaml https://dex.sgp.scale.com/openapi.json get /v1/projects/{project_id}/vector-stores/{vector_store_id}/files
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/{vector_store_id}/files:
    get:
      tags:
        - Vector Stores
      summary: List files in vector store
      description: >-
        Retrieve a paginated list of files that have been added to a vector
        store.
            
            This endpoint returns all files that are currently indexed in the specified vector store,
            including their metadata such as file name, size, MIME type, and creation timestamp.
            
            **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 file entities
            - Total count of files in the vector store
            - `next_token` for pagination (null if no more pages)
            - File metadata including ID, name, size, and MIME type
            
            **Example Response:**
            ```json
            {
                "items": [
                    {
                        "id": "vsf_123456789",
                        "vector_store_id": "vs_123456789",
                        "parse_result_id": "pres_987654321",
                        "file_id": "file_987654321",
                        "file_name": "document.pdf",
                        "file_size": 1024000,
                        "file_mime_type": "application/pdf",
                        "created_at": "2024-01-15T10:30:00Z"
                    }
                ],
                "total_count": 1,
                "next_token": "eyJmaWxlX2lkIjoiZmlsZV85ODc2NTQzMjEifQ=="
            }
            ```
      operationId: >-
        list_files_from_vector_store_v1_projects__project_id__vector_stores__vector_store_id__files_get
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
        - name: vector_store_id
          in: path
          required: true
          schema:
            type: string
            title: Vector Store Id
        - name: size
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: >-
              [DEPRECATED] Maximum number of files to return per page. Use
              page_size instead.
            deprecated: true
            examples:
              - 20
            default: 999
            title: Size
          description: >-
            [DEPRECATED] Maximum number of files 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: 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 files retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedItems_VectorStoreFileEntity_'
        '404':
          description: Project or vector store not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    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_VectorStoreFileEntity_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/VectorStoreFileEntity'
          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[VectorStoreFileEntity]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    VectorStoreFileEntity:
      properties:
        id:
          type: string
          title: Id
          description: ID of the vector store file
        parse_result_id:
          type: string
          title: Parse Result Id
          description: ID of the parse result
        vector_store_id:
          type: string
          title: Vector Store Id
          description: ID of the vector store
        file_id:
          type: string
          title: File Id
          description: ID of the file
        file_name:
          type: string
          title: File Name
          description: Name of the file
        file_size:
          type: integer
          title: File Size
          description: Size of the file
        file_mime_type:
          type: string
          title: File Mime Type
          description: MIME type of the file
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the vector store file was created
      additionalProperties: true
      type: object
      required:
        - id
        - parse_result_id
        - vector_store_id
        - file_id
        - file_name
        - file_size
        - file_mime_type
        - created_at
      title: VectorStoreFileEntity
    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

````