# Sonilo Video Dubbing API

> Sonilo Video Dubbing translates the speech in a video and replaces it with dubbed speech in each target language you request, optionally lowering background audio under the new voice.

- Model ID: `sonilo/dubbing`
- Provider: Sonilo
- Tasks: Video Dubbing
- Price: $0.0985 per second of source video, multiplied by the number of languages. A 60-second video costs $17.73 with 3 languages.
- Web page: https://scalingtensor.com/models/sonilo/dubbing

## How to call it

Authenticate with the `apiKey` request header. Submit a job, then poll for the result:

1. `POST https://restapi.scalingtensor.com/api/media/generate` with JSON `{ "model": "<model ID>", "params": { ... } }`. The response `data.jobId` identifies the job.
2. `GET https://restapi.scalingtensor.com/api/media/result?jobId=<jobId>` until the status is `completed` or `failed`.
3. A response `code` of 0 means success; otherwise read `msg`.

```bash
curl --request POST 'https://restapi.scalingtensor.com/api/media/generate' \
  --header 'apiKey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "model": "sonilo/dubbing",
  "params": {
    "ducking": true,
    "languages": [
      "es",
      "fr"
    ],
    "video_url": "https://example.com/your-video.mp4"
  }
}'
```

## Input parameters

Parameters go inside the `params` object.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `video_url` | string | conditional | URL to a video file. Provide either video or video_url, not both. Must be a public https:// URL — plain http:// is rejected (the dubbing pipeline requires https); private/internal addresses are rejected. |
| `languages` | string | optional | Optional JSON array of target language codes, e. g. ["es", "fr"]. Defaults to ["zh_cn", "es", "fr"] when omitted. Billed as video duration × number of languages requested. |
| `ducking` | boolean | optional | Optional boolean. Set to true to apply Sonilo ducking — the background music/effects bed is lowered while the dubbed voice is speaking. Defaults to false: the dubbed voice is mixed over the bed unchanged. |

## FAQ

### How much does the Sonilo Video Dubbing API cost?

Sonilo Video Dubbing costs $0.0985 per second of source video, multiplied by the number of languages on ScalingTensor. A 60-second video costs $17.73 with 3 languages. There is no subscription; usage is charged to your prepaid wallet.

### How do I call the Sonilo Video Dubbing API?

Send POST /api/media/generate with "model": "sonilo/dubbing" and the parameters in a params object, using your apiKey header. The call returns a jobId. Poll GET /api/media/result?jobId=... until the status is completed, then read the output URL from the result.

### Which parameters does Sonilo Video Dubbing accept?

No parameter is strictly required. Optional: video_url, languages and ducking. The parameter table on this page describes each one.

### Do I need a Sonilo account to use Sonilo Video Dubbing?

No. You call Sonilo Video Dubbing with your ScalingTensor API key and pay from your ScalingTensor wallet. The same key works for every other model in the catalog.
