Get video transcription
curl --request GET \
--url https://api.videodb.io/video/{video_id}/transcription/ \
--header 'x-access-token: <api-key>'const options = {method: 'GET', headers: {'x-access-token': '<api-key>'}};
fetch('https://api.videodb.io/video/{video_id}/transcription/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.videodb.io/video/{video_id}/transcription/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.videodb.io/video/{video_id}/transcription/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-access-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.videodb.io/video/{video_id}/transcription/")
.header("x-access-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.videodb.io/video/{video_id}/transcription/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-access-token"] = '<api-key>'
response = http.request(request)
puts response.read_body$headers=@{}
$headers.Add("x-access-token", "<api-key>")
$response = Invoke-WebRequest -Uri 'https://api.videodb.io/video/{video_id}/transcription/' -Method GET -Headers $headersimport Foundation
let url = URL(string: "https://api.videodb.io/video/{video_id}/transcription/")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["x-access-token": "<api-key>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))using RestSharp;
var options = new RestClientOptions("https://api.videodb.io/video/{video_id}/transcription/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-access-token", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api.videodb.io/video/{video_id}/transcription/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-access-token", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {method: 'GET', headers: {'x-access-token': '<api-key>'}};
fetch('https://api.videodb.io/video/{video_id}/transcription/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.videodb.io/video/{video_id}/transcription/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-access-token: <api-key>");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.videodb.io/video/{video_id}/transcription/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-access-token: <api-key>");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.videodb.io/video/{video_id}/transcription/")
.get()
.addHeader("x-access-token", "<api-key>")
.build()
val response = client.newCall(request).execute(){
"success": true,
"status": "completed",
"data": {
"transcript": [
{
"text": "Hello world",
"start": 1.5,
"end": 3.2
}
]
}
}Get Video Transcription
Retrieve the transcription for a video
GET
/
video
/
{video_id}
/
transcription
/
Get video transcription
curl --request GET \
--url https://api.videodb.io/video/{video_id}/transcription/ \
--header 'x-access-token: <api-key>'const options = {method: 'GET', headers: {'x-access-token': '<api-key>'}};
fetch('https://api.videodb.io/video/{video_id}/transcription/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.videodb.io/video/{video_id}/transcription/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.videodb.io/video/{video_id}/transcription/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-access-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.videodb.io/video/{video_id}/transcription/")
.header("x-access-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.videodb.io/video/{video_id}/transcription/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-access-token"] = '<api-key>'
response = http.request(request)
puts response.read_body$headers=@{}
$headers.Add("x-access-token", "<api-key>")
$response = Invoke-WebRequest -Uri 'https://api.videodb.io/video/{video_id}/transcription/' -Method GET -Headers $headersimport Foundation
let url = URL(string: "https://api.videodb.io/video/{video_id}/transcription/")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["x-access-token": "<api-key>"]
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))using RestSharp;
var options = new RestClientOptions("https://api.videodb.io/video/{video_id}/transcription/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-access-token", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api.videodb.io/video/{video_id}/transcription/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-access-token", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {method: 'GET', headers: {'x-access-token': '<api-key>'}};
fetch('https://api.videodb.io/video/{video_id}/transcription/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.videodb.io/video/{video_id}/transcription/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-access-token: <api-key>");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.videodb.io/video/{video_id}/transcription/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-access-token: <api-key>");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.videodb.io/video/{video_id}/transcription/")
.get()
.addHeader("x-access-token", "<api-key>")
.build()
val response = client.newCall(request).execute(){
"success": true,
"status": "completed",
"data": {
"transcript": [
{
"text": "Hello world",
"start": 1.5,
"end": 3.2
}
]
}
}Retrieve the timestamped transcription for a video. Supports multiple segmentation types and time ranges.
Silence ranges may be included with
import videodb
conn = videodb.connect(api_key="your_api_key")
coll = conn.get_collection()
video = coll.get_videos()[0]
# Get full transcript with word-level timestamps
transcript = video.get_transcript()
for segment in transcript:
print(f"{segment['start']:.2f}s - {segment['text']}")
# Get plain text transcript
text = video.get_transcript_text()
print(f"Full text: {text}")
# Segment by sentence instead of word
transcript = video.get_transcript(segmenter="sentence")
# Group every 10 words
transcript = video.get_transcript(segmenter="word", length=10)
# Fixed-duration audio segments (e.g., 5-second chunks)
transcript = video.get_transcript(segmenter="time", length=5)
# Get transcript for a specific time range
transcript = video.get_transcript(start=10, end=60)
import { connect } from 'videodb';
const conn = connect({ apiKey: 'your_api_key' });
const coll = await conn.getCollection();
const videos = await coll.getVideos();
const video = videos[0];
// Get full transcript with timestamps
const transcript = await video.getTranscript();
for (const segment of transcript) {
console.log(`${segment.start.toFixed(2)}s - ${segment.text}`);
}
// Get plain text transcript
const text = await video.getTranscriptText();
console.log(`Full text: ${text}`);
// Segment by sentence instead of word
const sentenceTranscript = await video.getTranscript({ segmenter: 'sentence' });
// Group every 10 words
const wordGroups = await video.getTranscript({ segmenter: 'word', length: 10 });
// Fixed-duration audio segments
const timeTranscript = await video.getTranscript({ segmenter: 'time', length: 5 });
// Get transcript for a specific time range
const rangeTranscript = await video.getTranscript({ start: 10, end: 60 });
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
segmenter | str | "word" | How to split the transcript: "word", "sentence", or "time" |
length | int | 1 | Group size: words for word, sentences for sentence, or seconds for time |
start | float | — | Start time in seconds (must be >= 0) |
end | float | — | End time in seconds (must be >= start) |
force | bool | false | Force re-fetch from server, bypassing cache |
- SDK helpers return a list of dicts with
start(float),end(float), andtext(str) for each segment - The raw API response wraps this as
data.word_timestampsplusdata.text - Transcription segmentation is audio/text-based and is independent of visual scene segmentation
- Invalid segmenter values raise a
ValueError - Negative
start/endorstart > endraise aValueError - Generates transcript automatically if not already created
Raw response shape
When completed, the server returns transcript text and timestamped entries:{
"success": true,
"status": "completed",
"data": {
"text": "I need to leave now.",
"word_timestamps": [
{"start": 0.4, "end": 0.8, "text": "I"},
{"start": 0.8, "end": 1.2, "text": "need"},
{"start": 1.2, "end": 1.6, "text": "to"},
{"start": 1.6, "end": 2.1, "text": "leave"},
{"start": 2.1, "end": 2.8, "text": "now."}
]
}
}
text: "-".Authorizations
API key for authentication (sk-xxx format)
Path Parameters
Pattern:
^m-Example:
"m-12345"
Query Parameters
Example:
"default"
Example:
10.5
Example:
60
Example:
"word"
Example:
1
⌘I