> ## 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 抽出注文を作成

> watermark 抽出注文を作成します。
- 注文あたりファイル1つのみ
- 画像（jpg, jpeg, png, webp, bmp, tiff）またはPDFファイルに対応
- 画像の場合、`includeOriginal: true` で元ファイルも一緒にアップロード可能
- PDFは `includeOriginal` に非対応



## OpenAPI

````yaml ja/api-reference/openapi.yaml POST /api/v2/orders/wtr-extract
openapi: 3.0.0
info:
  title: BIZ MORI API
  version: 2.0.0
  description: >-
    BIZ MORI API は、デジタルコンテンツ保護のための4つのコアサービスを提供します:

    - **Anti-AI**: 画像をAI学習から保護

    - **Watermark Embed**: 画像に不可視のデジタル watermark を埋め込み

    - **Watermark Extract**: 画像から watermark を抽出・検証

    - **AI Detection**: 画像がAI生成かどうかを検知

    - **テストAPIキー**: `sk_test_`
    プレフィックスのキーは同じBearer認証を使用し、実際の処理サービスの実行やクレジットの消費なしに注文ライフサイクルを検証できます。テストアップロードの内容は破棄され、結果ファイルは作成されません
  contact:
    name: BIZ MORI サポート
    email: support@bizmori.com
servers:
  - url: https://api.bizmori.com
    description: 本番環境
security: []
tags:
  - name: Anti-AI
    description: Anti-AI画像保護の注文
  - name: Watermark Embed
    description: watermark 埋め込みの注文
  - name: Watermark Extract
    description: watermark 抽出の注文
  - name: AI Detection
    description: AI生成画像検知の注文
  - name: Orders
    description: 注文の照会と管理
  - name: Webhooks
    description: Webhookの設定とイベント
paths:
  /api/v2/orders/wtr-extract:
    post:
      tags:
        - Watermark Extract
      summary: watermark 抽出注文を作成
      description: |-
        watermark 抽出注文を作成します。
        - 注文あたりファイル1つのみ
        - 画像（jpg, jpeg, png, webp, bmp, tiff）またはPDFファイルに対応
        - 画像の場合、`includeOriginal: true` で元ファイルも一緒にアップロード可能
        - PDFは `includeOriginal` に非対応
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - idempotencyKey
                - file
              properties:
                idempotencyKey:
                  type: string
                  description: 冪等性キー
                file:
                  type: object
                  required:
                    - fileName
                  properties:
                    fileName:
                      type: string
                      description: watermark 付きファイル名（拡張子を含む）
                      example: watermarked.jpg
                    includeOriginal:
                      type: boolean
                      default: false
                      description: |-
                        元ファイルを含める（画像のみ）
                        - true: 元ファイルのアップロードURLも発行されます
                        - PDFファイルでは使用できません
                    originalFile:
                      type: object
                      description: 元ファイル情報（includeOriginalがtrueの場合必須）
                      required:
                        - fileName
                      properties:
                        fileName:
                          type: string
                          description: 元ファイル名
                          example: original.jpg
            examples:
              imageOnly:
                summary: 単一画像（watermark のみ）
                value:
                  idempotencyKey: 2f4b6c82-8a6e-4f39-9f8a-7d3b5c1e2a40
                  file:
                    fileName: watermarked.jpg
              imageWithOriginal:
                summary: 画像 + 元ファイルを含む
                value:
                  idempotencyKey: key-002
                  file:
                    fileName: watermarked.jpg
                    includeOriginal: true
                    originalFile:
                      fileName: original.jpg
              pdfOnly:
                summary: PDFファイル
                value:
                  idempotencyKey: key-003
                  file:
                    fileName: document.pdf
      responses:
        '200':
          description: 注文が正常に作成されました
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      orderName:
                        type: string
                        description: 注文名（自動生成）
                      orderId:
                        type: string
                        description: 注文ID
                      file:
                        $ref: '#/components/schemas/WtrExtractOrderFile'
              examples:
                imageOnlyResponse:
                  summary: 単一画像のレスポンス
                  value:
                    data:
                      orderName: wtr_extract_2026-02-13
                      orderId: '123456789'
                      file:
                        fileId: 1
                        fileName: watermarked.jpg
                        uploadUrl: https://s3.amazonaws.com/...
                        fileKey: 123/456/watermarked.jpg
                        fileFormat: JPG
                        fileType: IMG
                        role: watermarked
                        sequence: 1
                imageWithOriginalResponse:
                  summary: 画像 + 元ファイルのレスポンス
                  value:
                    data:
                      orderName: wtr_extract_2026-02-13
                      orderId: '123456789'
                      file:
                        fileId: 1
                        fileName: watermarked.jpg
                        uploadUrl: https://s3.amazonaws.com/...
                        fileKey: 123/456/watermarked.jpg
                        fileFormat: JPG
                        fileType: IMG
                        role: watermarked
                        sequence: 1
                        originalFile:
                          fileId: 2
                          fileName: original.jpg
                          uploadUrl: https://s3.amazonaws.com/...
                          fileKey: 123/456/original.jpg
                          fileFormat: JPG
                          fileType: IMG
                          role: original
                          sequence: 1
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/UsageLimitExceeded'
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            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": "8b3f1d6e-e7a5-424b-b6c9-1e4d5a8c0f26",
                "file": {
                  "fileName": "watermarked.jpg"
                }
              }'
        - lang: javascript
          label: JavaScript
          source: >-
            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: '8b3f1d6e-e7a5-424b-b6c9-1e4d5a8c0f26',
                file: {
                  fileName: 'watermarked.jpg'
                }
              })
            });

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

            response = requests.post(
                'https://api.bizmori.com/api/v2/orders/wtr-extract',
                headers={'Authorization': 'Bearer YOUR_API_TOKEN'},
                json={
                    'idempotencyKey': '8b3f1d6e-e7a5-424b-b6c9-1e4d5a8c0f26',
                    'file': {
                        'fileName': 'watermarked.jpg'
                    }
                }
            )
            data = response.json()
