# 1. import the video - YouTube, Drive, Vimeo or a direct URL
curl -X POST https://api.rask.ai/v3/media/import \
-H "Authorization: Bearer $RASK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://youtu.be/..."}'
# 2. the price first - free, and it changes nothing
curl -X POST https://api.rask.ai/v3/projects/estimate \
-H "Authorization: Bearer $RASK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"media_id": "...", "target_language": "es-mx"}'
# 3. dub with the speakers' own voices - the price you accepted is the ceiling
curl -X POST https://api.rask.ai/v3/projects \
-H "Authorization: Bearer $RASK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"media_id": "...",
"target_language": "es-mx",
"expected_cost_minutes": 12
}'# Wait on the job instead of polling: one request, up to 20 seconds.
curl -s "https://api.rask.ai/v3/jobs/$JOB_ID?wait_seconds=20" \
-H "Authorization: Bearer $RASK_API_KEY" | jq .status



Send a file as multipart form data, or post a link from YouTube, Google Drive, S3, Vimeo or any direct URL. The speech in this video is the voice sample for each Instant Voice Clone.
Pass the media_id and a target language. Each detected speaker receives an Instant Voice Clone in supported languages, and the dub starts immediately.
List voices for the project, assign a custom clone or a preset to any speaker, then call /generate and download the files when the dub is complete.
# pip install rask-sdk
from rask_sdk import Rask
rask = Rask() # reads RASK_API_KEY
uploaded = rask.jobs.wait(rask.uploads.upload_file("keynote.mp4").id)
media_id = uploaded.result.media_id
# the price first - free, and it changes nothing
estimate = rask.projects.estimate_project(
media_id=media_id, target_language="es-mx"
)
# the price you accepted is the ceiling
created = rask.projects.create_project(
media_id=media_id,
target_language="es-mx",
expected_cost_minutes=estimate.total_minutes,
)
processed = rask.jobs.wait(created.id)
outputs = rask.exports.list_project_outputs(processed.result.project_id).data
print(next(o.url for o in outputs if o.kind == "dubbed_video"))import os, requests
API = "https://api.rask.ai/v3"
h = {"Authorization": f"Bearer {os.environ['RASK_API_KEY']}"}
job = requests.post(f"{API}/media/import", headers=h,
json={"url": "https://youtu.be/..."}).json()
media_id = requests.get(f"{API}/jobs/{job['id']}?wait_seconds=20",
headers=h).json()["result"]["media_id"]
order = {"media_id": media_id, "target_language": "es-mx"}
# the price first - free, and it changes nothing
estimate = requests.post(f"{API}/projects/estimate", headers=h, json=order).json()
# the price you accepted is the ceiling
project = requests.post(f"{API}/projects", headers=h,
json={**order,
"expected_cost_minutes": estimate["total_minutes"]}).json()
outputs = requests.get(f"{API}/projects/{project['project_id']}/outputs",
headers=h).json()
print(next(o["url"] for o in outputs["data"] if o["kind"] == "dubbed_video"))// no dependencies, Node 18+ global fetch
const API = 'https://api.rask.ai/v3';
const h = {
Authorization: `Bearer ${process.env.RASK_API_KEY}`,
'Content-Type': 'application/json',
};
const imported = await fetch(`${API}/media/import`, {
method: 'POST', headers: h,
body: JSON.stringify({ url: 'https://youtu.be/...' }),
}).then(r => r.json());
const job = await fetch(`${API}/jobs/${imported.id}?wait_seconds=20`, { headers: h })
.then(r => r.json());
const order = { media_id: job.result.media_id, target_language: 'es-mx' };
// the price first - free, and it changes nothing
const estimate = await fetch(`${API}/projects/estimate`, {
method: 'POST', headers: h, body: JSON.stringify(order),
}).then(r => r.json());
// the price you accepted is the ceiling
const project = await fetch(`${API}/projects`, {
method: 'POST', headers: h,
body: JSON.stringify({ ...order, expected_cost_minutes: estimate.total_minutes }),
}).then(r => r.json());
const outputs = await fetch(`${API}/projects/${project.project_id}/outputs`, { headers: h })
.then(r => r.json());
console.log(outputs.data.find(o => o.kind === 'dubbed_video')?.url);API=https://api.rask.ai/v3
AUTH="Authorization: Bearer $RASK_API_KEY"
JSON="Content-Type: application/json"
# 1. import the video, then wait for the media id
JOB=$(curl -s -X POST $API/media/import -H "$AUTH" -H "$JSON" \
-d '{"url": "https://youtu.be/..."}' | jq -r .id)
MEDIA=$(curl -s "$API/jobs/$JOB?wait_seconds=20" -H "$AUTH" | jq -r .result.media_id)
ORDER="{\"media_id\":\"$MEDIA\",\"target_language\":\"es-mx\"}"
# 2. the price first - free, and it changes nothing
CAP=$(curl -s -X POST $API/projects/estimate -H "$AUTH" -H "$JSON" \
-d "$ORDER" | jq -r .total_minutes)
# 3. the price you accepted is the ceiling
ID=$(curl -s -X POST $API/projects -H "$AUTH" -H "$JSON" \
-d "$(jq -c --argjson cap "$CAP" '. + {expected_cost_minutes:$cap}' <<<"$ORDER")" \
| jq -r .project_id)
# 4. collect the dubbed video, in the speakers' own voices
curl -s $API/projects/$ID/outputs -H "$AUTH" \
| jq -r '.data[] | select(.kind == "dubbed_video") | .url'<?php
use GuzzleHttp\Client;
$http = new Client([
'base_uri' => 'https://api.rask.ai/v3/',
'headers' => ['Authorization' => 'Bearer ' . getenv('RASK_API_KEY')],
]);
$job = json_decode($http->post('media/import',
['json' => ['url' => 'https://youtu.be/...']])->getBody(), true);
$media = json_decode($http->get("jobs/{$job['id']}?wait_seconds=20")->getBody(), true);
$order = ['media_id' => $media['result']['media_id'], 'target_language' => 'es-mx'];
// the price first - free, and it changes nothing
$estimate = json_decode($http->post('projects/estimate',
['json' => $order])->getBody(), true);
// the price you accepted is the ceiling
$project = json_decode($http->post('projects', ['json' => $order + [
'expected_cost_minutes' => $estimate['total_minutes'],
]])->getBody(), true);
$outputs = json_decode(
$http->get("projects/{$project['project_id']}/outputs")->getBody(), true); 0s queued
3s running transcribing
48s running translating
72s running voicing
128s running merging
150s succeeded

