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

# AI Detection 주문 확인

> S3에 이미지 업로드가 완료되었음을 확인하고 비동기 AI 감지 처리를 시작합니다.

주문 생성 엔드포인트에서 받은 프리사인드 URL로 이미지를 업로드한 후 이 엔드포인트를 호출하세요. 주문 상태가 `pending`에서 `inProgress`로 변경됩니다.

감지 결과는 웹훅(`order.aiDetection.completed` 또는 `order.aiDetection.failed`)으로 전달되거나, [주문 상세 조회](/ko/api-reference/orders/get-order) 엔드포인트를 폴링하여 확인할 수 있습니다.

동일한 `idempotencyKey`로 재요청 시 현재 주문 상태를 반환합니다. (중복 처리 방지)


<Note>
  [주문 생성](/ko/api-reference/ai-detection/create-order) 단계에서 받은 프리사인드 URL로 이미지를 업로드한 **후에** 이 엔드포인트를 호출하세요. 파일이 아직 업로드되지 않은 경우 에러가 반환됩니다.
</Note>


## OpenAPI

````yaml POST /api/v2/orders/ai-detection/confirm
openapi: 3.0.0
info:
  title: BIZ MORI API
  version: 2.0.0
  description: |
    BIZ MORI API provides four core services for digital content protection:
    - **Anti-AI**: Protect images from AI training
    - **Watermark Embed**: Embed invisible digital watermarks into images
    - **Watermark Extract**: Extract and verify watermarks from images
    - **AI Detection**: Detect whether an image is AI-generated
  contact:
    name: BIZ MORI Support
    email: support@bizmori.com
servers:
  - url: https://api.bizmori.com
    description: Production
security: []
tags:
  - name: Anti-AI
    description: Anti-AI image protection orders
  - name: Watermark Embed
    description: Watermark embedding orders
  - name: Watermark Extract
    description: Watermark extraction orders
  - name: AI Detection
    description: AI-generated image detection orders
  - name: Orders
    description: Order query and management
  - name: Webhooks
    description: Webhook configuration and events
paths:
  /api/v2/orders/ai-detection/confirm:
    post:
      tags:
        - AI Detection
      summary: Confirm AI Detection order
      description: >
        Confirms that the image has been uploaded to S3 and starts async AI
        detection processing.


        Call this endpoint after uploading the image to the presigned URL
        received from the create order endpoint. The order status will change
        from `pending` to `inProgress`.


        The detection result is delivered via webhook
        (`order.aiDetection.completed` or `order.aiDetection.failed`), or can be
        retrieved by polling the [Get order](/api-reference/orders/get-order)
        endpoint.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - idempotencyKey
                - orderId
              properties:
                idempotencyKey:
                  type: string
                  description: >-
                    Unique key to prevent duplicate requests. If the same key is
                    used in a retry, the current order status is returned
                    without reprocessing.
                  example: 01950c7e-f6b2-7000-8000-abcdef123456
                orderId:
                  type: string
                  description: Order ID
      responses:
        '200':
          description: Processing started
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      orderId:
                        type: string
                        description: Order ID
                      status:
                        type: string
                        enum:
                          - inProgress
                        description: Order status
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl -X POST
            "https://api.bizmori.com/api/v2/orders/ai-detection/confirm" \
              -H "Authorization: Bearer YOUR_API_TOKEN" \
              -H "Content-Type: application/json" \
              -d '{"idempotencyKey": "YOUR_IDEMPOTENCY_KEY", "orderId": "ORDER_ID"}'
        - lang: javascript
          label: JavaScript
          source: |-
            const response = await fetch(
              'https://api.bizmori.com/api/v2/orders/ai-detection/confirm',
              {
                method: 'POST',
                headers: {
                  'Authorization': 'Bearer YOUR_API_TOKEN',
                  'Content-Type': 'application/json'
                },
                body: JSON.stringify({ idempotencyKey: 'YOUR_IDEMPOTENCY_KEY', orderId: 'ORDER_ID' })
              }
            );
            const data = await response.json();
        - lang: python
          label: Python
          source: |-
            import requests

            response = requests.post(
                'https://api.bizmori.com/api/v2/orders/ai-detection/confirm',
                headers={'Authorization': 'Bearer YOUR_API_TOKEN'},
                json={'idempotencyKey': 'YOUR_IDEMPOTENCY_KEY', 'orderId': 'ORDER_ID'}
            )
            data = response.json()
components:
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: VALIDATION_FAILED
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: AUTH_NOT_AUTHENTICATED
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: RESOURCE_NOT_FOUND
  schemas:
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API Key for external client access

````