> ## 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 Processed SEM Image

> Retrieve the processed SEM image with the segmentation overlay

Returns the processed SEM image (the original image with the detected pattern overlaid). Use the `return_as` parameter to choose whether the image is returned as raw bytes or as a presigned URL.

<ParamField path="data_id" type="string" required>
  The data entry UUID for the SEM image
</ParamField>

<ParamField query="return_as" type="string" required>
  How to return the image: `bytes` for the raw image bytes, `url-download` for a presigned download URL, or `url-embed` for a presigned URL suitable for embedding
</ParamField>

## Response

When `return_as` is `url-download` or `url-embed`, returns a JSON object describing the image. When `return_as` is `bytes`, returns the raw image bytes.

<ResponseField name="url" type="string">
  Presigned URL for the processed image
</ResponseField>

<ResponseField name="file_name" type="string">
  File name of the processed image
</ResponseField>

<ResponseField name="file_format" type="string">
  Image format (e.g., `png`)
</ResponseField>

<ResponseField name="metadata" type="object">
  Metadata associated with the processed image
</ResponseField>

<RequestExample>
  ```python Python theme={null}
  import requests

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

  ```bash cURL theme={null}
  curl "https://api.atomscale.ai/sem/images/d290f1ee-6c54-4b01-90e6-d701748f0851/processed?return_as=url-embed" \
    -H "X-API-KEY: YOUR_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "url": "https://processed-bucket.s3.amazonaws.com/...",
    "file_name": "sem_image_processed.png",
    "file_format": "png",
    "metadata": {}
  }
  ```
</ResponseExample>
