---
title: "AI product photo API for fashion and e-commerce | Herofab"
description: "Run Herofab product photo tools from your system: upload a photo, create a job, poll it or receive a signed webhook, then download the result."
url: https://herofab.app/api
language: en
updated: 2026-11-06
---

# The product photo studio, as an API.

The Herofab API takes a product photo and a tool name and processes the job in the background; polling or a signed webhook reports when the finished image is ready to download.

[Start free](https://app.herofab.app/login?lang=en&entry_source=cta) · [See pricing](https://herofab.app/pricing)

- Bearer API keys
- Signed webhooks
- Up to 100 jobs per batch
- OpenAPI 3.1 and llms.txt

[`MCP https://app.herofab.app/mcp`](https://herofab.app/mcp) · `OpenAPI · GPT Actions https://app.herofab.app/api/agent/openapi.json` · [`MCP · API key https://app.herofab.app/mcp/studio`](https://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"}}'
```

## From photo to finished image.

### Send

Upload the product photo and create a job with a tool and its settings; the job reserves its credits.

`POST /api/v1/assets` · `POST /api/v1/jobs`

### Poll

Read the job until it is finished, or receive a signed webhook when it is.

`GET /api/v1/jobs/{id}`

### Download

Fetch the finished image by the asset ID of the job's output.

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

**Full example: upload the photo, create the job, wait, download**

```
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"
```

## One page per tool

Each page lists the tool's inputs, every setting with its allowed values, the credits it costs and a request in cURL, Node.js and Python, taken from the live OpenAPI document.

[Virtual try-on API](https://herofab.app/api/virtual-try-on) · [Product studio API](https://herofab.app/api/product-photography)

## Integration guides

[Webhooks](https://herofab.app/api/webhooks) · [Bulk product photos script](https://herofab.app/api/guides/bulk-product-photos) · [Shopify product images](https://herofab.app/api/guides/shopify-product-images) · [WooCommerce product images](https://herofab.app/api/guides/woocommerce-product-images)
