> ## 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.

# Validation & acceptance testing

> Verify a deployment produces correct, expected outputs.

Use these checks after deploying ([on-premise](/deployment/platforms/on-premise) or [SageMaker](/deployment/platforms/aws-sagemaker)) to confirm the service is healthy and producing expected results.

## 1. Service health

<CodeGroup>
  ```bash H-Optimus package theme={null}
  curl -s http://localhost:8080/ping | python3 -m json.tool
  # {"status": "ok", "models": ["h1", "tissue-seg"]}
  ```

  ```bash M-Optimus package theme={null}
  curl -s http://localhost:8080/ping | python3 -m json.tool
  # {"status": "ok", "models": ["m-optimus", "tissue-seg"]}
  ```
</CodeGroup>

## 2. Model availability (SDK)

`available_backbones()` lists the models the Bioptimus SDK can construct (read from its bundled configs) — it does not query the server. The `/ping` response in step 1 is the source of truth for what the deployed endpoint actually serves.

```python theme={null}
from bioptimus.models.backbones import Backbone
print(Backbone.available_backbones())
# ['h1', 'm-optimus', 'tissue-seg']
```

## 3. Synthetic-tile verification (recommended)

One command runs steps 1–4 together: it sends a synthetic tile through the endpoint and checks that the request succeeds (auth and routing), that the output matches the model's declared contract (length, no NaN/infinity, correct tile echoed back), and reports an error code plus a fix for anything that fails.

<CodeGroup>
  ```bash On-premise / remote theme={null}
  bioptimus verify --model h1 --backend remote --base-url http://localhost:8080
  # h1 on remote: ok (4 checks)
  ```

  ```bash SageMaker theme={null}
  bioptimus verify --model m-optimus --backend aws \
      --endpoint-name my-endpoint --region-name eu-north-1
  ```

  ```python SDK theme={null}
  from bioptimus.observability.healthcheck import verify_endpoint

  report = verify_endpoint("h1", "remote", base_url="http://localhost:8080")
  print(report.summary())
  for check in report.failures:
      print(check.name, check.error_code, check.remediation)
  ```
</CodeGroup>

The command exits non-zero when any check fails; add `--json` for machine-readable output in a deployment pipeline. It issues one real inference request.

## 4. Output shape checks

| Model | Expected output length |
| - | - |
| H-Optimus (`/api/embed/h1`) | 1536 |
| M-Optimus embedding | 1536 |
| M-Optimus prediction | number of output genes (see `/api/metadata/m-optimus`) |
| Tissue segmentation | H×W (262,144 for a 512×512 tile) |


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