# 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. create the translation project - 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マルチパートフォームデータとしてファイルを送信するか、YouTube、Googleドライブ、S3、Vimeo、または直接ダウンロードURLからのリンクを投稿します。費用が発生する前に、メディアIDと技術的なメタデータが取得できます。
メディアIDを media_id として渡し、翻訳先の言語を指定します。同じアップロードデータから言語ごとにプロジェクトを分けることができ、必要に応じて独自の文字起こしや用語集を使用することも可能です。
status が succeeded になるまで状態を確認し、完了したらその言語の翻訳済み動画と字幕ファイルをダウンロードしてください。
# pip install rask-sdk
from rask_sdk import Rask
rask = Rask() # reads RASK_API_KEY
uploaded = rask.jobs.wait(rask.uploads.upload_file("q3-launch.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 translated video
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 および es-es 同様に。プロジェクトの記録 glossary.versionのため、後から編集しても完成した作業が勝手に変更されることはありません。はい。Raskの動画翻訳APIは、動画ファイルまたはリンクと翻訳先の言語を受け取り、音声の書き起こし、翻訳、AI音声の生成、元の背景音声とのミキシングをすべて自動で行います。手動での作業を挟むことなく、翻訳済み動画、字幕ファイル、翻訳テキストを取得できます。正確性が求められる場合は、公開前に人の手による確認を追加することも可能です。
APIアクセスはCreator Pro、Business、Enterpriseプランでご利用いただけます(機能はプランにより異なります)。アプリでAPIキーを作成すれば、すぐに利用を開始できます。Enterpriseプランのご契約、大量利用時の割引、カスタム言語への対応については、チームまでお問い合わせください。
すべてのリクエストで、Bearerトークンとして送信する1つのAPIキーを使用します。トークンの交換や更新作業は必要ありません。連携ごとに必要な権限を持つ専用のキーを発行し、それぞれに月額の利用上限を設定できます。
非同期処理に対応しており、待機機能も組み込まれています。プロジェクトを作成すると、ジョブが即座に返されます。GET /v3/jobs/{job_id}?wait_seconds=20 を呼び出すと、翻訳が完了した瞬間にレスポンスが返されます。
制限はありません。APIによるリクエストの制限やキーごとのクォータ(割当量)はありません。処理速度は処理キューの深さに依存し、処理の優先順位はエンタープライズ向け契約の内容に含まれます。
135以上の言語に対応しており、必要に応じて地域別の方言(es-mxやpt-brなど)も指定できます。元の言語は自動で検出されますが、手動で設定することも可能です。対応言語の全リストはAPIドキュメントをご確認ください。リストにない言語については、対応可能性やオプションについて弊社チームまでお問い合わせください。
はい、可能です。各プロジェクトには1つの翻訳言語が設定されるため、同じアップロードデータから言語ごとにプロジェクトを作成し、同時に処理を実行できます。事前にそれぞれの見積もりを確認できるため、処理を始める前に合計金額が明確になります。
処理時間はプロジェクトによって異なります。書き起こし、翻訳、音声生成、ミキシングの各段階の進捗状況がプロジェクトごとに報告されるため、ユーザーに進捗を表示し、翻訳完了後にファイルをダウンロードすることが可能です。
7つの動画形式(MP4、MOV、MKV、AVI、WebM、M4V、3GP)と4つの音声形式(MP3、WAV、FLAC、M4A)に対応しています。また、YouTube、Googleドライブ、S3、Vimeo、または直接のURLから動画をアップロードすることも可能です。
はい。翻訳された音声のタイミングに合わせた「.srt」および「.vtt」形式の字幕ファイルを、翻訳済み動画と一緒にダウンロードできます。動画に焼き付けられた字幕は、Raskアプリ内で作成されます。
はい。トランスクリプトを取得して元のテキストを編集し、Raskに再翻訳させたり、翻訳されたテキストを直接編集して独自の言葉遣いやトーンを維持したりできます。その後、プロジェクトの音声を再生成します。用語集を使用することで、どの言語バージョンでもブランド名を一貫させることができます。
一般的なチャットモデルであれば、貼り付けられたトランスクリプトを翻訳することは可能です。ただし、翻訳された動画を公開するには、書き起こし、タイミングの調整、音声の生成、音声のミキシング、字幕ファイルも必要になります。Raskの動画翻訳APIは、動画ファイル自体からこれらすべての出力を作成します。
APIのご利用料金は、動画の分数(1分未満は切り上げ)ごとに、Raskアプリの持ち分時間から差し引かれます。プランの持ち分時間を超えた場合は1分あたり3ドルとなり、大量利用については別途ご相談となります。リップシンクは別料金となりますが、どのカウントでも1分間の無料プレビューをご利用いただけます。また、編集後の再吹き替えは変更された部分のみ課金されます。クレジットカード不要の無料トライアルからぜひお試しください。