Generate experiences with Puck AI
Read docs
CloudAPI referencecloud-clientTypesAsset

Asset

Puck Assets is in early access. Request access.

A file stored in the asset library.

{
  "id": "asset_123",
  "filename": "bike.png",
  "title": "Red bike",
  "alt": "A red bike",
  "mediaType": "image/png",
  "sizeBytes": 204800,
  "width": 1200,
  "height": 800,
  "folderId": "folder_123",
  "tags": ["Brand"],
  "createdBy": "user_123",
  "url": "https://www.example.com/bike.png",
  "thumbnailUrl": "https://www.example.com/bike-thumbnail.png",
  "createdAt": "2026-10-30T12:00:00.000Z",
  "updatedAt": "2026-10-30T12:00:00.000Z"
}

Params

ParamExampleTypeStatus
idid: "asset_123"StringRequired
filenamefilename: "bike.png"StringRequired
titletitle: "Red bike"String | nullRequired
altalt: "A red bike"String | nullRequired
mediaTypemediaType: "image/png"StringRequired
sizeBytessizeBytes: 204800NumberRequired
widthwidth: 1200Number | nullRequired
heightheight: 800Number | nullRequired
folderIdfolderId: "folder_123"String | nullRequired
tagstags: ["Brand"]String[]Required
createdBycreatedBy: "user_123"String | nullRequired
urlurl: "https://www.example.com/bike.png"StringRequired
thumbnailUrlthumbnailUrl: "https://www.example.com/bike-thumbnail.png"String-
createdAtcreatedAt: "2026-10-30T12:00:00.000Z"StringRequired
updatedAtupdatedAt: "2026-10-30T12:00:00.000Z"StringRequired

id

The asset’s id.

filename

The file’s name.

title

The asset’s title, or null if the asset has no title.

alt

The asset’s alt text, or null if the asset has no alt text.

mediaType

The file’s media type, for example image/png.

sizeBytes

The file’s size in bytes.

width

The asset’s width in pixels, or null if the width isn’t known.

height

The asset’s height in pixels, or null if the height isn’t known.

folderId

The id of the folder that holds the asset, or null if the asset is in no folder.

tags

The asset’s tags.

createdBy

The id of the user who created the asset. One of the following:

  • The user passed in auth.identity when creating the asset.
  • The Puck user that created the asset when using Puck Auth.
  • null if auth.identity was not provided and not using Puck Auth.

url

The URL of the file. Use this to access the file directly in a browser or via an HTTP request.

thumbnailUrl

If the asset is an image, the URL of a copy of the image that is 400 pixels wide.

createdAt

When the asset was created, as an ISO timestamp.

updatedAt

When the asset last changed, as an ISO timestamp.