---
title: "Retrieve file"
method: GET
path: "/v1/files/{file_id}"
---

# Retrieve file

`GET /v1/files/{file_id}`

## Request

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

## Path parameters

- `file_id` string, required

## Response `200`

The file.

- BatchFile
  - `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

## 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/:file_id/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)
