이미지를 업로드하면 AI가 배경을 제거하고 투명 PNG를 반환합니다. 동기 처리 — 보통 몇 초.
인증 및 요청
X-Api-Key: YOUR_API_KEY에 시크릿 키를 보내세요. 계정 페이지에서 키를 생성하고 관리하세요.
| 파라미터 | 유형 | 필수 | 설명 |
|---|---|---|---|
image_file
|
file | 필수* | 처리할 이미지, 멀티파트 업로드. JPG / PNG / WebP, 최대 20MB |
image_url
|
string | 필수* | 또는 공개 이미지 URL (image_file / image_url 중 하나 제공) |
size
|
string | 선택 | preview (무료, 워터마크 포함) / full (HD, 1 크레딧) / auto. 기본값 preview |
format
|
string | 선택 | auto (투명 시 PNG, 그 외 JPG — 기본값) / png / jpg |
bg_color
|
string | 선택 | 결과 배경: transparent (기본값) / white / 임의 #RRGGBB |
코드 샘플
언어를 선택하고 복사하세요 — 바로 실행 가능합니다.1curl -X POST "https://api.pixmiller.com/v1/remove" \2 -H "X-Api-Key: YOUR_API_KEY" \3 -F "[email protected]" \4 -F "size=full"
1import requests23resp = requests.post(4 "https://api.pixmiller.com/v1/remove",5 headers={"X-Api-Key": "YOUR_API_KEY"},6 files={"image_file": open("product.jpg", "rb")},7 data={"size": "full"},8)9print(resp.json()["url"])
1import fs from "node:fs";23const form = new FormData();4form.append("image_file", new Blob([fs.readFileSync("product.jpg")]), "product.jpg");5form.append("size", "full");6const resp = await fetch("https://api.pixmiller.com/v1/remove", {7 method: "POST",8 headers: { "X-Api-Key": "YOUR_API_KEY" },9 body: form,10});11console.log((await resp.json()).url);
응답
1{2 "url": "https://cdn.pixmiller.com/result/8Kd2pQ.png"3}
url
처리된 이미지의 임시 URL (원본 이미지는 3일 후 자동 삭제됩니다).
오류
오류는 일치하는 상태 코드와 다음과 같은 형태의 JSON 본문을 반환합니다 {"errors":{"code":"…","message":"…"}}.
validation error
image_file이 누락되었거나 유효하지 않음, 파일이 너무 크거나 이미지 소스가 충돌합니다.
authentication_failed
X-Api-Key 헤더가 누락되었거나 유효하지 않습니다.
not_enough_credit
size=full이 요청되었지만 계정에 HD 크레딧이 남아있지 않습니다.
invalid_image
이미지를 처리할 수 없습니다 — 너무 작거나, 지원되지 않거나, 디코딩에 실패했습니다.
throttled
속도 제한을 초과했습니다. Retry-After 헤더 후에 다시 시도해 주세요.