Skip to content

Get a version's subtitles

Request

Fetch the current version's source transcript or target translation, formatted as an SRT file.

Use the locality query parameter to indicate the desired subtitles - Set to source for fetching the transcript in the asset's source language, or target for fetching the current translation in the version's target language.

Use the srt_profile query parameter to select the subtitle formatting profile:

  • regular (default) — standard desktop and TV viewing (up to 70 chars/block, 42 chars/line, 21 CPS).
  • mobile — tighter limits for small screens (up to 45 chars/block, 22 chars/line, 17 CPS).
  • global_regular — like regular but uses a cross-sentence word-stream pipeline that produces more natural block breaks and better line balance.
  • global_mobile — like mobile with the same cross-sentence pipeline.
Security
api_key
Path
version_idstringrequired
Query
localitystring
Default:"target"
Enum:"source""target"
srt_profilestring
Default:"regular"
Enum:"regular""mobile""global_regular""global_mobile"
import requests

version_id = "YOUR_version_id_PARAMETER"
url = "https://api.panjaya.ai/v1/versions/" + version_id + "/srt"

headers = {"Authorization": "Bearer <YOUR_TOKEN_HERE>"}

response = requests.get(url, headers=headers)

data = response.json()
print(data)

Responses

SRT successfully fetched

Bodyapplication/x-subrip
string
Response
1
00:00:00,000 --> 00:00:03,000
Hello, world!