언어: KO
무료로 시작

상품 사진 스튜디오를 API로.

Herofab API는 상품 사진과 도구 이름을 받아 작업을 백그라운드에서 처리합니다. 완성 이미지를 다운로드할 수 있게 되면 상태 조회 또는 서명된 웹훅으로 알 수 있습니다.

  • Bearer 방식 API 키
  • 서명된 웹훅
  • 배치당 최대 100개 작업
  • OpenAPI 3.1 및 llms.txt

MCP https://app.herofab.app/mcpOpenAPI · GPT Actions https://app.herofab.app/api/agent/openapi.jsonMCP · API key https://app.herofab.app/mcp/studio

{
  "mcpServers": {
    "herofab-studio": {
      "type": "http",
      "url": "https://app.herofab.app/mcp/studio",
      "headers": {
        "Authorization": "Bearer hf_sk_live_..."
      }
    }
  }
}
curl https://app.herofab.app/api/v1/jobs -H "Authorization: Bearer $HEROFAB_API_KEY" -H "Idempotency-Key: $(uuidgen)" --json '{"tool": "ghost_mannequin", "inputs": {"garment": "ASSET_ID"}}'
작동 방식

사진에서 완성 이미지까지.

01

전송

상품 사진을 업로드하고 도구와 설정을 지정해 작업을 생성합니다. 작업 생성 시 크레딧이 예약됩니다.

POST /api/v1/assetsPOST /api/v1/jobs

02

조회

작업이 끝날 때까지 상태를 조회하거나, 완료 시 서명된 웹훅을 받습니다.

GET /api/v1/jobs/{id}

03

다운로드

작업 결과의 에셋 ID로 완성 이미지를 가져옵니다.

GET /api/v1/assets/{id}/content

전체 예제: 사진 업로드, 작업 생성, 대기, 다운로드
API=https://app.herofab.app/api/v1
AUTH="Authorization: Bearer $HEROFAB_API_KEY"

# 1 · Upload the product photo
ASSET_ID=$(curl -s "$API/assets" \
  -H "$AUTH" \
  -F file=@shirt.jpg | jq -r .id)

# 2 · Create the job
BODY=$(jq -n --arg garment "$ASSET_ID" '{tool: "ghost_mannequin",
  inputs: {garment: $garment}, params: {style: "3d", backdrop: "white"}}')
JOB_ID=$(curl -s "$API/jobs" \
  -H "$AUTH" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d "$BODY" | jq -r .id)

# 3 · Poll until the job is finished
while :; do
  JOB=$(curl -s "$API/jobs/$JOB_ID" -H "$AUTH")
  STATE=$(jq -r .state <<<"$JOB")
  [ "$STATE" = queued ] || [ "$STATE" = running ] || break
  sleep 2
done
[ "$STATE" = succeeded ] || { jq -r .failure.code <<<"$JOB"; exit 1; }

# 4 · Download the image
OUTPUT_ID=$(jq -r '.outputs[0].asset_id' <<<"$JOB")
EXT=$(jq -r '.outputs[0].content_type | ltrimstr("image/")' <<<"$JOB")
curl -sL "$API/assets/$OUTPUT_ID/content" -H "$AUTH" -o "result.$EXT"
시작하기

다음 컬렉션을 이번 주에 촬영합니다.

가입 시 20크레딧 제공, 카드 등록 불필요. 무료 크레딧으로 만든 이미지에는 워터마크가 표시됩니다. 크레딧을 구매하면 Herofab이 해당 이미지의 워터마크도 제거합니다.