Create an image record
Create an image record for the resumable upload flow.
Pass resumable: true to open the upload in the same call: the response then
carries upload with presigned part URLs — PUT each chunk of your file to
its URL, call POST /upload/{image_id}/complete, and poll
GET /image/{image_id} until upload_status is ready.
(For files up to a few hundred MB the single-request POST /upload is
simpler still — it creates the record for you and returns it ready.)
The image counts against your plan’s storage cap the moment it is created, so
this returns 402 when the cap is reached — even before any bytes are
uploaded.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The metadata for a new image record. The pixels are uploaded separately;
size is the total byte size of the file you will upload. Set resumable
to also receive the presigned upload plan in the same response.
Server-controlled fields (id, created_by, organization_id,
upload_status) are not accepted here.
Filename or label for the image.
"sample.tif"
Total size of the image file in bytes.
4194304
Image format. Only TIFF is currently supported.
TIFF Arbitrary JSON metadata to store alongside the image.
Optional folder to place the image in; it must belong to your organization. API clients typically have no folders and omit this.
Set to true to also open a resumable upload in the same call: the response then carries upload with presigned part URLs sized for size (so size must be exact). PUT each chunk to its URL, then call POST /upload/{image_id}/complete — no separate /init call needed.
Response
The image record was created; upload the pixels next.
The created image record, plus — when resumable: true was requested —
the presigned upload plan under upload (otherwise null).
Lifecycle of a resumable S3 multipart image upload.
uploading -> row created, bytes still being PUT directly to S3
processing -> object landed in S3, backend is converting it off the event loop
ready -> conversion done, shape populated, image is usable
failed -> aborted or conversion failed (orphan-sweep cron will reap it)
uploading, processing, ready, failed TIFF The presigned multipart plan: PUT each chunk of the file to its url
(in part order), then call /complete — no body needed, the server
verifies the uploaded parts with storage directly.
The internal S3 object key is deliberately not exposed: the presigned urls
already encode everything the client needs, and the key layout is a
server-side implementation detail we keep off the public contract.