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
| Param | Example | Type | Status |
|---|---|---|---|
id | id: "asset_123" | String | Required |
filename | filename: "bike.png" | String | Required |
title | title: "Red bike" | String | null | Required |
alt | alt: "A red bike" | String | null | Required |
mediaType | mediaType: "image/png" | String | Required |
sizeBytes | sizeBytes: 204800 | Number | Required |
width | width: 1200 | Number | null | Required |
height | height: 800 | Number | null | Required |
folderId | folderId: "folder_123" | String | null | Required |
tags | tags: ["Brand"] | String[] | Required |
createdBy | createdBy: "user_123" | String | null | Required |
url | url: "https://www.example.com/bike.png" | String | Required |
thumbnailUrl | thumbnailUrl: "https://www.example.com/bike-thumbnail.png" | String | - |
createdAt | createdAt: "2026-10-30T12:00:00.000Z" | String | Required |
updatedAt | updatedAt: "2026-10-30T12:00:00.000Z" | String | Required |
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.identitywhen creating the asset. - The Puck user that created the asset when using Puck Auth.
nullifauth.identitywas 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.