Skip to content

Upload an input image

POST
/v1/uploads
curl --request POST \
--url https://example.com/v1/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@file

Store an input image; returns {upload_key, image_url, asset_id}.

Free (0 credits) — capability + rate-limit gated only. The upload_key is what workflow dispatch accepts as product_image_s3_key / source_image_s3_key.

X-Shopify-Hmac-Sha256
Any of:
string
Media typemultipart/form-data
Body_v1_upload_v1_uploads_post
object
file
required
File

The input image (jpeg/png/webp, ≤25 MB).

string format: binary

Successful Response

Media typeapplication/json
UploadResponse

POST /v1/uploads response — durable handles plus a preview URL.

upload_key remains the additive handle for CTM’s explicit product_image_s3_key / source_image_s3_key fields. asset_id is the canonical identity accepted by POST /v1/try-on. image_url is a presigned preview URL and is NOT accepted back as an input.

object
upload_key
required
Upload Key

Durable upload handle — pass into workflow dispatch.

string
image_url
required
Image Url

Short-lived presigned preview URL (not an input handle).

string
asset_id
required
Asset Id

Durable canonical asset ULID for /v1/try-on references.

string
Examplegenerated
{
"upload_key": "example",
"image_url": "example",
"asset_id": "example"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}