배경 제거 API 문서

API 키 하나로 이미지를 보내고 투명 PNG를 받으세요.

POSThttps://api.remox.ai/v1.0/removebg

빠른 시작

API 이용 신청 →

발급된 키는 서버에 보관하고 브라우저나 앱에 노출하지 마세요. 키를 교체해도 고객 ID와 잔액은 유지됩니다.

REMOX_API_KEY

JPG, PNG, 정적 WebP를 지원합니다. 업로드 전에 크기를 조절하세요. API는 이미지를 축소하지 않습니다.

코드 예제 →

인증

발급된 키는 서버에 보관하고 브라우저나 앱에 노출하지 마세요. 키를 교체해도 고객 ID와 잔액은 유지됩니다.

필드허용 값
X-API-Keyremox_live_… / remox_test_…
Secret / X-Subuid / X-Platform-User / X-RapidAPI-User—
image_url / Base64 / shadow / refine—

코드 예제

cURL
# Set REMOX_API_KEY in your environment first.
curl 'https://api.remox.ai/v1.0/removebg' \
  -H "X-API-Key: $REMOX_API_KEY" \
  -H 'Idempotency-Key: image-0001' \
  -F 'image_file=@/path/to/input.jpg' \
  -F 'size=auto' \
  --max-time 75 --fail-with-body \
  -D response-headers.txt -o remox-result.png
# On non-2xx, the output file contains error JSON, not a PNG.

JPG, PNG, 정적 WebP를 지원합니다. 업로드 전에 크기를 조절하세요. API는 이미지를 축소하지 않습니다.

input.jpg → image/jpeg · PNG → image/png · WebP → image/webp

요청 명세

POST /v1.0/removebg · multipart/form-data

JPG, PNG, 정적 WebP를 지원합니다. 업로드 전에 크기를 조절하세요. API는 이미지를 축소하지 않습니다.

필드필수허용 값
image_file✓JPG / PNG / WebP · ≤20 MiB (20 × 1024 × 1024 bytes) · max(width, height) ≤1920 px · min(width, height) ≤1080 px
size—auto
response_format—image / json
Idempotency-Key—8–128 · A–Z a–z 0–9 . _ : -

응답

200 · PNG

response_format=image · Content-Type: image/png

X-Request-ID · X-Task-ID · X-Idempotency-Key

200 · JSON

response_format=json
{
  "requestId": "req_…",
  "taskId": "task_…",
  "data": {
    "result_url": "https://storage.example/result.png?signature=…&expires=…"
  }
}
data.result_url ≠ result_b64

시간 초과 및 재시도

60초 후 504가 반환되어도 작업이 실행 중일 수 있습니다. 상태를 조회하거나 동일한 이미지와 Idempotency-Key로 재시도하여 중복 청구를 방지하세요.

GET /v1.0/tasks/{taskId}
{
  "requestId": "req_…",
  "taskId": "task_…",
  "status": "completed",
  "progress": null,
  "pollAfterMs": 2000,
  "result": {
    "downloadPath": "/v1.0/tasks/task_…/result",
    "mimeType": "image/png",
    "expiresAt": "2026-10-17T00:00:00.000Z"
  }
}
GET /v1.0/tasks/{taskId}/result
GET /v1.0/tasks/{taskId}/result?response_format=json

creating → queued → processing → completed / failed / timed_out

Retry-After · pollAfterMs: 2000 · X-API-Key

계정 및 크레딧

생성 시 크레딧을 예약하고 성공 시 차감하며 실패 또는 작업 만료 시 반환합니다. 동기 시간 초과만으로는 반환되지 않습니다.

필드허용 값
creditsavailable / reserved / consumed
GET /v1.0/accountX-API-Key
POST → AI300 ms
POST → 50460 s
task → timed_out35 min
task_expired90 d
result_expired (Worker)7 d

오류

재시도 전에 errors 배열과 작업 상태를 확인하세요. 지원을 위해 requestId를 보관하되 API 키를 기록하지 마세요.

{
  "requestId": "req_…",
  "retryable": false,
  "errors": [
    {
      "code": "invalid_credentials",
      "title": "Invalid API key."
    }
  ]
}
HTTPerrors[].code오류
400invalid_request, invalid_file잘못된 요청
400invalid_size, invalid_response_format잘못된 요청
400invalid_idempotency_key, invalid_subject잘못된 요청
402insufficient_credits크레딧 부족
403invalid_credentials접근 거부
403platform_disabled, platform_paused, scope_denied접근 거부
404not_found, upload_not_found찾을 수 없음
409idempotency_conflict충돌 또는 미완료 작업
409result_not_ready충돌 또는 미완료 작업
410task_expired, result_expired만료됨
413file_too_large파일이 너무 큼
415invalid_image, animated_image_unsupported지원하지 않는 이미지
422image_dimensions_exceeded이미지 크기 초과
429rate_limit_exceeded, hourly_quota_exhausted, inflight_limit_exceeded요청 한도 초과
502upload_failed, upstream_rejected, upstream_unavailable상위 서비스 오류
502create_result_unknown, remote_service_error, invalid_result, result_unavailable, task_failed, task_timeout상위 서비스 오류
503service_not_configured, credit_price_not_configured, server_error서비스 이용 불가
504sync_timeout동기 시간 초과

retryable: 429 / 5xx

60초 후 504가 반환되어도 작업이 실행 중일 수 있습니다. 상태를 조회하거나 동일한 이미지와 Idempotency-Key로 재시도하여 중복 청구를 방지하세요.

호환성

순수 키 배경 제거 전용입니다. remove.bg의 모든 기능을 구현하지 않습니다. JSON 결과 URL은 REMOX 확장입니다.

API 이용 신청 →