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

# Retrieve file content

`GET /v1/files/{file_id}/content`

## Request

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

Returns the JSONL content of an uploaded file, or the output or error file of a finished batch.

## Path parameters

- `file_id` string, required

## Response `200`

File content.

## 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/content/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)
