API Get key

Video

Localize an ad

Your video ad in another language: same picture, new voice, new captions.

From
6 crper ad
Endpoint
POST /api/v1/studio/localizar/runs
Workflow id
localizar
localizar
Templates
1
Quality
final

No example of this workflow yet. These are its real settings.

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=@clip.mp4 | jq -r .id)

# 1. Price it. Free, nothing is charged.
PRICE=$(curl -s -X POST https://staglight.ai/api/v1/studio/localizar/estimate \
  -H "Authorization: Bearer $STAGLIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "card": "localize",
    "media": {
      "video": ["'"$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/localizar/runs \
  -H "Authorization: Bearer $STAGLIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "card": "localize",
    "media": {
      "video": ["'"$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/localizar/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/localizar/runs/$ID/outputs.zip" -H "Authorization: Bearer $STAGLIGHT_API_KEY"

What it costs

TemplateFinal, best text
Localize an ad6 cr

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

Inputs

NameTypeAllowed
cardThe template string localize
media.videorequiredVideo ad media id[]
inputs.originalOriginal script string
inputs.targetTarget language enum es-ES, en, de, fr, it, pt, nl, pl
inputs.translatedTranslated script string
inputs.voiceVoice enum martin, rachel, sarah, domi, adam, antoni, josh
inputs.voice_idCustom voice ID (optional) string
inputs.removalOriginal captions enum off, blur, delogo
inputs.band_topCaption band, top % int
inputs.band_heightCaption band, height % int
inputs.captionsBurn translated captions bool
qualityQuality enum final

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