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

# 워터마크 추출 주문 생성

> 파일 1개에서 비가시성 워터마크를 검사하는 주문을 생성합니다.

- 요청마다 원본 파일과 검사할 파일을 함께 제출합니다
- 이미지 원본은 `jpg`, `jpeg`, `png`, `webp`, `bmp`, `tif`, `tiff` 검사 파일을, PDF 원본은 PDF·PNG·JPEG 검사 파일을 받습니다
- BMP·TIFF의 처리 가능 범위는 워터마크 삽입과 같습니다. 처리할 수 없는 파일은 주문이 `failed`가 아니라 `complete`로 끝나고 `detectionStatus`가 `unsupported`이며 크레딧은 환불됩니다
- 응답 `files[]`는 2개입니다. `files[0]`은 원본, `files[1]`은 검사 파일이며 각각 `uploadUrl`로 `PUT` 업로드합니다
- 두 파일 업로드가 끝나면 처리가 자동으로 시작됩니다. 주문당 1크레딧을 사용하며 `unsupported`·`error` 결과는 환불됩니다
- 결과는 [`GET /api/v3/orders/{orderId}`](/ko/api-reference/orders/get-order-v3)의 `result`에서 확인합니다




## OpenAPI

````yaml ko/api-reference/openapi.yaml POST /api/v3/orders/wtr-extract
openapi: 3.0.0
info:
  title: BIZ MORI API
  version: 2.0.0
  description: >
    BIZ MORI API는 디지털 콘텐츠 보호를 위한 네 가지 핵심 서비스를 제공합니다:

    - **Anti-AI**: 이미지를 AI 학습으로부터 보호

    - **Watermark Embed**: 이미지에 보이지 않는 디지털 워터마크 삽입

    - **Watermark Extract**: 이미지에서 워터마크 추출 및 검증

    - **AI Detection**: 이미지가 AI로 생성되었는지 감지

    - **테스트 API 키**: `sk_test_` 접두사의 키는 동일한 Bearer 인증을 사용하며, 실제 처리 서비스나 크레딧 사용
    없이 주문 흐름을 검증할 수 있습니다. 테스트 업로드는 파일 내용을 폐기하고 결과 파일을 만들지 않습니다
  contact:
    name: BIZ MORI 지원
    email: support@bizmori.com
  license:
    name: Proprietary
    url: https://docs.bizmori.com/legal/terms
servers:
  - url: https://api.bizmori.com
    description: 프로덕션
security: []
tags:
  - name: Anti-AI
    description: AI 학습 방지 이미지 보호 주문
  - name: Watermark Embed
    description: 워터마크 삽입 주문
  - name: Watermark Extract
    description: 워터마크 추출 주문
  - name: AI Detection
    description: AI 생성 이미지 감지 주문
  - name: Orders
    description: 주문 조회 및 관리
  - name: Webhooks
    description: 웹훅 설정 및 이벤트
  - name: Reports
    description: 워터마크 추출·AI Detection 주문의 PDF 분석 보고서
