Skip to main content
POST
/
api
/
v2
/
orders
/
ai-detection
cURL
curl -X POST https://api.bizmori.com/api/v2/orders/ai-detection \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"idempotencyKey": "key-ai-001", "fileName": "photo.jpg"}'
{
  "data": {
    "orderId": "<string>",
    "orderName": "<string>",
    "status": "pending",
    "file": {
      "fileId": 123,
      "fileName": "<string>",
      "uploadUrl": "<string>",
      "fileKey": "<string>"
    }
  }
}

이미지 업로드 방법

응답에서 받은 uploadUrl을 사용하여 PUT 요청으로 S3에 직접 이미지를 업로드합니다:
curl -X PUT "UPLOAD_URL" \
  -H "Content-Type: image/jpeg" \
  --data-binary @photo.jpg
프리사인드 업로드 URL은 10분 후 만료됩니다. 만료 전에 이미지를 업로드하고 주문 확인 엔드포인트를 호출하세요.

감지 결과 확인

업로드를 확인하면 주문 상태가 inProgress로 변경됩니다. 감지가 완료되면 다음 방법으로 결과를 확인할 수 있습니다:
  1. 웹훅order.aiDetection.completed 또는 order.aiDetection.failed 이벤트 구독
  2. 폴링주문 상세 조회 엔드포인트를 상태가 complete 또는 failed가 될 때까지 호출
감지 결과는 주문 상세 응답의 aiDetection 필드에 포함됩니다:
{
  "data": {
    "orderId": "...",
    "status": "complete",
    "aiDetection": {
      "probability": 0.97,
      "statusCode": 1
    }
  }
}

상태 코드

statusCode의미
1AI 생성 가능성 매우 높음
2AI 생성 가능성 높음
3사람이 창작했을 가능성 높음
4사람이 창작했을 가능성 매우 높음

Authorizations

Authorization
string
header
required

API Key for external client access

Body

application/json
idempotencyKey
string
required

Idempotency key to prevent duplicate requests

Example:

"key-ai-detection-001"

fileName
string
required

Image file name with extension. Supported: jpg, jpeg, png, webp, bmp, tiff

Example:

"photo.jpg"

orderName
string

Order name (optional, auto-generated if not provided)

Maximum string length: 64
Example:

"my-detection-order"

options
object

Output options (optional). Generated files are included in the order detail response.

Response

Order created successfully

data
object