Skip to content

Read an asset

GET
/v1/assets/{id}
curl --request GET \
--url https://api.pixonaut.app/v1/assets/example \
--header 'Authorization: Bearer <token>'

Operation ID: assets.get

One finished asset of any kind. Its bytes are at /v1/assets/{id}/content and /v1/assets/{id}/original.

id
required
string

The asset

Media typeapplication/json
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

Examples

Exampleexample

Example

{
"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": {
"assetId": "3c1d8e72-5a4b-4f9e-8d2c-7b6a5e4d3c2b",
"inLibrary": true,
"name": "Summer logo, small",
"sourceHeightPx": 900,
"sourceWidthPx": 750
},
"visibility": "public",
"widthPx": 3000
}
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: not_found

Media typeapplication/json
object
error
required
string

Examples

Examplenot_found

not_found

{
"error": "not_found"
}
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