Skip to main content
Subscribe to a model on AWS Marketplace, deploy it as a SageMaker endpoint, and run inference either with the bioptimus SDK (recommended) or the raw SageMaker runtime API.
Reference notebooks: h1-jumpstart (H-Optimus) and m-jumpstart (M-Optimus).

1. Subscribe and deploy

1

Subscribe on AWS Marketplace

Subscribe to the model and copy the Model Package ARN for your region.
2

Deploy an endpoint

import sagemaker
from sagemaker import ModelPackage

session = sagemaker.Session()
role = "<YOUR_SAGEMAKER_EXECUTION_ROLE_ARN>"

model = ModelPackage(role=role,
                     model_package_arn="<MODEL_PACKAGE_ARN>",
                     sagemaker_session=session)
predictor = model.deploy(initial_instance_count=1,
                         instance_type="ml.g5.xlarge",
                         endpoint_name="bioptimus-prod")
The SDK’s AWS backend routes through the SageMaker /invocations endpoint and adds the model_name dispatch field for you.
from bioptimus.models.backbones import Backbone, Models

model = Backbone(
    Models.M_OPTIMUS,       # or Models.H1, Models.TISSUE_SEG
    backend="aws",
    endpoint_name="bioptimus-prod",
    region_name="us-east-1",
)
For whole-slide inference (tiling, tissue masking, bulk RNA, output formats), see the SDK guide.

3. Or call the runtime API directly

A SageMaker request is a ModelRequest plus model_name and mode fields. See the API reference for the full schema.

4. Clean up

Endpoints incur charges while running. Delete the endpoint when finished.
predictor.delete_endpoint()