API Get key

Video

AI Influencer

Create your own AI influencer, pick a move and get a vertical video ready to post.

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

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

What it costs

TemplateFinal, best text
Everyday10 cr
Bold10 cr
Glam10 cr
Sporty10 cr
Cat10 cr
Frog10 cr
Robot10 cr
Clay10 cr
New outfit10 cr
Photo set10 cr
Dance114 cr
Walk in114 cr
Pose114 cr
Say hi114 cr
Show something124 cr
Unboxing124 cr
Talk to camera157 cr
Copy my move227 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 everyday, bold, glam, sporty, cat, frog, robot, clay, outfit, photoset, dance, walk, pose, wave, product, unbox, talk, copy
media.photoYour photo media id[]
media.productPhoto of the thing media id[]
media.motionYour clip media id[]
media.clothesClothes photo media id[]
inputs.nameName string
inputs.styleStyle (optional) string
inputs.from_readyStart from our ready character bool
inputs.likenessThis photo shows me, or an adult who agreed. Not a famous person. bool
inputs.soundSound bool
inputs.scriptWhat they say string
inputs.voiceVoice enum hpp4J3VqNfWAUOO0d1Us, BZgkqPqms7Kj9ulSkVzn, 5l5f8iK3YPeGga21rQIX, 1SM7GgM6IMuvQlz2BwM3, EkK5I93UQWFDigLMpZcX, B8gJV1IhpuegLxdpXFOE
inputs.own_motionI filmed this clip myself, or I may use it. bool
inputs.noteNotes (optional) string
inputs.keep_outfitSame outfit in every photo bool
inputs.resolutionQuality enum 720p, 1080p
qualityQuality enum final
aspectShape enum 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