# 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": "en-us"}'
# 3. create the 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": "en-us",
"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 Drive、Vimeo、S3のリンクまたは動画への直接リンクを送信します。料金が発生する前に、メディアIDと動画のメタデータを取得できます。
メディアIDをmedia_idとして渡し、翻訳先の言語を指定します。元の言語を指定しなければ、言語は自動で検出されます。文字起こしはすぐに始まります。media_id
文字起こしは準備ができた区間から取得できるため、翻訳版のメディアを処理している間に、収録内容のインデックス作成を始められます。プロジェクトが完了したら、字幕とメディアのファイルをダウンロードできます。
# pip install rask-sdk
from rask_sdk import Rask
rask = Rask() # reads RASK_API_KEY
uploaded = rask.jobs.wait(rask.uploads.upload_file("interview.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="en-us"
)
# the price you accepted is the ceiling
created = rask.projects.create_project(
media_id=media_id,
target_language="en-us",
expected_cost_minutes=estimate.total_minutes,
)
processed = rask.jobs.wait(created.id)
for o in rask.exports.list_project_outputs(processed.result.project_id).data:
print(o.kind, o.url)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": "en-us"}
# 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()
for o in outputs["data"]:
print(o["kind"], o["url"])// 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: 'en-us' };
// 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());
outputs.data.forEach(o => console.log(o.kind, o.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\":\"en-us\"}"
# 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 transcript and every other output
curl -s $API/projects/$ID/outputs -H "$AUTH" \
| jq -r '.data[] | "\(.kind)\t\(.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' => 'en-us'];
// 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);no_audio_track, no_speech_detected and source_unavailable are specific enough to show directly to your own user, for example a video without speech. 0s queued
3s running transcribing
48s running translating
72s running voicing
128s running merging
150s succeeded/transcriptiontarget_subtitlestarget_subtitles_speakersdubbed_videodubbed_audiosource

es-mx と es-es の両方に使えます。各プロジェクトには glossary.versionが記録されるため、後から用語集を編集しても、完成済みの成果物が知らないうちに変わることはありません。はい。動画ファイルまたはリンクを送信してプロジェクトを作成すると、GET /v3/projects/{project_id}/transcript で話者ラベルとタイムスタンプ付きの文字起こしを取得できます。Raskのすべてのプロジェクトは文字起こしから始まり、その後、翻訳、字幕、吹き替え版が追加されます。
はい。YouTube、Google Drive、Vimeo、S3のリンク、または直接ダウンロード用のリンクをメディアエンドポイントにPOSTすると、APIが動画を取得します。動画ファイルを直接アップロードすることもできます。
はい。動画ごとにプロジェクトを作成し、並列で実行できます。各動画の料金を事前に見積もれば、最初のプロジェクトを開始する前にライブラリ全体の費用を把握できます。
話者は自動で識別され、各セグメントにSPEAKER_00などの話者ラベルが付きます。話者数がわかっている場合は、プロジェクト作成時にnum_speakersで指定してください。
APIは英語を含む75言語の音声を文字起こしできます。言語を自動検出するにはsource_languageを空にします。言語を指定する場合はenなどのコードを渡します。文字起こしの翻訳先には、en-usやes-mxなど、言語や地域別のバリエーションを含む135を超える選択肢があります。
精度は動画によって異なります。背景ノイズや収録環境の騒音、発話の重なり、アクセント、専門用語などが影響します。お手元の動画でAPIをお試しください。公開前に、必要な箇所をセグメント単位でAPIから修正できます。
文字起こしは、話者情報とタイムスタンプが付いたセグメントとしてJSON形式で返されます。各セグメントのテキストを連結すればプレーンテキストになり、タイムスタンプを残せば検索時に該当箇所を特定できます。翻訳先の言語の字幕もSRT形式とVTT形式で含まれます。
いいえ。APIが返すのは、文字起こし、その翻訳、字幕、吹き替え版です。AIで要約や会議メモを作成するには、お好みの要約ツールに文字起こしを渡してください。
はい。録画・録音した会議を動画ファイルまたは音声ファイルとしてアップロードしてください。APIは会議プラットフォームに接続するものではなく、通話中のリアルタイム字幕や低遅延の文字起こしには対応していません。
APIドキュメントでは、ファイルサイズの固定上限は公表していません。各プロジェクトでは、ご利用プランの制限が適用された後にsource_duration_secondsとduration_secondsが返されます。非常に長い動画や大量の動画を処理する場合は、担当チームにご相談ください。
プロジェクトごとに動画の長さを分単位で切り上げて課金します。利用分数はRaskアプリと共通の残高から差し引かれます。料金には文字起こし、翻訳、字幕、吹き替え版が含まれます。対象の標準プランでは、追加利用料金は$3/分です。Enterpriseの料金はご契約内容に応じて決まります。
Raskアプリの無料体験で、お手持ちの動画の文字起こしをお試しいただけます。クレジットカードは不要です。APIはCreator Pro、Business、Enterpriseプランで利用でき、対応機能はプランによって異なります。
APIはCreator Pro、Business、Enterpriseプランで利用でき、対応機能はプランによって異なります。アプリでAPIキーを作成すれば、すぐにAPIを呼び出せます。Enterpriseプラン、大量利用向けの料金、対応言語の個別リクエストについては、当社チームにご相談ください。