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

# List files

`GET /v1/files`

Page through your uploaded input files and generated output files, newest first by default.

## Query parameters

- `purpose` 'batch' | 'batch_output' — Only return files with this purpose.
- `order` 'asc' | 'desc' — Sort by `created_at`. Default `desc`.
- `limit` integer — Files per page. Default 20, max 10,000.
- `after` integer — Offset cursor: how many files to skip. Add `limit` to it for each next page.

## Response `200`

The requested page of files.

- FileList — A page of files.
  - `object` string, required — Object type, always `list`.
  - `data` FileObject[], required — Files in this page, newest first by default.
    - `id` string, required — File identifier, `file_` prefixed. Pass it as `input_file_id` when creating a batch.
    - `object` string, required — Object type, always `file`.
    - `bytes` integer, required — Size of the file in bytes.
    - `created_at` integer, required — Unix timestamp (seconds) for when the file was uploaded.
    - `expires_at` integer, nullable, required — Unix timestamp (seconds) for when the file and its content are deleted. Defaults to 30 days after upload (24 hours on zero-data-retention accounts).
    - `filename` string, required — The filename you uploaded, or the generated name for batch output and error files.
    - `purpose` 'batch' | 'batch_output', required — `batch` for files you upload; `batch_output` for the output and error files a batch produces.
    - `status` 'uploaded' | 'processed' | 'error', required — Deprecated OpenAI field, kept for SDK compatibility. Always `uploaded`.
  - `first_id` string, required — Id of the first file in this page. Empty when the page is empty.
  - `last_id` string, required — Id of the last file in this page. Empty when the page is empty.
  - `has_more` boolean, required — Whether another page exists after this one.

## Other responses

- `400` — Malformed request — missing or invalid fields.
- `401` — Missing or invalid API key.
- `429` — Rate limited — retry after the interval in the Retry-After header.
- `500` — Internal error — safe to retry with backoff.

## Changes

- **2026-09-02** `681b2f463d11` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/morphllm/apis/morph-api/changes/v1/files/get.md)

---

[API](https://skmtc.dev/morphllm/apis/morph-api.md) · [All operations](https://skmtc.dev/morphllm/apis/morph-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/morphllm/morph-api/revisions/681b2f463d11/schema)
