Skip to main content
POST
/
api
/
embed
/
m-optimus
M-Optimus tile embedding
curl --request POST \
  --url http://localhost:8080/api/embed/m-optimus \
  --header 'Content-Type: application/json' \
  --data '
{
  "image_data": "<base64-png-224x224>",
  "slide_name": "slide_A",
  "x": 0,
  "y": 0,
  "width": 224,
  "height": 224,
  "tissue_ratio": 0.8,
  "patch_idx": 0,
  "resolution": 0.5
}
'
{
  "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.

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

Embedding 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