> ## 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.

# 비가시성 워터마크 삽입 빠른 시작

> 이미지에 비가시성 워터마크 삽입하기

이 가이드는 이미지에 비가시성 워터마크를 삽입하는 과정을 안내합니다 — 주문 생성부터 워터마크가 삽입된 결과물 다운로드까지.

## 사전 준비

* BIZ MORI API 키 ([여기서 발급](https://app.bizmori.com/keys))
* 비가시성 워터마크를 삽입할 파일 (`jpeg`, `jpg`, `png`, `webp`, `tiff`, `bmp`, 또는 `pdf`)

## 1단계: 주문 생성

워터마크 텍스트와 함께 비가시성 워터마크 삽입 주문을 생성합니다.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.bizmori.com/api/v2/orders/wtr-embed \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "idempotencyKey": "01960d3e-a4f2-7b3c-8a1d-4c7e2f9b0a3d",
      "files": [
        {
          "fileName": "photo.jpg",
          "watermarks": [{ "text": "MORI_WATERMARK" }]
        }
      ]
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.bizmori.com/api/v2/orders/wtr-embed', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_TOKEN',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      idempotencyKey: '01960d3e-a4f2-7b3c-8a1d-4c7e2f9b0a3d',
      files: [
        {
          fileName: 'photo.jpg',
          watermarks: [{ text: 'MORI_WATERMARK' }],
        },
      ],
    }),
  });
  const { data } = await response.json();
  ```

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

  res = requests.post(
      'https://api.bizmori.com/api/v2/orders/wtr-embed',
      headers={'Authorization': 'Bearer YOUR_API_TOKEN'},
      json={
          'idempotencyKey': '01960d3e-a4f2-7b3c-8a1d-4c7e2f9b0a3d',
          'files': [
              {
                  'fileName': 'photo.jpg',
                  'watermarks': [{'text': 'MORI_WATERMARK'}],
              }
          ],
      },
  )
  data = res.json()['data']
  ```
</CodeGroup>

**응답:**

```json theme={null}
{
  "data": {
    "orderName": "wtr_embed_2026-03-18",
    "orderId": "123456789",
    "status": "pending",
    "files": [
      {
        "fileId": 1,
        "fileName": "photo.jpg",
        "uploadUrl": "https://s3.amazonaws.com/...",
        "fileKey": "wtr-embed/123456789/images/1/photo.jpg",
        "fileFormat": "JPG",
        "fileType": "IMG"
      }
    ]
  }
}
```

## 2단계: 파일 업로드

1단계 응답의 `uploadUrl`로 파일을 PUT 업로드합니다. **Authorization 헤더는 필요 없습니다** — S3 직접 업로드입니다.

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

<Info>
  **별도의 확인(confirm) 단계가 필요 없습니다.** Anti-AI 및 AI Detection 서비스와 달리, 비가시성 워터마크 삽입은 파일 업로드가 완료되면 처리가 자동으로 시작됩니다. 업로드 후 바로 주문 상태를 확인하시면 됩니다.
</Info>

<Note>
  Presigned URL은 **1시간** 후 만료됩니다. 만료된 경우 [URL 갱신](/ko/api-reference/orders/refresh-urls) 엔드포인트를 사용하여 새 URL을 받으세요.
</Note>

## 3단계: 주문 상태 확인 & 결과 다운로드

주문 상태를 폴링하거나 [웹훅](/ko/webhooks)을 설정하여 처리 완료 알림을 받습니다.

<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();
  // data.status: 'pending' | 'inProgress' | 'complete' | 'failed'
  ```

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

**응답:**

```json theme={null}
{
  "data": {
    "type": "watermarkEmbed",
    "orderId": "123456789",
    "channel": "api",
    "thumbnailImageUrl": "https://s3.amazonaws.com/...",
    "status": "complete",
    "orderName": "wtr_embed_2026-03-18",
    "fileCount": 1,
    "createdAt": "2026-03-18T12:00:00.000Z",
    "updatedAt": "2026-03-18T12:01:30.000Z",
    "errors": null,
    "watermarks": ["MORI_WATERMARK"]
  }
}
```

| 상태           | 의미           |
| ------------ | ------------ |
| `pending`    | 파일 업로드 대기 중  |
| `inProgress` | 처리 중         |
| `complete`   | 완료 (다운로드 가능) |
| `failed`     | 처리 실패        |

상태가 `complete`이면 다운로드 URL을 받습니다:

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

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

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

**응답:**

```json theme={null}
{
  "data": {
    "downloadUrl": "https://s3.amazonaws.com/...",
    "expiresIn": 3600
  }
}
```

`downloadUrl`은 **1시간** 유효한 Presigned S3 URL입니다.

비가시성 워터마크 삽입 API에서 지원하는 옵션과 상세한 설명은 [API 레퍼런스](/ko/api-reference/watermark-embed/create-order)를 참고하세요.

## 에러 처리

| HTTP 상태 코드 | 의미     | 조치                   |
| ---------- | ------ | -------------------- |
| `400`      | 잘못된 요청 | 파라미터 및 파일 형식 확인      |
| `401`      | 인증 실패  | API 키 확인             |
| `429`      | 사용량 초과 | 요청 빈도를 줄이거나 플랜 업그레이드 |

전체 에러 코드는 [에러 코드](/ko/errors) 페이지를 참고하세요.

## 다음 단계

<CardGroup cols={2}>
  <Card title="Anti-AI" icon="shield" href="/ko/quickstart/anti-ai">
    이미지를 AI 학습 및 생성으로부터 보호합니다.
  </Card>

  <Card title="워터마크 검출" icon="magnifying-glass" href="/ko/quickstart/watermark-extract">
    이미지에서 비가시성 워터마크를 검출하고 추출합니다.
  </Card>

  <Card title="AI Detection" icon="robot" href="/ko/quickstart/ai-detection">
    AI 생성 이미지를 확률 점수로 탐지합니다.
  </Card>

  <Card title="웹훅" icon="bell" href="/ko/webhooks">
    처리 완료 시 알림을 받기 위해 웹훅을 설정합니다.
  </Card>
</CardGroup>
