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

# List files

> Paginated list of files in a dataset



## OpenAPI

````yaml /latest.yml GET /datasets/{id}/files
openapi: 3.0.1
info:
  title: Cartesia API
  version: 0.0.1
servers:
  - url: https://api.cartesia.ai
    description: Production
security: []
paths:
  /datasets/{id}/files:
    get:
      tags:
        - Datasets
      description: Paginated list of files in a dataset
      operationId: datasets_listFiles
      parameters:
        - $ref: '#/components/parameters/CartesiaVersionHeader'
        - name: id
          in: path
          description: ID of the dataset to list files from
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: The number of files to return per page, ranging between 1 and 100.
          required: false
          schema:
            type: integer
            nullable: true
        - name: starting_after
          in: query
          description: >-
            A cursor to use in pagination. `starting_after` is a file ID that
            defines your

            place in the list. For example, if you make a dataset files request
            and receive 20

            objects, ending with `file_abc123`, your subsequent call can include

            `starting_after=file_abc123` to fetch the next page of the list.
          required: false
          schema:
            type: string
            nullable: true
        - name: ending_before
          in: query
          description: >-
            A cursor to use in pagination. `ending_before` is a file ID that
            defines your

            place in the list. For example, if you make a dataset files request
            and receive 20

            objects, starting with `file_abc123`, your subsequent call can
            include

            `ending_before=file_abc123` to fetch the previous page of the list.
          required: false
          schema:
            type: string
            nullable: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDatasetFiles'
      security:
        - APIKeyAuth: []
components:
  parameters:
    CartesiaVersionHeader:
      name: Cartesia-Version
      in: header
      description: API version header.
      required: true
      schema:
        type: string
        format: date
        example: '2026-03-01'
        enum:
          - '2026-03-01'
  schemas:
    PaginatedDatasetFiles:
      title: PaginatedDatasetFiles
      type: object
      description: Paginated list of files in a dataset
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DatasetFile'
          description: List of file objects
        has_more:
          type: boolean
          description: Whether there are more files available
      required:
        - data
        - has_more
    DatasetFile:
      title: DatasetFile
      type: object
      description: File stored in a dataset
      properties:
        id:
          type: string
          description: Unique identifier for the file
        filename:
          type: string
          description: Original filename
        created_at:
          type: string
          description: Timestamp when the file was created
        size:
          type: integer
          description: Size of the file in bytes
      required:
        - id
        - filename
        - created_at
        - size
  securitySchemes:
    APIKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Cartesia API key (`sk_car_...`). Get one at
        [play.cartesia.ai/keys](https://play.cartesia.ai/keys).

````