API Get key

Images

Static Ads

Facebook feed ads from one photo

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

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/estaticos/estimate \
  -H "Authorization: Bearer $STAGLIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "card": "price_slash",
    "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/estaticos/runs \
  -H "Authorization: Bearer $STAGLIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "card": "price_slash",
    "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/estaticos/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/estaticos/runs/$ID/outputs.zip" -H "Authorization: Bearer $STAGLIGHT_API_KEY"

What it costs

TemplateFinal, best textDraft, fast and cheap
Price Slash: Bold Offer18 cr10 cr
Editorial / Press Article18 cr10 cr
1-Star Review Twist18 cr10 cr
AI Recommends18 cr10 cr
Breaking News18 cr10 cr
Don't Buy This18 cr10 cr
DM Conversation18 cr10 cr
The Truth About…18 cr10 cr
Writing on Arm18 cr10 cr
Your formats18 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 price_slash, editorial, review_twist, ai_answer, breaking_news, reverse_psych, dm_convo, truth_poster, arm_writing, custom
media.productProduct photo media id[]
media.remixExisting ad media id[]
inputs.resolutionResolution enum 1K, 2K, 4K
inputs.languageLanguage enum auto, en, es, it, de, fr, nl, pl, ...
inputs.headlineHeadline line 1 string
inputs.sublineHeadline line 2 (in banner) string
inputs.line2_styleLine 2 style enum banner, text
inputs.currencyCurrency enum eur, usd, gbp, chf, kr, pln, czk, huf, ...
inputs.old_priceOld price string
inputs.new_priceNew price string
inputs.ratingRating line string
inputs.hookHook / angle (optional) string
inputs.subheadSubheadline (optional) string
inputs.quoteYour customer's review string
inputs.chatReal messages (optional) string
inputs.proofSocial proof line (optional) string
inputs.ad_labelShow an "Ad" tag bool
inputs.format_idImported format string
inputs.audienceWho buys it (optional) string
inputs.workedWhat has worked before (optional) string
inputs.nicheNiche / category string
inputs.urlWebsite string
inputs.descriptionProduct description and key selling points string
inputs.summaryWhat the scan learned (editable) string
qualityQuality enum final, draft
aspectShape enum 1:1, 4:5, 9:16

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