# File Metadata

**Page:** api/files/metadata

[Download Raw Markdown](./api/files/metadata.md)

---

{/* AUTO-GENERATED — Do not edit manually. Regenerate with: npm run docs:api:generate */}



The file metadata endpoint lets you check whether a file exists and retrieve its metadata headers using a lightweight `HEAD` request. Use it before downloading or transforming a file to verify availability without transferring the file body. This page documents the single `HEAD /api/files/metadata/{path}` operation.

## Get file metadata

Returns metadata headers for a file at the specified path. Since this is a `HEAD` request, no response body is returned; the metadata is conveyed entirely through response headers. A `200` status indicates the file exists, while a `404` indicates it was not found.

### Parameters

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `path` | path | string | Yes | URL-encoded path to the file relative to the metadata root (e.g. `folder/image.png`) |

### Response



File exists at the requested path.

```json
{
  "description": "File exists"
}
```



No file exists at the requested path.

```json
{
  "description": "File not found"
}
```




### SDK usage

```ts
const metadata = await client.files.getMetadata({
  path: "folder/image.png",
});
```