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

# List files

`GET /files`

Returns a list of files that can be optionally limited to a set of results (e.g., `limit`, `after`), ordered (e.g., `order`), and filtered (e.g., `purpose`).

## Query parameters

- `purpose` string
- `limit` integer
- `order` 'asc' | 'desc'
- `after` string

## Response `200`

Success. A list of paginated File objects.

- SyncCursorPageFileObject
  - `object` string — The object type, which is always `list`.
  - `data` FileObject[] — An array of File objects.
    - `id` string — The file identifier.
    - `object` string — The object type, which is always `file`.
    - `bytes` integer — The size of the file, in bytes.
    - `created_at` string — RFC 3339 datetime string for when the file was created.
    - `expires_at` string — RFC 3339 datetime string for when the file expires. Currently, this is 30 days after the file is created.
    - `filename` string — The name of the file.
    - `purpose` string — The intended purpose of the file. Supported values are `batch`, `batch-output`, and `batch-error`.
  - `first_id` string — The identifier of the first File object in the `data` array.
  - `last_id` string — The identifier of the last File object in the `data` array.
  - `has_more` boolean — Returns `true` if more File objects are available; otherwise, returns `false`.

## Other responses

- `4XX` — Client error <p> This indicates an issue with the request format or frequency. Please see our [Error Codes](https://docs.voyageai.com/docs/error-codes) guide. </p>
- `5XX` — Server Error <p> This indicates our servers are experiencing high traffic or having an unexpected issue. Please see our [Error Codes](https://docs.voyageai.com/docs/error-codes) guide. </p>

---

[API](https://skmtc.net/voyageai/apis/voyage-api.md) · [All operations](https://skmtc.net/voyageai/apis/voyage-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/voyageai/voyage-api/revisions/b5a3e09c43ce/schema)
