Extract Transcript
curl --request POST \
--url https://api.usenarrative.ai/api/v1/transcript \
--header 'Content-Type: application/json' \
--data '
{
"video_url": "https://example.com/video.mp4",
"include_speakers": true,
"include_timestamps": true
}
'import requests
url = "https://api.usenarrative.ai/api/v1/transcript"
payload = {
"video_url": "https://example.com/video.mp4",
"include_speakers": True,
"include_timestamps": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
video_url: 'https://example.com/video.mp4',
include_speakers: true,
include_timestamps: true
})
};
fetch('https://api.usenarrative.ai/api/v1/transcript', 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.usenarrative.ai/api/v1/transcript",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'video_url' => 'https://example.com/video.mp4',
'include_speakers' => true,
'include_timestamps' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.usenarrative.ai/api/v1/transcript"
payload := strings.NewReader("{\n \"video_url\": \"https://example.com/video.mp4\",\n \"include_speakers\": true,\n \"include_timestamps\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.usenarrative.ai/api/v1/transcript")
.header("Content-Type", "application/json")
.body("{\n \"video_url\": \"https://example.com/video.mp4\",\n \"include_speakers\": true,\n \"include_timestamps\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenarrative.ai/api/v1/transcript")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"video_url\": \"https://example.com/video.mp4\",\n \"include_speakers\": true,\n \"include_timestamps\": true\n}"
response = http.request(request)
puts response.read_body{
"transcript": [
{
"text": "Welcome to the game.",
"start_time_sec": 0.5,
"end_time_sec": 2.1,
"speaker": "Speaker 1"
}
],
"full_text": "Welcome to the game. Today we have an exciting matchup...",
"duration_sec": 3600
}{
"detail": "Invalid video URL provided"
}{
"detail": "Invalid video URL provided"
}Analysis
Extract Transcript
Extract audio-visual transcript with timestamps and speaker diarization
POST
/
api
/
v1
/
transcript
Extract Transcript
curl --request POST \
--url https://api.usenarrative.ai/api/v1/transcript \
--header 'Content-Type: application/json' \
--data '
{
"video_url": "https://example.com/video.mp4",
"include_speakers": true,
"include_timestamps": true
}
'import requests
url = "https://api.usenarrative.ai/api/v1/transcript"
payload = {
"video_url": "https://example.com/video.mp4",
"include_speakers": True,
"include_timestamps": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
video_url: 'https://example.com/video.mp4',
include_speakers: true,
include_timestamps: true
})
};
fetch('https://api.usenarrative.ai/api/v1/transcript', 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.usenarrative.ai/api/v1/transcript",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'video_url' => 'https://example.com/video.mp4',
'include_speakers' => true,
'include_timestamps' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.usenarrative.ai/api/v1/transcript"
payload := strings.NewReader("{\n \"video_url\": \"https://example.com/video.mp4\",\n \"include_speakers\": true,\n \"include_timestamps\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.usenarrative.ai/api/v1/transcript")
.header("Content-Type", "application/json")
.body("{\n \"video_url\": \"https://example.com/video.mp4\",\n \"include_speakers\": true,\n \"include_timestamps\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenarrative.ai/api/v1/transcript")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"video_url\": \"https://example.com/video.mp4\",\n \"include_speakers\": true,\n \"include_timestamps\": true\n}"
response = http.request(request)
puts response.read_body{
"transcript": [
{
"text": "Welcome to the game.",
"start_time_sec": 0.5,
"end_time_sec": 2.1,
"speaker": "Speaker 1"
}
],
"full_text": "Welcome to the game. Today we have an exciting matchup...",
"duration_sec": 3600
}{
"detail": "Invalid video URL provided"
}{
"detail": "Invalid video URL provided"
}POST /api/v1/transcript
Extract audio-visual transcript from video with word-level timestamps and optional speaker diarization. Returns both structured segments and full text.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| video_url | URL | Yes | URL to the video to transcribe |
| include_speakers | boolean | No | Include speaker diarization (default: false) |
| include_timestamps | boolean | No | Include word-level timestamps (default: true) |
Response
| Field | Description |
|---|---|
| transcript | Array of transcript segments with timestamps |
| full_text | Complete transcript as plain text |
| duration_sec | Duration of the video in seconds |
Transcript Segment Object
| Field | Description |
|---|---|
| text | Transcript text for this segment |
| start_time_sec | Start time of the segment in seconds |
| end_time_sec | End time of the segment in seconds |
| speaker | Speaker identifier (only when include_speakers=true) |
Example Request
curl -X POST https://api.usenarrative.ai/api/v1/transcript \
-H "Content-Type: application/json" \
-d '{
"video_url": "https://example.com/interview.mp4",
"include_speakers": true,
"include_timestamps": true
}'
Example Response
{
"transcript": [
{
"text": "Welcome to the show. Today we have a special guest.",
"start_time_sec": 0.5,
"end_time_sec": 3.2,
"speaker": "Speaker 1"
},
{
"text": "Thanks for having me. I'm excited to be here.",
"start_time_sec": 3.5,
"end_time_sec": 5.8,
"speaker": "Speaker 2"
},
{
"text": "Let's dive right in. Tell us about your latest project.",
"start_time_sec": 6.1,
"end_time_sec": 8.9,
"speaker": "Speaker 1"
}
],
"full_text": "Welcome to the show. Today we have a special guest. Thanks for having me. I'm excited to be here. Let's dive right in. Tell us about your latest project.",
"duration_sec": 3600
}
Notes
- Transcription uses state-of-the-art speech recognition
- Speaker diarization identifies unique speakers (Speaker 1, Speaker 2, etc.)
- Timestamps are precise to the hundredth of a second
- The
full_textfield provides the complete transcript without timestamps - Supports multiple languages (auto-detected)
Body
application/json
Response
Transcript extracted successfully

