POST Subtitling
Generates time-coded subtitles for a video, in one or several languages. Processing is asynchronous : you create a job, poll its progress, then download the files SRT / VTT.
Service withdrawn
Subtitling is no longer offered. The endpoints below respond 410 and nothing is billed; jobs that are already finished remain readable.
Upload multipart/form-data.
Create a job
POST/subtitle/jobs
| Name | Type | Description |
fileone of the two | file | The video to subtitle (80 MB max). |
source_urlone of the two | string | Direct link to a file, or a video-platform link. |
target_langsoption | string | Target languages, comma-separated (one track per language). |
source_langoption | string | Language spoken in the video. Default auto. |
Track & export
| Endpoint | Role |
GET /subtitle/jobs/{id} | Status + time-coded segments. |
GET /subtitle/jobs/{id}/export | Subtitle file. Query format=srt|vtt|ttml, track=target|original, lang. |
POST /subtitle/jobs/{id}/translate | Add languages to an already-transcribed job — body {"langs": […]}. |
GET /subtitle/jobs | List your recent jobs. |
Billed per minute of video.
# 1. create the job
curl https://api.kooma.ai/subtitle/jobs \
-H "Authorization: Bearer sk-intermo-YOUR_KEY" \
-F file=@video.mp4 \
-F source_lang=bam_Latn \
-F target_langs=fra_Latn,eng_Latn
# 2. when status=done, export the French SRT
curl "https://api.kooma.ai/subtitle/jobs/JOB_ID/export?format=srt&track=target&lang=fra_Latn" \
-H "Authorization: Bearer sk-intermo-YOUR_KEY" \
--output subtitles-fr.srt
import requests
H = {"Authorization": "Bearer sk-intermo-YOUR_KEY"}
job = requests.post(
"https://api.kooma.ai/subtitle/jobs", headers=H,
files={"file": open("video.mp4", "rb")},
data={"source_lang": "bam_Latn", "target_langs": "fra_Latn,eng_Latn"},
).json()
# ... poll /subtitle/jobs/{id} until done ...
srt = requests.get(
f"https://api.kooma.ai/subtitle/jobs/{job['job_id']}/export",
headers=H, params={"format": "srt", "track": "target", "lang": "fra_Latn"},
).text
200 OK job created
{
"job_id": "a1b2c3d4e5f6a7b8",
"status": "queued",
"duration_sec": 184.2,
"minutes": 4,
"target_langs": ["fra_Latn", "eng_Latn"]
}
Burn subtitles into the video
POST /subtitle/jobs/{job_id}/burn — burns the subtitles into the picture (open captions), for platforms that do not display a separate track. Processing is asynchronous : transcoding is heavy, the result arrives as a link.
| Field | Type | Description |
lang | string | Language of the track to burn in. |
track | string | Source track: original or translated. |
style | string | Text appearance. |
position | string | Placement on screen. |
size | string | Text size. |
Suis burn_status on the job, then fetch the video from /subtitle/jobs/{job_id}/download.
Subtitling rates
GET /subtitle/pricing — unit rates in your wallet currency, to produce a quote before starting a job. Consumes nothing.
Three status fields, not to be confused
A subtitling job carries three independent statuses:
status — the subtitling itself: queued, processing, done, empty, error.
tr_status — the subtitle translation: running, done, error.
burn_status — burning into the video: none, burning, ready, error.
Never wait for ready on status: it never takes that value. It is burn_status carries it, and a loop that ignores this runs forever.