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

# Get SEM Mask

> Retrieve the RLE-encoded segmentation mask for an SEM image

Returns the detected segmentation mask for an SEM image, encoded using run-length encoding (RLE). The mask identifies the features segmented from the image during processing.

**data\_id** `string` *required*

The data entry UUID for the SEM image

## Response

**mask\_rle** `string`

Run-length encoded mask data

**mask\_height** `integer`

Height of the mask in pixels

**mask\_width** `integer`

Width of the mask in pixels

**color** `array`

RGBA color for visualizing the mask

```python Python theme={null}
import requests

response = requests.get(
    "https://api.atomscale.ai/sem/images/d290f1ee-6c54-4b01-90e6-d701748f0851/mask",
    headers={"X-API-KEY": "YOUR_API_KEY"}
)
mask = response.json()
```

```bash cURL theme={null}
curl "https://api.atomscale.ai/sem/images/d290f1ee-6c54-4b01-90e6-d701748f0851/mask" \
  -H "X-API-KEY: YOUR_API_KEY"
```

```json 200 theme={null}
{
  "mask_rle": "0 100 1 50 0 200 ...",
  "mask_height": 1024,
  "mask_width": 1024,
  "color": [0, 0, 255, 0.2]
}
```


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