---
title: "List files"
method: GET
path: "/v1/files"
tags: ["Files"]
---

# List files

`GET /v1/files`

## Request

- Base URL: `https://api.tokenlab.sh`
- URL: `https://api.tokenlab.sh/v1/files`
- Auth: HTTP bearer

## Query parameters

- `limit` integer
- `after` string
- `after_id` string
- `before_id` string
- `scope_id` string
- `purpose` 'batch' | 'batch_output' | 'user_data' | 'vision'

## Headers

- `anthropic-beta` string

## Response `200`

List of files

- union
  - FileListResponse
    - `object` 'list', required
    - `data` FileObject[], required
      - `id` string, required
      - `object` 'file', required
      - `bytes` integer, required
      - `created_at` integer, required
      - `filename` string, required
      - `purpose` 'batch' | 'batch_output' | 'user_data' | 'vision', required: File purpose. batch and batch_output are used by Batches; user_data and vision are used by file-backed image/reference requests.
      - `status` string: Batch file processing status. Image/reference file objects may omit this field.
      - `expires_at` integer, nullable
    - `first_id` string, nullable, required
    - `last_id` string, nullable, required
    - `has_more` boolean, required
  - AnthropicFileListResponse
    - `data` AnthropicFileObject[], required
      - `id` string, required
      - `type` 'file', required
      - `filename` string, required
      - `mime_type` string, required
      - `size_bytes` integer, required
      - `created_at` string, date-time, required
      - `downloadable` boolean
      - `scope` object, nullable
        - `id` string, required
        - `type` 'session', required
    - `first_id` string, nullable, required
    - `last_id` string, nullable, required
    - `has_more` boolean, required

## Other responses

- `401`: Unauthorized - Invalid or missing API key

---

[API](https://skmtc.dev/tokenlab/apis/tokenlab-ai-gateway.md) · [All operations](https://skmtc.dev/tokenlab/apis/tokenlab-ai-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/tokenlab/apis/tokenlab-ai-gateway/revisions/3208bfbcda22?raw)
