> For the complete documentation index, see [llms.txt](https://docs.imerit.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imerit.net/how-to/export-data/download-your-segmentation-masks.md).

# Download your Segmentation Masks

{% hint style="info" %}
This feature is currently available for all image and video assets except DICOM.

To download DICOM segmentation masks, please follow the instructions [on this page](/how-to/export-data/download-dicom-segmentation-masks.md).
{% endhint %}

1. After having uploaded and annotated your image files with a [Brush](/labeling/labeling-tools/tools/brush-bucket.md) or [Segmentation](/labeling/labeling-tools/tools/segmentation.md) labeling tool, go to the *Export* tab.
2. Click on *Export* to get the export.
3. In the export .json you've just downloaded, you'll find a URL in the `masks` field. It'll look something like this: `"masks": "https://api.ango.ai/v2/mask?annotation=8ff014e7e3c364e550c0303&task=63ff1df98027bc0012ce4c21"`
4. Go to your [account page](https://imerit.ango.ai/account) and, from the API tab, retrieve your API key. If you don't have one, you'll be able to create one from the page as well.
5. Send a GET request to the URL you obtained in step 3, adding as header your API key.
   1. For example, using `curl`, you may send the following request to download the PNG of your brush data:

```
curl --location --request GET 'https://api.ango.ai/v2/mask?annotation=8ff014e7e3c364e550c0303&task=63ff1df98027bc0012ce4000' --header 'apikey: 15d3939b-0000-0000-0000-7de7f4f6ad43' --output mask.png
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.imerit.net/how-to/export-data/download-your-segmentation-masks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
