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

# List files

`GET /v1/files`

List files

## Query parameters

- `after` string, nullable — A cursor for pagination. Returns files after this ID.
- `limit` integer, nullable — Maximum number of files to return (1-10,000).
- `order` 'asc' | 'desc' — Sort order for paginated responses.
- `purpose` 'assistants' | 'assistants_output' | 'batch' | 'batch_output' | 'evals' | 'fine-tune' | 'fine-tune-results' | 'vision' | 'user_data' — Valid purpose values on the OpenAI File response object.

## Response `200`

The list of files.

- ListOpenAIFileResponse — Response for listing files in OpenAI Files API.
  - `data` OpenAIFileObject[], required — The list of files.
    - `object` 'file' — The object type, which is always 'file'.
    - `id` string, required — The file identifier, which can be referenced in the API endpoints.
    - `bytes` integer, required — The size of the file, in bytes.
    - `created_at` integer, required — The Unix timestamp (in seconds) for when the file was created.
    - `expires_at` integer — The Unix timestamp (in seconds) for when the file will expire.
    - `filename` string, required — The name of the file.
    - `purpose` 'assistants' | 'assistants_output' | 'batch' | 'batch_output' | 'evals' | 'fine-tune' | 'fine-tune-results' | 'vision' | 'user_data', required — Valid purpose values on the OpenAI File response object.
    - `status` 'uploaded' | 'processed' | 'error', required — Deprecated. The current status of the file.
    - `status_details` string — Deprecated. For details on why a fine-tuning training file failed validation, see the error field on fine_tuning.job.
  - `has_more` boolean, required — Whether there are more files available beyond this page.
  - `first_id` string, required — The ID of the first file in the list for pagination.
  - `last_id` string, required — The ID of the last file in the list for pagination.
  - `object` 'list' — The object type, which is always 'list'.

## Other responses

- `400` — The request was invalid or malformed
- `429` — The client has sent too many requests in a given amount of time
- `500` — The server encountered an unexpected error
- `default` — An error occurred

---

[API](https://skmtc.net/ogx-ai/apis/ogx-specification-stable-experimental-apis.md) · [All operations](https://skmtc.net/ogx-ai/apis/ogx-specification-stable-experimental-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ogx-ai/ogx-specification-stable-experimental-apis/versions/f3f783962256/schema)
