---
title: "Get a file's metadata"
method: GET
path: "/v1/files/{id}"
tags: ["Files"]
---

# Get a file's metadata

`GET /v1/files/{id}`

## Path parameters

- `id` string, required

## Response `200`

OK

- FileObject — A file stored for the Batch API (OpenAI-compatible).
  - `bytes` integer, required — File size in bytes.
  - `created_at` integer, required — Unix timestamp (seconds).
  - `expires_at` integer — Unix timestamp (seconds); files are retained for 30 days.
  - `filename` string, required
  - `id` string, required — File id (file-…). Pass it as input_file_id when creating a batch.
  - `object` 'file', required
  - `purpose` string, required — "batch" for inputs, "batch_output" / "batch_error" for result files.

## Other responses

- `401` — Missing or invalid API key
- `404` — Not found (also returned when the organization does not have Batch API access)

---

[API](https://skmtc.net/openrelay/apis/openrelay-api.md) · [All operations](https://skmtc.net/openrelay/apis/openrelay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openrelay/openrelay-api/versions/32905b8f44f8/schema)
