> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bioptimus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Pick your model and platform, then run your first inference.

Three steps: deploy a model, connect the Bioptimus SDK, and run your first inference.

> [!NOTE]
>
> Not sure which model? **M-Optimus-1** predicts spatial gene expression and also produces embeddings; **H-Optimus-1** is the lighter, feature-only model. See [M-Optimus](https://docs.bioptimus.com/documentation/models/m-optimus.md) and [H-Optimus](https://docs.bioptimus.com/documentation/models/h-optimus.md).

## 1. Deploy your model

Deploy on the platform that fits your use case — each guide has the full steps:

| Platform | Best for | Guide |
| - | - | - |
| **AWS SageMaker** | Production pipelines and scale | [Deploy →](https://docs.bioptimus.com/deployment/platforms/aws-sagemaker.md) |
| **On-premise** | Data residency, air-gapped sites | [Deploy →](https://docs.bioptimus.com/deployment/platforms/on-premise.md) |
| **Hugging Face** | Non-commercial academic, H-Optimus only | [Load weights →](https://docs.bioptimus.com/deployment/platforms/hugging-face.md) |
| **Proscia** | Slides already in a Concentriq® LS workspace | [Generate embeddings →](https://docs.bioptimus.com/deployment/platforms/proscia.md) |

We recommend a real-time endpoint on `ml.g5.xlarge` (or the on-premise container) — the models are compiled for that GPU architecture (NVIDIA A10G, CUDA Compute Capability 8.6).

## 2. Connect the Bioptimus SDK

Point the [Bioptimus SDK](https://docs.bioptimus.com/guides/get-started/sdk.md) at your deployment (use `Models.H1` or `Models.M_OPTIMUS`):

```python On-premise theme={null}
from bioptimus.models.backbones import Backbone
from bioptimus.models.types import Models

model = Backbone(Models.M_OPTIMUS, backend="remote", base_url="http://localhost:8080")
```

```python AWS SageMaker theme={null}
from bioptimus.models.backbones import Backbone
from bioptimus.models.types import Models

model = Backbone(Models.M_OPTIMUS, backend="aws",
                 endpoint_name="m-optimus", region_name="us-east-1")
```

> [!NOTE]
>
> **Academic (Hugging Face) users** load H-Optimus-1 directly with `timm` instead of the Bioptimus SDK — see [Hugging Face](https://docs.bioptimus.com/deployment/platforms/hugging-face.md).

## 3. Get your first embedding

Send a single 224×224 tile through the connected model to confirm the full path works:

```python H-Optimus theme={null}
import numpy as np
from PIL import Image
from bioptimus.inference.schemas import ModelRequest

# Replace the blank tile with a real 224×224 H&E tile at 0.5 µm/pixel.
tile = Image.fromarray(np.zeros((224, 224, 3), dtype=np.uint8))
request = ModelRequest(image_data=tile, slide_name="demo",
                       x=0, y=0, width=224, height=224, patch_idx=0)

response = model.embed(request)
print(len(response.output))   # 1536
```

```python M-Optimus theme={null}
import numpy as np
from PIL import Image
from bioptimus.inference.schemas import ModelRequest

# Replace the blank tile with a real 224×224 H&E tile at 0.5 µm/pixel.
tile = Image.fromarray(np.zeros((224, 224, 3), dtype=np.uint8))
request = ModelRequest(image_data=tile, slide_name="demo",
                       x=0, y=0, width=224, height=224, patch_idx=0)

response = model.predict(request)   # spatial gene expression for the tile
print(len(response.output))         # one value per output gene
```

For whole-slide inference — tiling, tissue masking, and writing results — see the [Bioptimus SDK](https://docs.bioptimus.com/guides/get-started/sdk.md).

## Next steps

> [card] [Bioptimus SDK](https://docs.bioptimus.com/guides/get-started/sdk.md)
>
> Whole-slide inference: tiling, tissue masking, bulk RNA, and output formats.

> [card] [Runnable notebooks](https://github.com/bioptimus)
>
> End-to-end examples: [`h1-jumpstart`](https://github.com/bioptimus/h1-jumpstart) (H-Optimus) and [`m-jumpstart`](https://github.com/bioptimus/m-jumpstart) (M-Optimus).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.