Skip to navigation

API Reference

View as Markdown

MAISI 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/maisi/info - Fetch detailed information about the model such as version and labels
  • POST: /v1/maisi/run - Generate CT images with paired segmentation masks

Payload Options

ParameterRequiredTypeDescriptionOptions/Range
num_output_samplesYesIntegerNumber of images to generatePositive integer
body_regionYesList of StringsTarget body regions[“head”, “chest”, “thorax”, “abdomen”, “pelvis”, “lower”]
anatomy_listNoList of StringsSpecific anatomical structuresSee Supported Anatomy section
output_sizeNoList of 3 IntegersImage dimensions (x, y, z)x, y: 256, 384, 512
z: 128, 256, 384, 512, 640, 768
spacingNoList of 3 FloatsVoxel spacingEach value: 0.5 to 5.0
controllable_anatomy_sizeNoList of Tuples (String, Float) for organ name and sizeOrgan size control (max 10)Organs: [“liver”, “gallbladder”, “stomach”, “pancreas”, “colon”, “lung tumor”, “bone lesion”, “hepatic tumor”, “colon cancer primaries”, “pancreatic tumor”]
Size: 0.0 to 1.0, or -1 (remove)
pre_signed_urlNoStringURL for result upload-
local_working_dirNoStringIf specified, the generated images will be saved in the provided directory.-
image_output_extNoStringOutput file extensionSupported extensions: “.nrrd”, “.nii”, “.nii.gz”, “.dcm”. Default: “.nii.gz”
label_output_extNoStringOutput file extensionSupported extensions: “.nrrd”, “.nii”, “.nii.gz”, “.dcm”. Default: “.nii.gz”

Supported Anatomy

You can find all of the classes available in the model in the MAISI label_dict.json.

Based on the statistics of the training data, we recommend the following input parameters for the body regions included in the training data. The recommended output_size is the median value of the training data, and the recommended spacing is calculated as the median Field of View (FOV) divided by the recommended output_size.

body_regionoutput_sizespacing [mm]
[‘chest’, ‘abdomen’][512, 512, 128][0.781, 0.781, 2.981]
[‘chest’][512, 512, 128][0.684, 0.684, 2.422]
[‘chest’, ‘abdomen’, ‘lower’][512, 512, 256][0.793, 0.793, 1.826]
[‘lower’][512, 512, 384][0.839, 0.839, 0.728]
[‘abdomen’, ‘lower’][512, 512, 384][0.808, 0.808, 0.729]
[‘head’, ‘chest’, ‘abdomen’][512, 512, 384][0.977, 0.977, 2.103]
[‘abdomen’][512, 512, 128][0.723, 0.723, 1.182]
[‘head’, ‘chest’, ‘abdomen’, ‘lower’][512, 512, 384][1.367, 1.367, 4.603]
[‘head’, ‘chest’][512, 512, 128][0.645, 0.645, 2.219]

If users want to try different "output_size", please adjust "spacing" to ensure a reasonable FOV, which is the product of "output_size" and "spacing".

Please refer to Getting Started for more examples.