Upload an image
Get a microscopy image into HalfPage. How the request is sent decides which of the two modes you get:
One request — send multipart/form-data with a file part. The file is
streamed to storage and converted before the response returns, so the
returned image is already ready and its id can go straight into
POST /predict. Simplest, and the right choice up to a few hundred MB.
Resumable — send application/json with {"name": ..., "size": ...}
instead of a file. No bytes are sent on this request; the response carries
upload with presigned part URLs. PUT each chunk directly to its url (in
part order), call POST /upload/{image_id}/complete, then poll
GET /upload/{image_id} until upload_status is ready. Use this for
large files or unreliable connections — an interrupted part can be retried
on its own instead of restarting the whole transfer.
Either way the image counts against your plan’s storage cap, so both modes
return 402 once that cap is reached.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Send the whole file in one request. The response returns the image already ready.
The microscopy image to upload (TIFF). Up to 4 GB.
Response
The file was stored (upload is null, the image is ready), or a resumable upload was opened (upload carries the presigned plan).
The image the pixels landed on (or will land on).
After a single-request upload upload is null and image.upload_status
is already ready — the image.id can go straight into POST /predict.
After a resumable upload was opened, upload carries the presigned plan and
image.upload_status is uploading until you complete it.
An image's upload lifecycle and metadata — enough to know when a freshly
uploaded image is ready to run a prediction against.
The presigned multipart plan: PUT each chunk of the file to its url
(in part order), then call POST /upload/{image_id}/complete — no body
needed, the server verifies the uploaded parts with storage directly.
The internal storage 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.