---
title: "Retrieve a file"
method: GET
path: "/v1/files/{file_id}"
tags: ["batch"]
---

# Retrieve a file

`GET /v1/files/{file_id}`

Read a file's metadata: size, purpose, and when it expires. Use the `/content` endpoint for the bytes.

## Path parameters

- `file_id` string, required — The `file_` prefixed id of the file whose metadata you want.

## Response `200`

File metadata.

- FileObject — A file you uploaded, or one a batch wrote for you.
  - `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`.

## Other responses

- `400` — Malformed request — missing or invalid fields.
- `401` — Missing or invalid API key.
- `404` — The requested resource does not exist.
- `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/:file_id/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)