paths:
  /api/v3/orders/wtr-extract:
    post:
      tags:
        - Watermark Extract
      summary: 워터마크 추출 주문 생성
      description: >
        파일 1개에서 비가시성 워터마크를 검사하는 주문을 생성합니다.


        - 요청마다 원본 파일과 검사할 파일을 함께 제출합니다

        - 이미지 원본은 `jpg`, `jpeg`, `png`, `webp`, `bmp`, `tif`, `tiff` 검사 파일을, PDF
        원본은 PDF·PNG·JPEG 검사 파일을 받습니다

        - BMP·TIFF의 처리 가능 범위는 워터마크 삽입과 같습니다. 처리할 수 없는 파일은 주문이 `failed`가 아니라
        `complete`로 끝나고 `detectionStatus`가 `unsupported`이며 크레딧은 환불됩니다

        - 응답 `files[]`는 2개입니다. `files[0]`은 원본, `files[1]`은 검사 파일이며 각각
        `uploadUrl`로 `PUT` 업로드합니다

        - 두 파일 업로드가 끝나면 처리가 자동으로 시작됩니다. 주문당 1크레딧을 사용하며 `unsupported`·`error` 결과는
        환불됩니다

        - 결과는 [`GET
        /api/v3/orders/{orderId}`](/ko/api-reference/orders/get-order-v3)의
        `result`에서 확인합니다
      operationId: createWatermarkV1ExtractOrder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - idempotencyKey
                - file
              properties:
                idempotencyKey:
                  type: string
                  maxLength: 255
                  description: >-
                    멱등성 키. 새 주문마다 새 UUIDv4를 쓰고, 같은 요청을 재시도할 때만 재사용합니다. 같은 키는 기존
                    주문을 반환하며, 같은 키로 다른 요청 본문을 보내면 `409 WATERMARK_V2_CONFLICT`를
                    반환합니다.
                file:
                  type: object
                  required:
                    - fileName
                    - originalFile
                  description: 검사할 파일
                  properties:
                    fileName:
                      type: string
                      maxLength: 255
                      description: 확장자를 포함한 검사 파일명
                    originalFile:
                      type: object
                      required:
                        - fileName
                      description: 워터마크를 삽입했던 원본 파일
                      properties:
                        fileName:
                          type: string
                          maxLength: 255
            example:
              idempotencyKey: 6c3b9f7e-2d41-4a8e-9b5f-0e1d2c3b4a59
              file:
                fileName: suspect.png
                originalFile:
                  fileName: campaign.png
      responses:
        '200':
          description: 원본 파일과 검사 파일의 업로드 URL과 함께 주문 생성
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WatermarkV1OrderResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          description: 같은 `idempotencyKey`로 다른 요청 본문을 보냄
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: WATERMARK_V2_CONFLICT
        '429':
          description: 요청 횟수 초과
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: RATE_LIMIT_EXCEEDED
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          description: 워터마크 처리를 일시적으로 사용할 수 없음
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: WATERMARK_V2_UNAVAILABLE
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |
            curl -X POST https://api.bizmori.com/api/v3/orders/wtr-extract \
              -H "Authorization: Bearer YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
              "idempotencyKey": "6c3b9f7e-2d41-4a8e-9b5f-0e1d2c3b4a59",
              "file": {
                "fileName": "suspect.png",
                "originalFile": {
                  "fileName": "campaign.png"
                }
              }
            }'
        - lang: javascript
          label: JavaScript
          source: >
            const response = await
            fetch(`https://api.bizmori.com/api/v3/orders/wtr-extract`, {
              method: 'POST',
              headers: {
                'Authorization': 'Bearer YOUR_API_KEY',
                'Content-Type': 'application/json'
              },
              body: JSON.stringify({
                "idempotencyKey": "6c3b9f7e-2d41-4a8e-9b5f-0e1d2c3b4a59",
                "file": {
                  "fileName": "suspect.png",
                  "originalFile": {
                    "fileName": "campaign.png"
                  }
                }
              })
            });

            const { data } = await response.json();
        - lang: python
          label: Python
          source: |
            import requests

            response = requests.post(
                f'https://api.bizmori.com/api/v3/orders/wtr-extract',
                headers={'Authorization': 'Bearer YOUR_API_KEY'},
                json={
                  "idempotencyKey": "6c3b9f7e-2d41-4a8e-9b5f-0e1d2c3b4a59",
                  "file": {
                    "fileName": "suspect.png",
                    "originalFile": {
                      "fileName": "campaign.png"
                    }
                  }
                }
            )
            data = response.json()['data']
