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

# Confirm AI Detection order

> Confirms that the image upload is complete and starts processing.

Call this endpoint after uploading the image to the upload 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.


> [!NOTE]
>
> Call this endpoint only **after** uploading the image to the URL from the [Create order](https://docs.contentcare.ai/api-reference/ai-detection/create-order.md) step. Live keys use the presigned storage URL; test keys use the BIZ MORI test upload URL. If the file has not been uploaded yet, the request will return an error.


## OpenAPI

````yaml api-reference/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

    - **Test API keys**: Keys with the `sk_test_` prefix use the same Bearer
    authentication and support order-lifecycle testing with mock responses
    without running processing services or consuming credits; test uploads
    discard file contents and do not create result files
  contact:
    name: BIZ MORI Support
    email: support@contentcare.ai
  license:
    name: Proprietary
    url: https://docs.contentcare.ai/legal/terms
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
  - name: Reports
    description: PDF analysis reports for watermark extract and AI Detection orders
paths:
  /api/v2/orders/ai-detection/confirm:
    post:
      tags:
        - AI Detection
      summary: Confirm AI Detection order
      description: >
        Confirms that the image upload is complete and starts processing.


        Call this endpoint after uploading the image to the upload 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.
      operationId: confirmAiDetectionOrder
      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: c6d4e2f1-3a5b-4c78-9d0e-6f2a1b8c4d95
                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": "c6d4e2f1-3a5b-4c78-9d0e-6f2a1b8c4d95", "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: 'c6d4e2f1-3a5b-4c78-9d0e-6f2a1b8c4d95', 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': 'c6d4e2f1-3a5b-4c78-9d0e-6f2a1b8c4d95', '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: >-
        Bearer API key for external client access. Live keys use the `sk_`
        prefix; test keys use the `sk_test_` prefix and support order-lifecycle
        testing with mock responses without processing or credit usage.

````

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