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

# Watermark Extract Quickstart

> Detect and extract watermarks from images

This guide walks you through detecting a watermark in an image — from creating an order to reading the extraction result.

## Prerequisites

* A BIZ MORI API key ([get one here](https://app.bizmori.com/keys))
* A watermarked image file (`jpeg`, `jpg`, `png`, `webp`, `bmp`, or `tiff`) or PDF

## Step 1: Create an order

Create a watermark extraction order with your file.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.bizmori.com/api/v2/orders/wtr-extract \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "idempotencyKey": "my-extract-001",
      "file": {
        "fileName": "watermarked.jpg"
      }
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.bizmori.com/api/v2/orders/wtr-extract', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_TOKEN',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      idempotencyKey: 'my-extract-001',
      file: {
        fileName: 'watermarked.jpg',
      },
    }),
  });
  const { data } = await response.json();
  ```

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

  res = requests.post(
      'https://api.bizmori.com/api/v2/orders/wtr-extract',
      headers={'Authorization': 'Bearer YOUR_API_TOKEN'},
      json={
          'idempotencyKey': 'my-extract-001',
          'file': {
              'fileName': 'watermarked.jpg',
          },
      },
  )
  data = res.json()['data']
  ```
</CodeGroup>

**Response:**

```json theme={null}
{
  "data": {
    "orderName": "wtr_extract_2026-03-18",
    "orderId": "123456789",
    "file": {
      "fileId": 1,
      "fileName": "watermarked.jpg",
      "uploadUrl": "https://s3.amazonaws.com/...",
      "fileKey": "123/456/watermarked.jpg"
    }
  }
}
```

<Tip>
  You can include the original (pre-watermarked) image for more accurate extraction. Set `"includeOriginal": true` and provide `"originalFile": { "fileName": "original.jpg" }` in the request. This option is available for images only, not PDFs.
</Tip>

## Step 2: Upload the file

PUT your file to the presigned `uploadUrl` from Step 1. This is a direct S3 upload — **no Authorization header needed**.

```bash cURL theme={null}
curl -X PUT "https://s3.amazonaws.com/..." \
  -H "Content-Type: image/jpeg" \
  --data-binary @watermarked.jpg
```

<Info>
  **No confirm step needed.** Like Watermark Embed, Watermark Extract processing starts automatically after your file upload completes. Proceed directly to checking the result.
</Info>

<Note>
  Presigned URLs expire after **1 hour**. If yours has expired, use the [Refresh URLs](/api-reference/orders/refresh-urls) endpoint to generate new ones.
</Note>

## Step 3: Check the result

Poll the order or use [webhooks](/webhooks) to receive a push notification when extraction completes.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.bizmori.com/api/v2/orders/123456789 \
    -H "Authorization: Bearer YOUR_API_TOKEN"
  ```

  ```javascript Node.js theme={null}
  const res = await fetch('https://api.bizmori.com/api/v2/orders/123456789', {
    headers: { 'Authorization': 'Bearer YOUR_API_TOKEN' },
  });
  const { data } = await res.json();
  ```

  ```python Python theme={null}
  res = requests.get(
      'https://api.bizmori.com/api/v2/orders/123456789',
      headers={'Authorization': 'Bearer YOUR_API_TOKEN'},
  )
  data = res.json()['data']
  ```
</CodeGroup>

**Response (watermark detected):**

```json theme={null}
{
  "data": {
    "type": "watermarkExtract",
    "orderId": "123456789",
    "status": "detected",
    "statusCode": "detected",
    "watermarkText": "MORI_WATERMARK"
  }
}
```

**Response (no watermark found):**

```json theme={null}
{
  "data": {
    "type": "watermarkExtract",
    "orderId": "123456789",
    "status": "undetected",
    "statusCode": "undetected",
    "watermarkText": null
  }
}
```

| Status       | Meaning                                                        |
| ------------ | -------------------------------------------------------------- |
| `detected`   | Watermark found — check `watermarkText` for the extracted text |
| `undetected` | No watermark detected in the image                             |
| `failed`     | Extraction failed                                              |

## Error handling

| HTTP Status | Meaning               | Action                                   |
| ----------- | --------------------- | ---------------------------------------- |
| `400`       | Invalid request       | Check parameters and file format         |
| `401`       | Authentication failed | Verify your API key                      |
| `429`       | Rate limit exceeded   | Reduce request frequency or upgrade plan |

For the complete error code reference, see [Error Codes](/errors).

## Next steps

<CardGroup cols={2}>
  <Card title="Anti-AI" icon="shield" href="/quickstart/anti-ai">
    Protect images from AI training and generation.
  </Card>

  <Card title="Watermark Embed" icon="stamp" href="/quickstart/watermark-embed">
    Embed invisible watermarks into images.
  </Card>

  <Card title="AI Detection" icon="robot" href="/quickstart/ai-detection">
    Detect AI-generated images with probability scores.
  </Card>

  <Card title="Webhooks" icon="bell" href="/webhooks">
    Set up webhooks to get notified when processing completes.
  </Card>
</CardGroup>
