# 1. import the video
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": "de-de"}'
# 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": "de-de",
"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, S3, Vimeo หรือ URL ใดก็ได้ อัปโหลดเพียงครั้งเดียวใช้ได้กับซับไตเติลทุกภาษา
ส่ง media_id และเลือก 1 ภาษาเป้าหมายต่อโปรเจกต์ ซึ่งคุณสามารถสร้างโปรเจกต์สำหรับหลายภาษาพร้อมกันได้
รอจนกว่ากระบวนการจะเสร็จสมบูรณ์ จากนั้นดาวน์โหลดไฟล์ซับไตเติลในรูปแบบ .srt หรือ .vtt ผ่าน GET /v3/projects/{project_id}/subtitles และบันทึกไว้ฝั่งของคุณ
# pip install rask-sdk
from rask_sdk import Rask
rask = Rask() # reads RASK_API_KEY
uploaded = rask.jobs.wait(rask.uploads.upload_file("webinar.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="de-de"
)
# the price you accepted is the ceiling
created = rask.projects.create_project(
media_id=media_id,
target_language="de-de",
expected_cost_minutes=estimate.total_minutes,
)
processed = rask.jobs.wait(created.id)
# the .srt and .vtt files are among the project outputs
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": "de-de"}
# 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()
# the .srt and .vtt files are among the project outputs
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: 'de-de' };
// 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());
// the .srt and .vtt files are among the project outputs
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\":\"de-de\"}"
# 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 .srt and .vtt files
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' => 'de-de'];
// 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);
// the .srt and .vtt files are among the project outputs
$outputs = json_decode(
$http->get("projects/{$project['project_id']}/outputs")->getBody(), true); 0s queued
3s running transcribing
48s running translating
70s succeeded the .srt and .vtt files are in the project outputs

