Skip to navigation

Upload one input image as an Asset

Send raw JPEG, PNG or WebP bytes as the request body with the matching Content-Type. No Idempotency-Key: an upload is not deduplicated, and uploading the same bytes twice creates two assets. The asset is owned by the caller’s environment and expires at expires_at. Metadata (EXIF, XMP, IPTC) is removed and pixels are rotated to their displayed orientation before the asset is stored, so width and height are the displayed dimensions.

Authentication

X-API-Keystring

API key for one environment of your account. Keep server-side; never expose in browser clients.

Request

This endpoint expects binary data of type image/jpeg.

Response headers

Cache-ControlstringOptional
API responses are private to the caller and not cacheable
LocationstringOptional
Relative URL of the created asset
RateLimitstringOptional

The state of each policy in RateLimit-Policy: "submit";r=59;t=1, r remaining and t seconds until whole again.

RateLimit-LimitintegerOptional

Quota of the most restrictive policy (draft-07 form).

RateLimit-PolicystringOptional

The limits this request consumed, as an RFC 8941 list (draft-ietf-httpapi-ratelimit-headers): "submit";q=60;w=60. Policies are submit, upload and daily. Sent only while rate-limit headers are on.

RateLimit-RemainingintegerOptional

Remaining quota of the most restrictive policy (draft-07 form).

RateLimit-ResetintegerOptional
Seconds until the most restrictive policy is whole again.
X-Request-IdstringOptional
Request correlation identifier

Response

Asset stored
created_atdatetime
expires_atdatetime
heightinteger>=1
idstring
media_typeenum
Allowed values:
purposeenum
Allowed values:
size_bytesinteger>=1
widthinteger>=1
livemodebooleanOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
413
Content Too Large Error
415
Unsupported Media Type Error
429
Too Many Requests Error
503
Service Unavailable Error