---
title: "Retrieve metadata for a single file by ID. Errors with 404 if the file
doesn't exist, has been deleted, or has passed its `expires_at`."
method: GET
path: "/v1/files/{file_id}"
tags: ["v1"]
---

# Retrieve metadata for a single file by ID. Errors with 404 if the file
doesn't exist, has been deleted, or has passed its `expires_at`.

`GET /v1/files/{file_id}`

## Path parameters

- `file_id` string, required

## Response `200`

Success

- File — An uploaded file.
  - `bytes` integer, required — The size of the file, in bytes.
  - `created_at` integer, required — The Unix timestamp (in seconds) for file creation time.
  - `expires_at` integer, nullable — The Unix timestamp (in seconds) for file expiry time. null if file does not expire.
  - `filename` string, required — The name of the file.
  - `id` string, required — The file identifier, which can be used in other API requests.
  - `object` string, required — The object type, which is always `file`. Only included for compatability.
  - `public_url` string, nullable — Public URL for the file. Only present when the file has an active public URL.
  - `public_url_expires_at` integer, nullable — Unix timestamp (seconds) when the public URL expires. Only present when the public URL has an independent expiry.
  - `purpose` string — The intended purpose of the uploaded file. Only included for OAI compatability.

## Other responses

- `404` — File not found, deleted, or expired.

---

[API](https://skmtc.net/x/apis/xai-s-rest-api.md) · [All operations](https://skmtc.net/x/apis/xai-s-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/x/xai-s-rest-api/versions/8f6014272113/schema)