es-mx และ es-es เหมือนกัน บันทึกของโปรเจกต์ glossary.versionดังนั้นการแก้ไขในภายหลังจึงไม่ส่งผลกระทบต่อAงานที่เสร็จสมบูรณ์แล้วมี ทุกโปรเจกต์ของ Rask จะส่งไฟล์ซับไตเติลในรูปแบบ SRT และ WebVTT ในภาษาปลายทางกลับมาให้ เพียงอัปโหลดวิดีโอ สร้างโปรเจกต์สำหรับแต่ละภาษาที่ต้องการ แล้วดาวน์โหลดไฟล์เมื่อโปรเจกต์เสร็จสมบูรณ์
มี 2 รูปแบบสำหรับทุกโปรเจกต์ ได้แก่ ไฟล์ SRT และ WebVTT (VTT) ในภาษาปลายทาง นอกจากนี้ยังมีไฟล์ข้อความถอดเสียงในรูปแบบ JSON พร้อมระบุเวลา หากแพลตฟอร์มของคุณต้องการรูปแบบคำบรรยายอื่น
ไฟล์ซับไตเติลจะอยู่ในภาษาปลายทาง หากต้องการคำบรรยายในภาษาต้นฉบับ ให้ดูที่ส่วนข้อความถอดเสียง ซึ่งแต่ละส่วนจะมีข้อความต้นฉบับพร้อมเวลากลมและเวลาสิ้นสุด คุณสามารถแปลงเป็นไฟล์ SRT หรือ VTT ได้ด้วยโค้ดเพียงไม่กี่บรรทัด
มีซับไตเติลให้บริการในกว่า 135 ภาษาและสำเนียงภูมิภาค เช่น es-mx, pt-br และ fr-ca จาก 75 ภาษาต้นฉบับ แต่ละโปรเจกต์รองรับ 1 ภาษาปลายทาง คุณสามารถสร้างโปรเจกต์แยกตามภาษาได้จากวิดีโอที่อัปโหลดไฟล์เดียว
ยังไม่ได้ในตอนนี้ API จะส่งไฟล์ซับไตเติลเพื่อให้คุณนำไปใช้กับเครื่องเล่นหรือโปรแกรมตัดต่อวิดีโอ หากต้องการวิดีโอที่ฝังซับไตเติลเรียบร้อยแล้ว โปรดใช้เว็บแอปของ Rask
ไฟล์ประกอบด้วยข้อความและเวลา ส่วนฟอนต์ ขนาด สี และตำแหน่งจะถูกกำหนดในเครื่องเล่นวิดีโอ แอป หรือโปรแกรมตัดต่อของคุณ ทำให้ไฟล์ซับไตเติลเพียงไฟล์เดียวสามารถนำไปใช้ได้ทุกที่
ไฟล์จะมีเฉพาะบทสนทนาที่พูดออกมา ระบบไม่ได้สร้างคำอธิบายเสียงดนตรีและเอฟเฟกต์เสียงสำหรับผู้มีปัญหาทางการได้ยินโดยอัตโนมัติ คุณสามารถเพิ่มส่วนนี้ได้ในขั้นตอนการแก้ไขคำบรรยายของคุณเอง
ข้อความถอดเสียงแต่ละส่วนจะมีป้ายกำกับผู้พูดในรูปแบบ SPEAKER_XX เพื่อให้คุณใส่ชื่อผู้พูดได้เมื่อทำคำบรรยายสำหรับการสัมภาษณ์และบทสนทนา
แก้ไขข้อความหรือเวลาของส่วนนั้นผ่าน API และสร้างโปรเจกต์ใหม่อีกครั้ง ไฟล์คำบรรยายจะถูกอัปเดตไปพร้อมกับเวอร์ชันพากย์เสียง การสร้างใหม่จะคิดค่าใช้จ่ายตามส่วนที่มีการเปลี่ยนแปลง โดยคิดเวลาขั้นต่ำหนึ่งครั้งต่อการรันหนึ่งนาที
ลิงก์ดาวน์โหลดได้รับการลงนามล่วงหน้าและใช้งานได้เป็นเวลาหนึ่งชั่วโมง โปรดบันทึกไฟล์ลงในพื้นที่จัดเก็บของคุณเอง หรือดึงข้อมูลโปรเจกต์ใหม่อีกครั้งเพื่อรับลิงก์ใหม่
ได้ สำหรับแพ็กเกจที่มีฟีเจอร์นำเข้าสคริปต์ คุณสามารถอัปโหลดคำบรรยายในภาษาต้นทาง ไฟล์ SRT ภาษาปลายทางที่ผ่านการอนุมัติแล้ว หรือทั้งสองอย่างเมื่อสร้างโปรเจกต์ ใช้คำบรรยายที่มีอยู่เป็นต้นทาง หรือใช้คำแปลที่คุณอนุมัติแล้วสำหรับคำบรรยายและเสียงพากย์ในภาษาปลายทาง
โปรเจกต์จะถูกคิดค่าใช้จ่ายตามความยาวของวิดีโอเป็นรายนาที โดยปัดเศษขึ้นเป็นนาทีเต็มที่ใกล้ที่สุด จากโควตานาทีเดียวกันกับแอป Rask ราคารวมบริการถอดเสียง แปลภาษา คำบรรยาย และเสียงพากย์แล้ว นาทีส่วนเกินมีค่าใช้จ่าย $3 ต่อนาทีในแพ็กเกจมาตรฐานที่มีสิทธิ์ สำหรับราคาในระดับองค์กรจะปรับเปลี่ยนตามข้อตกลงของคุณ
สามารถใช้งาน API ได้ในแพ็กเกจ Creator Pro, Business และ Enterprise โดยความสามารถจะขึ้นอยู่กับแพ็กเกจที่คุณเลือก คุณสามารถสร้างคีย์ API ในแอปและเริ่มใช้งานได้ทันที สำหรับเงื่อนไขของระดับ Enterprise, ส่วนลดตามปริมาณการใช้งาน และภาษาพิเศษ โปรดติดต่อทีมงานของเรา