API 키 발급
- BIZ MORI 대시보드에 로그인합니다
- API 키로 이동합니다
- 신규 발급을 클릭합니다
- 키를 복사하여 안전하게 보관합니다 — 한 번만 표시됩니다
API 키는 계정의 API에 대한 전체 접근 권한을 부여합니다. 클라이언트 코드, 공개 저장소, 버전 관리 시스템에 절대 노출하지 마세요. 환경 변수로 저장하세요.
API 키 사용 방법
모든 요청에서Authorization: Bearer 헤더로 API 키를 전달합니다:
curl -X POST https://api.bizmori.com/api/v2/orders/anti-ai \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"idempotencyKey": "unique-key", "files": [{"fileName": "image.jpg"}]}'
const response = await fetch('https://api.bizmori.com/api/v2/orders/anti-ai', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
idempotencyKey: 'unique-key',
files: [{ fileName: 'image.jpg' }],
}),
});
const data = await response.json();
import requests
response = requests.post(
'https://api.bizmori.com/api/v2/orders/anti-ai',
headers={
'Authorization': 'Bearer YOUR_API_TOKEN',
},
json={
'idempotencyKey': 'unique-key',
'files': [{'fileName': 'image.jpg'}],
},
)
data = response.json()
<?php
$ch = curl_init('https://api.bizmori.com/api/v2/orders/anti-ai');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'idempotencyKey' => 'unique-key',
'files' => [['fileName' => 'image.jpg']],
]),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
require 'net/http'
require 'json'
uri = URI('https://api.bizmori.com/api/v2/orders/anti-ai')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
req = Net::HTTP::Post.new(uri)
req['Authorization'] = 'Bearer YOUR_API_TOKEN'
req['Content-Type'] = 'application/json'
req.body = JSON.generate(
idempotencyKey: 'unique-key',
files: [{ fileName: 'image.jpg' }]
)
data = JSON.parse(http.request(req).body)
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
body, _ := json.Marshal(map[string]any{
"idempotencyKey": "unique-key",
"files": []map[string]string{{"fileName": "image.jpg"}},
})
req, _ := http.NewRequest("POST",
"https://api.bizmori.com/api/v2/orders/anti-ai",
bytes.NewBuffer(body),
)
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}
import java.net.URI;
import java.net.http.*;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.bizmori.com/api/v2/orders/anti-ai"))
.header("Authorization", "Bearer YOUR_API_TOKEN")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(
"{\"idempotencyKey\":\"unique-key\",\"files\":[{\"fileName\":\"image.jpg\"}]}"
))
.build();
HttpResponse<String> response =
client.send(request, HttpResponse.BodyHandlers.ofString());
멱등성 (Idempotency)
모든 주문 생성 엔드포인트는idempotencyKey 파라미터를 지원합니다. 동일한 키로 중복 요청을 보내면 새 주문을 생성하는 대신 기존 주문을 반환합니다. 네트워크 재시도 시 이중 처리를 방지할 수 있습니다.
{
"idempotencyKey": "01960d3e-a4f2-7b3c-8a1d-4c7e2f9b0a3d",
"files": [...]
}
user-{id}-batch-{timestamp})도 사용할 수 있습니다.