Skip to main content
POST
/
invocations
SageMaker dispatch endpoint
curl --request POST \
  --url http://localhost:8080/invocations \
  --header 'Content-Type: application/json' \
  --data '
{
  "model_name": "h1",
  "mode": "embedding",
  "image_data": "<base64>",
  "slide_name": "slide_A",
  "x": 0,
  "y": 0,
  "width": 224,
  "height": 224,
  "patch_idx": 0
}
'
{
  "output": [
    123
  ],
  "slide_name": "<string>",
  "x": 123,
  "y": 123,
  "width": 123,
  "height": 123,
  "tissue_ratio": 123,
  "patch_idx": 123,
  "resolution": 123
}

Body

application/json
image_data
string
required

Base64-encoded PNG tile. (The SDK also accepts a PIL Image or raw bytes.)

slide_name
string
required

Stem of the source slide filename.

x
integer
required

Tile x-coordinate in the slide.

y
integer
required

Tile y-coordinate in the slide.

width
integer
required

Tile width in pixels.

height
integer
required

Tile height in pixels.

patch_idx
integer
required

Index of this tile in the extraction plan.

model_name
enum<string>
required

Target model.

Available options:
h1,
m-optimus,
tissue-seg
mode
enum<string>
required

Dispatch mode.

Available options:
embedding,
prediction,
metadata
bulk_rna
number[] | null

Optional bulk RNA counts vector (M-Optimus prediction only).

tissue_ratio
number | null

Fraction of tissue in the tile.

resolution
number | null

Extraction resolution in microns per pixel.

Response

Inference result

output
number[]

Model output vector: embeddings (1536), gene predictions, or a flattened mask.

slide_name
string
x
integer
y
integer
width
integer
height
integer
tissue_ratio
number | null
patch_idx
integer
resolution
number | null