components:
  schemas:
    WatermarkV1OrderResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/WatermarkV1Order'
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: 에러 코드
    WatermarkV1Order:
      type: object
      description: v3 API로 생성한 비가시성 워터마크 주문
      required:
        - orderId
        - status
        - processingDelayed
        - files
        - outputs
        - result
        - reports
      properties:
        orderId:
          type: string
          description: 주문 ID
        status:
          type: string
          enum:
            - pending
            - inProgress
            - complete
            - failed
            - expired
          description: |
            주문 처리 상태

            * `pending` - 파일 업로드 대기
            * `inProgress` - 처리 중
            * `complete` - 처리 완료. 추출 주문은 `result`에서 결과를 확인합니다
            * `failed` - 처리 실패, 또는 12시간 안에 업로드되지 않음
            * `expired` - 보관 기한이 지나 파일이 삭제됨
        processingDelayed:
          type: boolean
          description: 자동 재시도를 모두 소진해 수동 복구를 기다리면 `true`. 주문은 `inProgress`로 유지됩니다
        expiresAt:
          type: string
          format: date-time
          nullable: true
          description: 주문 파일이 삭제되는 시각. 이후 다운로드와 보고서는 `ORDER_EXPIRED`를 반환합니다
        files:
          type: array
          description: 요청 순서의 입력 파일. 추출 주문은 원본, 검사 파일 순서입니다
          items:
            $ref: '#/components/schemas/WatermarkV1UploadFile'
        outputs:
          type: array
          description: 삽입 결과. 워터마크 문구마다 1개이며 추출 주문은 빈 배열입니다
          items:
            $ref: '#/components/schemas/WatermarkV1Output'
        result:
          $ref: '#/components/schemas/WatermarkV1DetectionResult'
        reports:
          type: array
          description: 이 주문으로 요청한 보고서
          items:
            type: object
            required:
              - locale
              - status
            properties:
              locale:
                type: string
                enum:
                  - ko-KR
                  - en-US
                  - ja-JP
              status:
                type: string
                enum:
                  - queued
                  - processing
                  - completed
                  - failed
    WatermarkV1UploadFile:
      type: object
      required:
        - fileId
        - uploadUrl
      properties:
        fileId:
          type: string
          description: 입력 파일 ID
        uploadUrl:
          type: string
          format: uri
          nullable: true
          description: >
            파일 업로드용 presigned `PUT` URL(900초 유효). 주문 `status`가 `pending`이고 보관 기한
            전이며 업로드 대기 중인 파일에만 발급합니다.

            `originalFileUrl`로 지정한 파일, 업로드가 끝난 파일, 12시간 업로드 기한을 넘겨 `failed`가 된
            주문, 보관 기한이 지난 주문은 `null`입니다.
    WatermarkV1Output:
      type: object
      required:
        - fileId
        - inputFileId
        - outputIndex
        - watermarkText
        - status
        - mediaKind
      properties:
        fileId:
          type: string
          description: '`{inputFileId}-{순번}` 형식의 결과 파일 ID(`outputs[].fileId`)'
        inputFileId:
          type: string
          description: 이 결과를 만든 입력 파일 ID
        outputIndex:
          type: integer
          minimum: 0
          description: 입력 파일 `watermarks` 안에서 해당 문구의 위치
        watermarkText:
          type: string
          description: 삽입한 워터마크 문구
        status:
          type: string
          enum:
            - pending
            - queued
            - processing
            - completed
            - failed
            - retry_required
          description: 이 결과 파일의 처리 상태
        mediaKind:
          type: string
          enum:
            - image
            - pdf
    WatermarkV1DetectionResult:
      type: object
      nullable: true
      description: 추출 결과 요약. 삽입 주문과 결과가 나오기 전에는 `null`이며 아래 필드만 포함합니다
      required:
        - detectionStatus
        - reportSupported
        - watermarkText
      additionalProperties: false
      properties:
        detectionStatus:
          type: string
          enum:
            - detected
            - not_detected
            - inconclusive
            - unsupported
            - error
          description: |
            * `detected` - 워터마크를 찾음
            * `not_detected` - 끝까지 검사했으나 워터마크 없음
            * `inconclusive` - 후보는 있으나 확신 기준 미달로 판단 불가
            * `unsupported` - 처리할 수 없는 입력 (크레딧 환불)
            * `error` - 검출 처리 실패, 워터마크 없음과 다름 (크레딧 환불)
        reportSupported:
          type: boolean
          description: 이 결과로 보고서를 만들 수 있는지 여부. PDF에서 캡처한 이미지는 `false`
        watermarkText:
          type: string
          nullable: true
          description: >
            검출된 워터마크의 삽입 문구. `detectionStatus`가 `detected`이고, 호출 계정이 직접 삽입했으며 발급
            기록이 정확히 1건일 때만 반환합니다.

            다른 계정이 삽입한 워터마크 등 그 외에는 `null`입니다.
  responses:
    BadRequest:
      description: 잘못된 요청
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: VALIDATION_FAILED
    Unauthorized:
      description: 인증 실패
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: AUTH_NOT_AUTHENTICATED
    InternalError:
      description: 내부 서버 오류
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: SERVER_INTERNAL_ERROR
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        외부 클라이언트 접근을 위한 Bearer API 키. 일반 키는 `sk_` 접두사를 사용하고, 테스트 키는 `sk_test_`
        접두사로 모의 응답을 사용해 실제 처리나 크레딧 사용 없이 주문 흐름을 검증합니다.

````

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