Guides

AI Video Dubbing API: Translate the Voice in a Video into Other Languages

ScalingTensor Team ·

How to dub a video into several languages with one API call: the request, language codes, background ducking and how the price is calculated.

Subtitles reach viewers who will read them. A dub reaches everyone else. Sonilo Video Dubbing takes a video with speech, translates what is said and replaces the voice track with dubbed speech in each language you ask for. You call it through ScalingTensor with your usual API key.

Dub a video into three languages

bash
curl --request POST 'https://restapi.scalingtensor.com/api/media/generate' \
  --header "apiKey: $SCALINGTENSOR_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "model": "sonilo/dubbing",
    "params": {
      "video_url": "https://cdn.example.com/product-demo.mp4",
      "languages": ["es", "de", "ja"],
      "ducking": true
    }
  }'

The response contains a jobId. Dubbing runs asynchronously, so poll GET /api/media/result?jobId=... until the status is completed; the result holds one output per requested language.

Inputs and options

  • video_url (required): a public HTTPS URL. Plain HTTP is rejected for dubbing. Accepted formats are mp4, mov, webm, m4v and animated gif, up to 300 seconds long.
  • languages: an array of target language codes such as ["es", "fr"]. Always set it explicitly: when it is omitted, the model falls back to a default set of three languages, and you pay for all three.
  • ducking: lower the background music and effects while the dubbed voice speaks. Off by default.

How the price is calculated

Dubbing is billed as the video's duration multiplied by the number of languages: currently $0.0985 per second of source video, multiplied by the number of languages. A 60-second video costs $17.73 with 3 languages. The duration is read from the source video when the job is billed, and the charge comes out of your prepaid wallet.

A workflow that scales

  1. Upload the master video to storage you control and generate a public HTTPS link.
  2. Submit one dubbing job with every language you need.
  3. Store the jobId with the video's record in your database.
  4. Poll in a background worker, then copy each language's output to your storage.
  5. Publish each language version next to the original, or as alternate audio tracks.

More guides

Try it with your own key

Sign in with Google, top up your wallet from $10 and create an API key. Every model in these guides works with the same key.