# 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



ส่งไฟล์เป็นข้อมูลฟอร์มแบบหลายส่วน (multipart form data) หรือโพสต์ลิงก์จาก YouTube, Google Drive, S3, Vimeo หรือ URL ดาวน์โหลดโดยตรงใดก็ได้ คุณจะได้รับรหัสสื่อ (media 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ดังนั้นการแก้ไขในภายหลังจึงไม่ส่งผลกระทบต่อAงานที่เสร็จสมบูรณ์แล้วมีครับ/ค่ะ API แปลวิดีโอของ Rask จะรับไฟล์วิดีโอหรือลิงก์และภาษาปลายทาง จากนั้นจะถอดเสียง แปล สร้างเสียงพากย์ และผสมเสียงเข้ากับเสียงพื้นหลังเดิม คุณจะได้วิดีโอที่แปลแล้ว ไฟล์ซับไตเติล และข้อความที่แปล โดยไม่ต้องทำเองทีละขั้นตอน คุณสามารถเพิ่มการตรวจสอบโดยมนุษย์ก่อนเผยแพร่ได้หากความถูกต้องเป็นสิ่งสำคัญ
สามารถใช้งาน API ได้ในแพ็กเกจ Creator Pro, Business และ Enterprise โดยความสามารถจะขึ้นอยู่กับแพ็กเกจที่คุณเลือก คุณสามารถสร้างคีย์ API ในแอปและเริ่มใช้งานได้ทันที สำหรับเงื่อนไขของระดับ Enterprise, ส่วนลดตามปริมาณการใช้งาน และภาษาพิเศษ โปรดติดต่อทีมงานของเรา
ใช้ API key หนึ่งตัว ส่งเป็น bearer token ทุกครั้งที่มีการเรียกใช้งาน ไม่มีการแลกเปลี่ยนโทเค็นและไม่ต้องรีเฟรช ให้การเชื่อมต่อแต่ละรายการมีคีย์ของตัวเองพร้อมสิทธิ์ที่จำเป็น และตั้งค่าวงเงินค่าใช้จ่ายรายเดือนได้
ทำงานแบบอะซิงโครนัสพร้อมระบบรอในตัว การสร้างโปรเจกต์จะส่งคืนสถานะงานทันที เรียกใช้งาน GET /v3/jobs/{job_id}?wait_seconds=20 แล้วระบบจะส่งผลลัพธ์กลับมาทันทีที่การแปลเสร็จสิ้น
ไม่มีเลยครับ/ค่ะ API ไม่จำกัดจำนวนคำขอและไม่มีโควตาต่อคีย์ ปริมาณงานของคุณถูกจำกัดด้วยคิวการประมวลผล และลำดับความสำคัญในการประมวลผลเป็นส่วนหนึ่งของเงื่อนไขสำหรับองค์กร
รองรับกว่า 135 ภาษา พร้อมสำเนียงท้องถิ่นที่สำคัญ ดังนั้น target_language จึงรองรับรหัสภาษา เช่น es-mx หรือ pt-br ระบบจะตรวจจับภาษาต้นทางให้อัตโนมัติ หรือคุณจะตั้งค่าเองก็ได้ รายชื่อภาษาทั้งหมดที่รองรับอยู่ในคู่มือ API สำหรับภาษาที่นอกเหนือจากนี้ โปรดติดต่อทีมงานของเราเพื่อพูดคุยถึงความเป็นไปได้และตัวเลือกที่มี
ได้ โปรเจกต์หนึ่งจะมีภาษาเป้าหมายเดียว ดังนั้นคุณจึงสร้างโปรเจกต์แยกตามแต่ละภาษาจากไฟล์ที่อัปโหลดครั้งเดียวและรันพร้อมกันได้ ประเมินราคาก่อนแต่ละรายการแล้วคุณจะรู้ยอดรวมทั้งหมดก่อนที่งานจะเริ่ม
เวลาในการประมวลผลจะแตกต่างกันไปตามแต่ละโปรเจกต์ แต่ละโปรเจกต์จะรายงานสถานะขณะดำเนินการถอดเสียง แปล สร้างเสียง และรวมเสียง คุณจึงแสดงความคืบหน้าให้ผู้ใช้เห็นและดาวน์โหลดไฟล์ได้เมื่อการแปลเสร็จสมบูรณ์
เจ็ดรูปแบบวิดีโอ (MP4, MOV, MKV, AVI, WebM, M4V, 3GP) และสี่รูปแบบเสียง (MP3, WAV, FLAC, M4A) คุณยังสามารถอัปโหลดวิดีโอจาก YouTube, Google Drive, S3, Vimeo หรือลิงก์ตรงได้อีกด้วย
ได้ครับ/ค่ะ คุณสามารถดาวน์โหลดซับไตเติลที่แปลแล้วในรูปแบบ .srt และ .vtt พร้อมกับวิดีโอที่แปล โดยจับเวลาตรงกับเสียงที่แปลแล้ว ซับไตเติลที่ฝังในวิดีโอจะถูกสร้างขึ้นในแอป Rask
ได้ครับ/ค่ะ ดึงบทถอดเสียง แก้ไขข้อความต้นทาง และให้ Rask แปลใหม่อีกครั้ง หรือแก้ไขข้อความที่แปลแล้วโดยตรงเพื่อให้ใช้คำและน้ำเสียงของคุณเอง จากนั้นพากย์เสียงโปรเจกต์ใหม่อีกครั้ง อภิธานศัพท์ช่วยรักษาชื่อแบรนด์ให้คงที่ในทุกเวอร์ชันภาษา
โมเดลแชททั่วไปสามารถแปลบทถอดเสียงที่คุณคัดลอกมาวางได้ แต่การจะเผยแพร่วิดีโอที่แปลแล้ว คุณยังต้องมีการถอดเสียง การจัดจังหวะ เสียงพากย์ การผสมเสียง และไฟล์ซับไตเติล API แปลวิดีโอของ Rask จะสร้างผลลัพธ์เหล่านั้นออกมาจากไฟล์วิดีโอโดยตรง
การใช้งาน API จะคิดค่าบริการเป็นนาทีตามความยาวของวิดีโอ โดยจะปัดเศษขึ้นเป็นนาทีเต็ม และใช้โควตานาท่วมจากแพ็กเกจเดียวกับแอป Rask หากใช้นาท่วมแพ็กเกจ จะมีค่าใช้จ่าย 3 ดอลลาร์ต่อนาที และสามารถติดต่อทีมงานของเราเพื่อตกลงเงื่อนไขสำหรับปริมาณการใช้งานมากได้ สำหรับฟีเจอร์ซิงค์ริมฝีปากจะคิดค่าบริการแยกต่างหาก โดยทุกบัญชีจะได้รับสิทธิ์ทดลองใช้ฟรี 1 นาที และหากมีการแก้ไขและพากย์เสียงทับใหม่ จะคิดค่าบริการเฉพาะส่วนที่มีการเปลี่ยนแปลงเท่านั้น เริ่มต้นใช้งานได้ฟรีโดยไม่ต้องใช้บัตรเครดิต