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

# List files for a run

> <p>List the files produced by a run.</p>



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/indices/openapi.documented.yml get /v1beta/files
openapi: 3.1.0
info:
  title: Indices API
  description: 'The Indices REST API. See docs for details: https://docs.indices.io'
  version: 0.0.1
servers:
  - url: https://api.indices.io
security:
  - ApiKeyAuth: []
tags:
  - name: Tasks
    description: Create a task to repeatedly perform an action on an external website.
  - name: Runs
    description: Execute a task.
  - name: Secrets
    description: Manage secrets like login credentials and API keys.
paths:
  /v1beta/files:
    get:
      tags:
        - Files
      summary: List files for a run
      description: <p>List the files produced by a run.</p>
      operationId: listFiles
      parameters:
        - name: run_id
          in: query
          required: true
          schema:
            type: string
            description: The ID of the run whose files to list.
            title: Run Id
          description: The ID of the run whose files to list.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Maximum number of files to return.
            default: 20
            title: Limit
          description: Maximum number of files to return.
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Cursor from a previous response's `next_cursor`, to fetch the next
              page.
            title: Cursor
          description: >-
            Cursor from a previous response's `next_cursor`, to fetch the next
            page.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFilesResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ListFilesResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/File'
          type: array
          description: Files for the requested page, ordered newest first.
        has_more:
          type: boolean
          description: Whether more files exist after this page.
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Pass as the `cursor` query parameter to fetch the next page. Null
            when has_more is false.
      type: object
      required:
        - data
        - has_more
        - next_cursor
      title: ListFilesResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    File:
      properties:
        id:
          type: string
          description: Unique identifier for the object.
        run_id:
          type: string
          description: ID of the run that produced this file.
        name:
          type: string
          description: User-facing filename.
        size_bytes:
          type: integer
          description: Size of the file in bytes.
        content_type:
          type: string
          description: MIME type of the file.
        crc32c:
          type: string
          description: Base64-encoded CRC32C checksum of the file content.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the file was created.
      type: object
      required:
        - id
        - run_id
        - name
        - size_bytes
        - content_type
        - crc32c
        - created_at
      title: File
    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:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Enter your API key as the bearer token. Set header: `Authorization` to
        `Bearer <api_key>`

````