---
title: "Get file metadata"
method: GET
path: "/buckets/{namespace}/{repo}/resolve/{path}"
tags: ["buckets"]
---

# Get file metadata

`GET /buckets/{namespace}/{repo}/resolve/{path}`

Returns file metadata including size, hash, and links to XET authentication

## Path parameters

- `namespace` string, required
- `repo` string, required
- `path` string, required — Wildcard path parameter

## Query parameters

- `noContentDisposition` unknown
- `download` unknown

## Headers

- `Accept` 'application/vnd.xet-fileinfo+json' — Returns json information about the XET file info

## Response `200`

XET file info returned when the Accept header is set to `application/vnd.xet-fileinfo+json`. Otherwise, a 302 redirect is returned.

- object
  - `hash` string, required — The XET hash of the file
  - `refreshUrl` string, required — The XET auth URL for the file
  - `reconstructionUrl` string, required — The XET reconstruction URL for the file
  - `etag` string, required — The ETag of the file
  - `size` number, required — The size of the file
  - `contentType` string — The content type of the file

## Other responses

- `302` — Redirection to file on the xet bridge (default when no specific Accept header is set)
- `400` — File path required
- `404` — Bucket or file not found

---

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