---
title: "GET /ai/v1/files/{file_id}"
method: GET
path: "/ai/v1/files/{file_id}"
tags: ["AI Gateway"]
---

# GET /ai/v1/files/{file_id}

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

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/ai/v1/files/{file_id}`
- Auth: HTTP bearer

## Path parameters

- `file_id` string, required

## Response `200`

File object

- FileObject: A file object as returned by the provider.
  - `bytes` integer
  - `created_at` integer
  - `filename` string
  - `id` string, required
  - `object` string, required: Always `file`
  - `purpose` string: `batch` for uploads, `batch_output` for batch results

## Other responses

- `401`: Unauthorized
- `404`: No such file created by the caller

## Changes

- **2026-10-05** `2d395ffb4f03`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/ai/v1/files/:file_id/get.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
