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

# Retrieve a file

`GET /api/files/{file_id}/`

Retrieve metadata for a file from the upstream OpenAI Files API.

## Path parameters

- `file_id` string, required

## Query parameters

- `provider_id` string, required

## Headers

- `Authorization` string, required

## Response `200`

File details.

- OpenAIBatchRetrieveFileResponse200
  - `id` string, required — File ID.
  - `object` string, required
  - `bytes` integer — File size in bytes.
  - `created_at` integer — Unix timestamp.
  - `filename` string
  - `purpose` string
  - `status` string — File status.
  - `status_details` unknown

## Other responses

- `401` — Unauthorized - Missing or invalid authentication
- `404` — Not Found

## Changes

- **2026-08-13** `4e064cf81dae` — 1 breaking, 10 info
  - added the new required `query` request parameter `provider_id`
  - added the non-success response with the status `401`
  - added the non-success response with the status `404`
  - added the optional property `bytes` to the response with the `200` status
  - …7 more
- **2026-07-31** `c26d550029f8` — 2 breaking, 6 warning, 2 info
  - removed the required property `id` from the response with the `200` status
  - removed the required property `object` from the response with the `200` status
  - removed the optional property `bytes` from the response with the `200` status
  - removed the optional property `created_at` from the response with the `200` status
  - …6 more

[Change history](https://skmtc.dev/keywordsai/apis/api-reference/changes/api/files/:file_id/get.md)

---

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