Skip to main content

Upload an image as an asset

POST 

/assets

Stores one image (PNG, JPEG or WebP, at most 20 MB) as a new asset of the key's account. Send multipart/form-data with the image in the file part, plus exactly one of productId or brandId (a file with no product) and an optional name. The 201 is a small AssetUpload body, not the asset read shape: a brand-level file is not visible to GET /assets. The type is read from the file itself, not from the declared content type. Idempotency-Key is required: a retry with the same key and the same file returns the same asset and stores nothing new. The returned assetId can be attached to a chat turn.

Request​

Responses​

Created. The new asset (or the replay of an earlier upload with this key).