API Get key

Images

UGC Shots

Casual "holding the product" phone photos from one render. No text, pure UGC.

From
10 crper ad
Endpoint
POST /api/v1/studio/ugc_fotos/runs
Workflow id
ugc_fotos

Real outputs of this workflow.

The request

# 0. Upload your file first. Its id goes in the body.
MEDIA_ID=$(curl -s -X POST https://staglight.ai/api/v1/uploads \
  -H "Authorization: Bearer $STAGLIGHT_API_KEY" -F file=@product.jpg | jq -r .id)

# 1. Price it. Free, nothing is charged.
PRICE=$(curl -s -X POST https://staglight.ai/api/v1/studio/ugc_fotos/estimate \
  -H "Authorization: Bearer $STAGLIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "card": "ugc_street",
    "media": {
      "product": ["'"$MEDIA_ID"'"]
    }
  }' | jq .credits)
echo "$PRICE"

# 2. Start it. max_credits refuses anything above that price; the Idempotency-Key stops a double charge.
START=$(curl -s -X POST https://staglight.ai/api/v1/studio/ugc_fotos/runs \
  -H "Authorization: Bearer $STAGLIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "card": "ugc_street",
    "media": {
      "product": ["'"$MEDIA_ID"'"]
    },
    "max_credits": '"$PRICE"'
  }')

ID=$(echo "$START" | jq -r .id)

# 3. Wait until it finishes.
while :; do
  STATUS=$(curl -s "https://staglight.ai/api/v1/studio/ugc_fotos/runs/$ID" -H "Authorization: Bearer $STAGLIGHT_API_KEY" | jq -r .status)
  case "$STATUS" in succeeded|partial|failed) break ;; esac; sleep 10
done

# 4. Download every file in one zip.
curl -s -L -o result.zip "https://staglight.ai/api/v1/studio/ugc_fotos/runs/$ID/outputs.zip" -H "Authorization: Bearer $STAGLIGHT_API_KEY"

What it costs

TemplateFinal, best textDraft, fast and cheap
Street POV18 cr10 cr
Bathroom Routine18 cr10 cr
Car Interior18 cr10 cr
Kitchen Counter18 cr10 cr
Gym Bag18 cr10 cr
Unboxing18 cr10 cr
Mirror Selfie18 cr10 cr
Pool / Summer18 cr10 cr

Prices from the server at the default settings. The estimate call gives the exact price for your inputs, for free.

Inputs

NameTypeAllowed
cardrequiredThe template string ugc_street, ugc_bathroom, ugc_car, ugc_kitchen, ugc_gym, ugc_unboxing, ugc_mirror, ugc_pool
media.productrequiredProduct photo media id[]
media.sceneScene reference media id[]
inputs.handHand enum , man, woman
inputs.notesExtra direction (optional) string
inputs.resolutionResolution enum 1K, 2K, 4K
inputs.video_qualityVideo quality (Animate) enum fast, best
inputs.nicheNiche / category string
inputs.descriptionProduct description and key selling points string
qualityQuality enum final, draft
aspectShape enum 9:16, 4:5, 1:1

Files are media ids from POST /api/v1/uploads. View documentation

Try it by hand

The same workflow runs in the studio, on the same balance. Use it to see the result before you write code.

Sign up to try it

More workflows