BucktDocs

Get file

GET/v1/buckets/{bucketId}/files/{path}files:readSDK: files.get

Returns metadata about a single file: size, content type, last-modified timestamp, and the public URL on the bucket's custom domain. Does not return the file bytes — fetch the URL directly to download the object.

Path parameters

NameTypeDefaultDescription
bucketIdrequiredstringThe bucket containing the file.
pathrequiredstringThe file's object key (e.g. `images/logo.png`).

Example request

import { Buckt } from "@buckt/sdk";

const client = new Buckt({ apiKey: process.env.BUCKT_API_KEY });

const file = await client.files.get(
  "bkt_01H8XYZABCDEFGHJKMNPQRSTVW",
  "images/logo.png"
);

Responses

{
  "data": {
    "object": "file",
    "id": "images/logo.png",
    "key": "images/logo.png",
    "size": 24531,
    "lastModified": "2026-04-25T11:30:00Z",
    "contentType": "image/png",
    "url": "https://files.example.com/images/logo.png"
  },
  "error": null,
  "meta": null
}