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": "0e6c4a9b-b1d8-457e-a9fc-4b7d0e3a6c59", "fileName": "photo.jpg"}'const response = await fetch('https://api.bizmori.com/api/v2/orders/ai-detection', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
idempotencyKey: '0e6c4a9b-b1d8-457e-a9fc-4b7d0e3a6c59',
fileName: 'photo.jpg'
})
});
const data = await response.json();import requests
response = requests.post(
'https://api.bizmori.com/api/v2/orders/ai-detection',
headers={'Authorization': 'Bearer YOUR_API_TOKEN'},
json={'idempotencyKey': '0e6c4a9b-b1d8-457e-a9fc-4b7d0e3a6c59', 'fileName': 'photo.jpg'}
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bizmori.com/api/v2/orders/ai-detection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'idempotencyKey' => '0e6c4a9b-b1d8-457e-a9fc-4b7d0e3a6c59',
'fileName' => 'photo.jpg',
'orderName' => 'my-detection-order',
'options' => [
'generateHeatmap' => false,
'generateOverlay' => false,
'generateThumbnail' => false
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bizmori.com/api/v2/orders/ai-detection"
payload := strings.NewReader("{\n \"idempotencyKey\": \"0e6c4a9b-b1d8-457e-a9fc-4b7d0e3a6c59\",\n \"fileName\": \"photo.jpg\",\n \"orderName\": \"my-detection-order\",\n \"options\": {\n \"generateHeatmap\": false,\n \"generateOverlay\": false,\n \"generateThumbnail\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bizmori.com/api/v2/orders/ai-detection")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotencyKey\": \"0e6c4a9b-b1d8-457e-a9fc-4b7d0e3a6c59\",\n \"fileName\": \"photo.jpg\",\n \"orderName\": \"my-detection-order\",\n \"options\": {\n \"generateHeatmap\": false,\n \"generateOverlay\": false,\n \"generateThumbnail\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bizmori.com/api/v2/orders/ai-detection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotencyKey\": \"0e6c4a9b-b1d8-457e-a9fc-4b7d0e3a6c59\",\n \"fileName\": \"photo.jpg\",\n \"orderName\": \"my-detection-order\",\n \"options\": {\n \"generateHeatmap\": false,\n \"generateOverlay\": false,\n \"generateThumbnail\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"orderId": "<string>",
"orderName": "<string>",
"status": "pending",
"file": {
"fileId": 123,
"fileName": "<string>",
"uploadUrl": "<string>",
"fileKey": "<string>"
}
}
}{
"code": "VALIDATION_FAILED"
}{
"code": "AUTH_NOT_AUTHENTICATED"
}{
"code": "USAGE_LIMIT_EXCEEDED"
}AI Detection 주문 생성
AI Detection 주문을 생성하고 이미지 업로드 URL을 발급합니다. live 키는 S3 presigned URL을 받고, 테스트 키는 절대 BIZ MORI test-upload URL을 받습니다.
처리 흐름
- 이 엔드포인트를 호출하여 업로드 URL을 발급받습니다
- live S3 URL 또는 테스트 BIZ MORI URL로 이미지를 업로드합니다
POST /api/v2/orders/ai-detection/confirm을 호출하여 비동기 감지를 시작합니다- 웹훅 또는 주문 상세 조회 엔드포인트를 통해 결과를 확인합니다
주문 상태
| 상태 | 설명 |
|---|---|
pending | 파일 업로드 대기 중 |
inProgress | 감지 처리 중 |
complete | 감지 완료, 결과 확인 가능 |
failed | 감지 실패 |
지원 파일 형식
jpg, jpeg, png, webp, bmp, tiff
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": "0e6c4a9b-b1d8-457e-a9fc-4b7d0e3a6c59", "fileName": "photo.jpg"}'const response = await fetch('https://api.bizmori.com/api/v2/orders/ai-detection', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
idempotencyKey: '0e6c4a9b-b1d8-457e-a9fc-4b7d0e3a6c59',
fileName: 'photo.jpg'
})
});
const data = await response.json();import requests
response = requests.post(
'https://api.bizmori.com/api/v2/orders/ai-detection',
headers={'Authorization': 'Bearer YOUR_API_TOKEN'},
json={'idempotencyKey': '0e6c4a9b-b1d8-457e-a9fc-4b7d0e3a6c59', 'fileName': 'photo.jpg'}
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bizmori.com/api/v2/orders/ai-detection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'idempotencyKey' => '0e6c4a9b-b1d8-457e-a9fc-4b7d0e3a6c59',
'fileName' => 'photo.jpg',
'orderName' => 'my-detection-order',
'options' => [
'generateHeatmap' => false,
'generateOverlay' => false,
'generateThumbnail' => false
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bizmori.com/api/v2/orders/ai-detection"
payload := strings.NewReader("{\n \"idempotencyKey\": \"0e6c4a9b-b1d8-457e-a9fc-4b7d0e3a6c59\",\n \"fileName\": \"photo.jpg\",\n \"orderName\": \"my-detection-order\",\n \"options\": {\n \"generateHeatmap\": false,\n \"generateOverlay\": false,\n \"generateThumbnail\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bizmori.com/api/v2/orders/ai-detection")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotencyKey\": \"0e6c4a9b-b1d8-457e-a9fc-4b7d0e3a6c59\",\n \"fileName\": \"photo.jpg\",\n \"orderName\": \"my-detection-order\",\n \"options\": {\n \"generateHeatmap\": false,\n \"generateOverlay\": false,\n \"generateThumbnail\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bizmori.com/api/v2/orders/ai-detection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotencyKey\": \"0e6c4a9b-b1d8-457e-a9fc-4b7d0e3a6c59\",\n \"fileName\": \"photo.jpg\",\n \"orderName\": \"my-detection-order\",\n \"options\": {\n \"generateHeatmap\": false,\n \"generateOverlay\": false,\n \"generateThumbnail\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"orderId": "<string>",
"orderName": "<string>",
"status": "pending",
"file": {
"fileId": 123,
"fileName": "<string>",
"uploadUrl": "<string>",
"fileKey": "<string>"
}
}
}{
"code": "VALIDATION_FAILED"
}{
"code": "AUTH_NOT_AUTHENTICATED"
}{
"code": "USAGE_LIMIT_EXCEEDED"
}이미지 업로드 방법
응답에서 받은uploadUrl을 사용하여 PUT 요청으로 이미지를 업로드합니다. 일반 키는 프리사인드 저장소 URL을 반환하고, 테스트 키는 요청 본문을 소비한 뒤 폐기하는 BIZ MORI 테스트 업로드 URL을 반환합니다:
curl -X PUT "UPLOAD_URL" \
-H "Content-Type: image/jpeg" \
--data-binary @photo.jpg
감지 결과 확인
업로드를 확인하면 주문 상태가inProgress로 변경됩니다. 감지가 완료되면 다음 방법으로 결과를 확인할 수 있습니다:
- 웹훅 —
order.aiDetection.completed또는order.aiDetection.failed이벤트 구독 - 폴링 — 주문 상세 조회를
status가complete또는failed가 될 때까지 호출
complete가 되면 감지 결과는 result에 들어 있습니다. 아래 예시는 주문 공통 필드를 생략했습니다. 전체 응답은 주문 상세 조회를 참고하세요.
{
"data": {
"type": "aiDetection",
"orderId": "...",
"status": "complete",
"result": {
"verdict": "likely_ai",
"probability": 0.97,
"options": {
"generateHeatmap": true,
"generateOverlay": false,
"generateThumbnail": true
},
"originalImageUrl": "https://...",
"heatmapUrl": "https://...",
"overlayUrl": null
}
}
}
_ai는 확률 0.98, _human은 확률 0.02를 반환합니다. 테스트 주문은 다운로드 가능한 히트맵·오버레이 파일을 만들지 않습니다.판정
result.verdict | 확률 구간 | 의미 |
|---|---|---|
likely_ai | ≥ 0.75 | AI 생성일 가능성이 높음 |
uncertain_ai | 0.5 – 0.75 | AI 생성일 가능성이 있음 |
uncertain_real | 0.25 – 0.5 | AI 생성이 아닐 가능성이 있음 |
likely_real | < 0.25 | AI 생성이 아닐 가능성이 높음 |
인증
외부 클라이언트 접근을 위한 Bearer API 키. 일반 키는 sk_ 접두사를 사용하고, 테스트 키는 sk_test_ 접두사로 모의 응답을 사용해 실제 처리나 크레딧 사용 없이 주문 흐름을 검증합니다.
본문
중복 요청 방지를 위한 멱등성 키
"0e6c4a9b-b1d8-457e-a9fc-4b7d0e3a6c59"
이미지 파일명 (확장자 포함). 지원 형식: jpg, jpeg, png, webp, bmp, tiff
"photo.jpg"
주문명 (선택 사항, 미입력 시 자동 생성)
64"my-detection-order"
응답
주문 생성 성공
Hide child attributes
Hide child attributes
주문 ID
주문명
주문 상태
pending Hide child attributes
Hide child attributes
파일 레코드 ID
파일명
업로드 URL. live 키는 S3 presigned URL을 받고, 테스트 키는 절대 https://api.bizmori.com/api/v2/test-uploads/{signedToken} URL을 받습니다. 두 URL은 1시간 후 만료됩니다. signed token 자체가 테스트 업로드를 인가하므로 PUT에 Authorization 헤더가 필요 없습니다. 테스트 요청 본문은 스트림으로 소비되어 저장되지 않으며, 테스트 주문은 사용량 차감이나 실제 외부 처리 없이 모의 결과로 전이합니다.
파일 식별자: live 키에서는 S3 object key이고 테스트 키에서는 격리된 logical key입니다.