components:
  schemas:
    WtrExtractOrderFile:
      type: object
      description: watermark 抽出注文ファイル情報
      properties:
        fileId:
          type: integer
          description: ファイルID
        fileName:
          type: string
          description: ファイル名
        uploadUrl:
          type: string
          format: uri
          description: アップロードURL（プリサインドURL）
        fileKey:
          type: string
          description: S3ファイルキー
        fileFormat:
          type: string
          description: ファイル形式
          example: JPG
        fileType:
          type: string
          enum:
            - IMG
            - DOCUMENT
          description: ファイルタイプ（画像またはPDF）
        role:
          type: string
          enum:
            - watermarked
          description: ファイルの役割（メインファイルは常に"watermarked"）
        sequence:
          type: integer
          description: ファイル順序番号（常に1）
          example: 1
        originalFile:
          type: object
          nullable: true
          description: 元ファイル情報（includeOriginalがtrueの場合のみ含まれます）
          properties:
            fileId:
              type: integer
              description: ファイルID
            fileName:
              type: string
              description: ファイル名
            uploadUrl:
              type: string
              format: uri
              description: アップロードURL（プリサインドURL）
            fileKey:
              type: string
              description: S3ファイルキー
            fileFormat:
              type: string
              description: ファイル形式
            fileType:
              type: string
              enum:
                - IMG
              description: ファイルタイプ（画像のみ）
            role:
              type: string
              enum:
                - original
              description: ファイルの役割（常に"original"）
            sequence:
              type: integer
              description: ファイル順序番号（常に1）
              example: 1
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: エラーコード
  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
    UsageLimitExceeded:
      description: 使用量上限を超過
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: USAGE_LIMIT_EXCEEDED
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        外部クライアントアクセス用のBearer APIキー。本番キーは `sk_` プレフィックスを使用し、テストキーは `sk_test_`
        プレフィックスを使用して、処理やクレジット消費なしに注文ライフサイクルを検証します。

````