Skip to content

Dub an existing video

Use this when the video is already imported. Quote first if you want to show cost, reserve, then create.

Terminal window
VIDEO_ID=uv_123
curl -sS -X POST "$BRAIV_API_BASE/videos/$VIDEO_ID/quote" \
-H "Authorization: Bearer $BRAIV_API_KEY" \
-H "Content-Type: application/json" \
-d '{"dubs":[{"product":"plus","languages":["es"]}]}'
RES=$(curl -sS -X POST "$BRAIV_API_BASE/videos/$VIDEO_ID/reservations" \
-H "Authorization: Bearer $BRAIV_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"dubs":[{"product":"plus","languages":["es"]}]}')
curl -sS -X POST "$BRAIV_API_BASE/videos/$VIDEO_ID/dubs" \
-H "Authorization: Bearer $BRAIV_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d "{\"languages\":[\"es\"],\"product\":\"plus\",\"reservationId\":\"$(echo "$RES" | jq -r .reservationId)\"}"

Poll dub_{videoId}_es_plus until ready or failed. You can skip quote/reserve and let create spend credits itself.