Skip to content

List assets

GET
/v1/assets
curl --request GET \
--url 'https://api.pixonaut.app/v1/assets?kind=library&role=picture&retention=retained&sort=most-used&upscaleSources=show&page=1&pageSize=24' \
--header 'Authorization: Bearer <token>'

Operation ID: assets.list

The tenant’s finished assets of every kind, newest first (or with sort=most-used, the ones the most of the tenant’s drafts use first, then by name), a page at a time. An empty filter is the same as leaving it out. role=picture lists the pictures and role=blank-photo the blank photos; absent, both. category=none lists the assets in no category. q matches a name anywhere, or the start of an asset or session id. retention=retained lists what nothing will delete, and auto-delete everything else. ids=a,b narrows to the named assets; an id this tenant does not hold is left out. Each asset says what it was upscaled from; upscaleSources=hide lists an upscale in place of the picture it was made from, when the upscale is listed too.

kind
string
Allowed values: library design-upload
role
string
Allowed values: picture blank-photo
category
string
<= 200 characters
tag
string
<= 200 characters
q
string
<= 200 characters
retention
string
Allowed values: retained auto-delete
session
string
<= 200 characters
template
string
<= 200 characters
sort
string
Allowed values: most-used
ids
string
upscaleSources
string
Allowed values: show hide
page
integer
default: 1 >= 1 <= 100000
pageSize
integer
default: 24 >= 1 <= 100

A page of assets

Media typeapplication/json
object
assets
required
Array<object>
object
categoryId
required
string | null
colourModel
required

The stored picture’s colour model: cmyk for a CMYK JPEG, kept as uploaded. Null until it was read.

string | null
colourProfile
required

The description of the colour profile the picture embeds, such as sRGB IEC61966-2.1. Null when it embeds none.

string | null
contentKey
required

Names the asset’s stored bytes, which never change. Pass it as v to /v1/assets/{id}/content and the answer is cached immutable.

string | null
createdAt
required
number
expiresAt
required
number
hasAlpha
required

Whether any pixel of the picture is not fully opaque. Null until it was read.

boolean | null
heightPx
required
number | null
id
required
string
kind
required
string
localizedNames
required

Its name per customer-facing language, by code; a language left out shows its own name.

object
key
additional properties
string
mime
required
string
name
required
string | null
pictureUrl
required

A link to a library picture’s preview that opens with no key, for an hour or two. Null for an asset of another kind.

string | null
retained
required
boolean
role
required

picture, or blank-photo for a blank’s product photo, which is in no category and counted in no category or tag.

string
sessionId
required
string | null
sizeBytes
required
number
tags
required
Array<string>
templateId
required
string | null
updatedAt
required

When the asset’s name, visibility, category or tags last changed: what a PATCH’s expectedUpdatedAt names.

number
upscaledFrom
required

The picture this asset is an upscale of, at the size it was then; null when it is not an upscale.

object
assetId
required
string
inLibrary
required

Whether the source is still in the library: false once it was deleted, since the record outlives its source.

boolean
name
required

The source’s name, or null when it has none or is no longer in the library.

string | null
sourceHeightPx
required
number
sourceWidthPx
required
number
visibility
required
string
widthPx
required
number | null
page
required
number
pageSize
required
number
total
required
number

Examples

Exampleexample

Example

{
"assets": [
{
"categoryId": "5d8f2a41-9b3c-4d7e-8f1a-2b3c4d5e6f70",
"colourModel": "rgb",
"colourProfile": "sRGB IEC61966-2.1",
"contentKey": "ck_4f7a1c9e2b8d",
"createdAt": 1760356800000,
"expiresAt": 0,
"hasAlpha": true,
"heightPx": 3600,
"id": "7a3e9b10-2c4d-4e5f-9a6b-1c2d3e4f5a6b",
"kind": "library",
"localizedNames": {},
"mime": "image/png",
"name": "Summer logo",
"pictureUrl": "https://api.pixonaut.example/i/eyJhdWQiOiJjYXRhbG9ndWUtaW1hZ2UifQ.c2lnbmF0dXJl",
"retained": true,
"role": "picture",
"sessionId": null,
"sizeBytes": 1843200,
"tags": [
"logo",
"summer"
],
"templateId": null,
"updatedAt": 1760443200000,
"upscaledFrom": null,
"visibility": "public",
"widthPx": 3000
}
],
"page": 1,
"pageSize": 24,
"total": 1
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: unauthorized

Media typeapplication/json
object
error
required
string

Examples

Exampleunauthorized

unauthorized

{
"error": "unauthorized"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: origin_forbidden, forbidden, feature_disabled, workspace_suspended

Media typeapplication/json
object
error
required
string
feature

The feature the tenant does not have. Always sent with feature_disabled.

string

Examples

feature_disabled

{
"error": "feature_disabled",
"feature": "api"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: invalid_query

Media typeapplication/json
object
error
required
string

Examples

Exampleinvalid_query

invalid_query

{
"error": "invalid_query"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: db_error. A request that failed unexpectedly answers as text instead.

object
error
required
string

Examples

Exampledb_error

db_error

{
"error": "db_error"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Questions? Write to [email protected].

Status · Terms of service · Privacy policy · Subprocessors