---
title: "List files"
method: GET
path: "/v1/files"
---

# List files

`GET /v1/files`

## Request

- Base URL: `https://api.llmgateway.io`
- URL: `https://api.llmgateway.io/v1/files`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/llmgateway/apis/llmgateway-api/docs/v1/files/get.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `purpose` 'batch' | 'batch_output' | 'batch_error'
- `limit` string
- `after` string

## Response `200`

Files of the API key's project, newest first.

- object
  - `object` 'list', required
  - `data` BatchFile[], required
    - `id` string, required
    - `object` 'file', required
    - `bytes` number, required
    - `created_at` number, required
    - `expires_at` number, nullable, required
    - `filename` string, required
    - `purpose` 'batch' | 'batch_output' | 'batch_error', required
    - `status` 'processed', required
    - `status_details` unknown, required
  - `first_id` string, nullable, required
  - `last_id` string, nullable, required
  - `has_more` boolean, required

## Other responses

- `400`: Invalid request body or parameters.
- `401`: Missing or invalid API key.
- `402`: Insufficient credits or plan limits reached.
- `403`: Forbidden request or upstream response.
- `404`: Unknown model or upstream not-found response.
- `408`: Request timeout.
- `410`: Archived or unavailable project.
- `413`: Request too large.
- `415`: Unsupported media type.
- `429`: Rate limited. Response headers describe only LLMGateway-enforced limits; upstream provider headers are not forwarded. Honor Retry-After when present.
- `500`: Internal server error.
- `502`: Failed to connect to the upstream provider.
- `503`: Service unavailable upstream response.
- `504`: Upstream provider timeout.
- `529`: Gateway overloaded.

## Changes

- **2026-11-09** `a91f6c173982`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/llmgateway/apis/llmgateway-api/changes/v1/files/get.md)

---

[API](https://skmtc.dev/llmgateway/apis/llmgateway-api.md) - [All operations](https://skmtc.dev/llmgateway/apis/llmgateway-api/llms.txt) - [OpenAPI document](https://skmtc.dev/llmgateway/apis/llmgateway-api/revisions/a91f6c173982?raw)