es-mx and es-es alike. The project records glossary.version, so later edits never silently change finished work.Yes. The Rask voice cloning API clones each speaker's voice as part of dubbing a video. Create a project with a target language and every speaker receives an Instant Voice Clone in supported languages. You can also assign a Custom Voice Clone you created in the Rask app to any speaker.
Instant Voice Clone uses the speakers' voices from your source video for supported target languages. For a reusable Custom Voice Clone, create it in the Rask app with the speaker's consent, then assign it through the API. Results depend on the source audio and the selected language and voice.
Instant Voice Clone is created automatically from the speech in the video you dub, with no short audio samples to record. Custom Voice Clone is trained from audio samples you upload once, saved to your voice library and reused in any project by its voice_id. In the voices list, an Instant Voice Clone has the label "Voice Clone" and gender "auto".
Creating a Custom Voice Clone is available in the Rask web platform. Once the clone is saved, retrieve its voice_id with the get project voices endpoint and assign it to a speaker through the API.
Upload 1 to 10 minutes of audio or video, up to 10 files of up to 10 MB each, in MP4, MOV, WEBM, MKV, MP3, M4A or WAV, or paste a YouTube or Google Drive link. For best results, use one speaker with a consistent speaking style, recorded in a quiet room with a good microphone and no background noise.
Voice cloning supports 57 base languages and their supported regional variants. Regional variants use the base cloning model: for example, UK English text uses the US English voice model. For other target languages, choose an AI voice preset. See the API language catalogue for the full list.
The API dubs both video and audio recordings, including audio-only podcasts and interviews. To use your own wording, edit the translated text segment by segment, or create the transcript from your own .srt before you create the project, and the cloned voice speaks your text. The input is always a recording, so for text-only voiceovers a text to speech API is the better fit.
Read the speakers with GET /v3/projects/{project_id}/speakers, then assign a voice to one of them with PUT /v3/projects/{project_id}/speakers/{speaker_id}/voice and re-dub with POST /v3/projects/{project_id}/dub. Estimate the re-dub first and the price comes back before anything runs: it is billed on the combined duration of changed segments, with a one-minute minimum per charged run.
Creator Pro plans include up to 3 custom voices, Business plans up to 10 shared team voices, and Enterprise plans a custom voice library.
Yes. Custom voice clones are created with the speaker's consent, and you should only dub videos whose speakers have agreed to it. Rask uses consent-based voice cloning and AI safety controls, and your audio is never used to train general models.
The clone replicates the voice identity of the speaker, including timbre and pitch, so they sound like themselves in another language. Emotional tone, cadence and rhythm follow the source audio and the translated script, so clear, expressive source speech gives the best results.
You can publish dubbed videos with cloned voices in your commercial content when you have the rights to the source video and the consent of the speakers. Check the Rask Terms of Service for the details that apply to your plan.
Voice cloning is part of dubbing and has no separate fee: API usage is billed per minute of video, rounded up to the next whole minute, from the same minutes pool as the Rask app. Minutes beyond a plan cost $3 per minute. Re-dubbing after a voice change is billed only for the changed segments. Start with a free trial, no credit card required.