Skip to main content
POST
Initiate a resumable upload

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
filename
string
required
fileSize
integer
required

Declared whole-object bytes. The S3 single-PUT application cap is 5,000,000,000 bytes; the GCS resumable cap remains 50 GiB. Larger files are rejected before presigning.

contentType
string
required
contentSha256
string

Optional client-computed SHA-256. On a match within the calling organization, the response returns the existing upload and skips byte transfer.

Pattern: ^[0-9a-f]{64}$
modality
enum<string>
default:H&E

Explicit slide modality. Native IHC samples cannot run Lattice.

Available options:
H&E,
IHC
stainTarget
string

Optional stain target for native IHC.

Required string length: 1 - 500
autoSegment
boolean

Opt out of automatic cell segmentation for this upload. Defaults to the organization's autoSegmentDefault (true unless changed). When false, the slide is ingested and rendered but no segmentation job runs; marker runs still work but without cell-level readouts until segmented.

mpp

Optional user-reported microns per pixel, for callers that already know their slide's scale. Slides are isotropic: pass a number, or an { x, y } object whose axes are equal (anisotropic input is rejected). Persisted on the sample at creation and takes precedence over the slide's own calibrated value, so POST /predict works as soon as preprocessing finishes — no follow-up PATCH /samples/{id} needed. Ignored when contentSha256 deduplicates to an existing sample (that sample's scale stands).

Required range: 0 < x <= 100

Response

Resumable upload URL

existing
enum<boolean>
required

True when contentSha256 matched an existing active upload in the same organization.

Available options:
true
uploadId
string<uuid>
required
gcsPath
string
required
uploadUrl
string | null

Server-selected URL for GCS/single PUT; null for multipart, omitted on dedup.

uploadTransport
enum<string>

Server-selected protocol, 50 GiB application cap. GCS uses resumable Content-Range. Small S3 files use one known-length PUT; S3 multipart uses bounded SHA256-verified UploadParts followed by the owned complete endpoint. Never send API Authorization or Content-Range to S3.

Available options:
gcs_resumable,
s3_presigned_put,
s3_multipart
multipart
object