Docs menu

Dubbing

Dub a video into one or more target languages — translated speech, mixed back under the original music/effects bed. Returns 202 Accepted with a task_id; poll GET /v1/tasks/:task_id until the task reaches a terminal status.

POST/v1/dubbingmultipart/form-data
API URLhttps://api.sonilo.com/v1/dubbing

Send API requests to https://api.sonilo.com. The platform.sonilo.com/docs pages are documentation only and are not API endpoints.

curl -X POST https://api.sonilo.com/v1/dubbing \
  -H "Authorization: Bearer sk_your_api_key" \
  -F "video_url=https://example.com/clip.mp4" \
  -F 'languages=["es", "fr"]'
# => {"task_id": "9f5f2f7e-...", "status": "processing"}

curl https://api.sonilo.com/v1/tasks/9f5f2f7e-... \
  -H "Authorization: Bearer sk_your_api_key"
# poll until "status" is "succeeded" or "failed"
{
  "task_id": "9f5f2f7e-…",
  "status": "processing"
}

Authorization

Authenticate via Bearer token. Generate keys at the API Keys page and pass them in the Authorization header on every request. Keep keys server-side, for example in SONILO_API_KEY.

Authorization: Bearer sk_your_api_key

Store the key server-side, commonly as SONILO_API_KEY. A 401 means the key is missing, invalid, or revoked. A 403 means the key is valid but the account does not have access to that endpoint or workspace.

Body Parameters

videofile
Video file upload. Provide either video or video_url, not both. Accepted formats: mp4, mov, webm, m4v, gif (animated). Max file size: default 300MB. Max duration: 180 sec.
video_urlstring
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.
languagesstring
Optional JSON array of target language codes, e.g. ["es", "fr"]. Defaults to ["zh_cn", "es", "fr"] when omitted. Supported codes: en, zh_cn, ja, ko, pt, es, de, fr, it, ru. Billed as video duration × number of languages requested.

Response

task_idstring
The task identifier. Poll the Get Task endpoint (GET /v1/tasks/:task_id) until the task reaches a terminal status.
statusstring
Always processing on submission — generation runs asynchronously.
outputsobject
Present when the task succeeded — a map of language code to a temporary download URL for that language's dubbed video, valid for 7 days.
duration_secondsnumber
The source video's duration, in seconds. Present when the task succeeded.