> This page is for VISTA-3D, version 1.0.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 1.0.0 (Latest) (default): https://docs.nvidia.com/nim/medical/vista3d/1.0.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nim/medical/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nim/medical/_mcp/server.

# API Reference

Vista3d NIM provides following API endpoints:

* `GET`: /v1/health/live - Check if service is alive (might not be ready yet)
* `GET`: /v1/health/ready - Check if service is ready and model is ready for inference
* `GET`: /v1/license - Return the license for the NIM
* `GET`: /v1/vista3d/info - Fetch detailed information about the model such as version and labels
* `POST`: /v1/vista3d/inference - Run Inference function of a model for segmenting and annotating human anatomies

## Inference Request Payload

The inference request payload is defined as follows:

* `"image"`: This field requires a valid URL that points to a 3D medical image in either NIfTI or NRRD format. The URL should be accessible and correctly formatted to ensure the image can be retrieved for processing. For example, a valid URL might look like:

```
https://assets.ngc.nvidia.com/products/api-catalog/vista3d/example-1.nii.gz
```

- `"Prompts`: This optional field allows users to provide specific prompts for running interactive annotation. The prompts are given in the form of a dictionary with two possible keys:
    1. `"classes"`: A list of label names or indices that serve as class prompts. This list can contain strings (e.g., ["spleen", "liver"]) or integers (e.g., [3, 1]).
    2. `"points"`: A dictionary where the keys are label names or indices, and the values are lists of tuples representing user click points. Each tuple contains three integers corresponding to the coordinates `(x, y, z)` of a point. For example, `{"spleen": [(123, 212, 151), (123, 212, 152)]}`.

* `"local_working_dir"`: This optional field allows users to provide a mounted volume for saving inference results. If the directory is `/path/on/host/results/`, then in the inference request payload, `local_working_dir` should be `/path/in/container/results/`.

Here is an example of a complete payload:

```Python
{
    "image": "https://assets.ngc.nvidia.com/products/api-catalog/vista3d/example-1.nii.gz",
    "prompts": {"classes": ["spleen"], "points": {"spleen": [[123, 212, 151], [123, 212, 152]]}},
    "local_working_dir": "/path/in/container/results/"
}
```

## Inference Example

To perform an inference request using the defined payload, you can use the following Python code:

```Python
import requests

base_url = 'http://localhost:8000/v1'

data = {
    "image": "https://assets.ngc.nvidia.com/products/api-catalog/vista3d/example-1.nii.gz",
    "prompts": {
        "classes": ["spleen"],
        "points": {"spleen": [(123, 212, 151), (123, 212, 152)]}
    }
}

response = requests.post(f"{base_url}/vista3d/inference", json=data)
```

Please refer to [getting-started.md](/nim/medical/vista3d/getting-started) for more examples.