Audio Dubbing

Upload an audio file, choose the target language, and treat dubbing as a task-based workflow. The final result can include dubbed audio and subtitle outputs.

Endpoint

http
POST https://api.cheapaiapi.com/v1/task/dubbing

Send this request as multipart/form-data.

Request Fields

filefilerequiredInput audio file such as mp3 or m4a.
target_langstringrequiredLanguage to dub into.
source_langstringOptional source language. Defaults to auto detection.
num_speakersintegerSpeaker count. Use 0 for automatic detection.
disable_voice_cloningbooleanUse a library voice instead of cloning when supported.
receive_urlstringOptional webhook for result delivery.

Example Request

bash
curl -X POST "https://api.cheapaiapi.com/v1/task/dubbing" \
  -H "Authorization: Bearer sk_your_api_key" \
  -F 'file=@podcast.mp3' \
  -F 'num_speakers=0' \
  -F 'disable_voice_cloning=false' \
  -F 'source_lang=auto' \
  -F 'target_lang=Spanish' \
  -F 'receive_url=https://your-app.com/webhooks/dubbing'

Task Pattern

json
{
  "success": true,
  "task_id": "uuid_task_id",
  "ec_remain_credits": 123456
}

Use the common task endpoint for status checks:

http
GET https://api.cheapaiapi.com/v1/task/{task_id}

Completed Task Example

json
{
  "id": "uuid_task_id",
  "status": "done",
  "credit_cost": 1,
  "metadata": {
    "audio_url": "https://example.com/audio.mp3",
    "srt_url": "https://example.com/audio.srt",
    "json_url": "https://example.com/audio.json"
  },
  "type": "dubbing"
}

What To Surface In UI

  • Target language selection before upload starts
  • Speaker detection mode versus explicit speaker count
  • Whether cloned or library voices are preferred for the dubbing run
  • Both dubbed audio and subtitle downloads when the task is complete