Summarize Video
curl --request POST \
--url https://api.usenarrative.ai/api/v1/summarize \
--header 'Content-Type: application/json' \
--data '
{
"video_url": "https://example.com/video.mp4",
"format": "chapters"
}
'import requests
url = "https://api.usenarrative.ai/api/v1/summarize"
payload = {
"video_url": "https://example.com/video.mp4",
"format": "chapters"
}
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', format: 'chapters'})
};
fetch('https://api.usenarrative.ai/api/v1/summarize', 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/summarize",
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',
'format' => 'chapters'
]),
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/summarize"
payload := strings.NewReader("{\n \"video_url\": \"https://example.com/video.mp4\",\n \"format\": \"chapters\"\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/summarize")
.header("Content-Type", "application/json")
.body("{\n \"video_url\": \"https://example.com/video.mp4\",\n \"format\": \"chapters\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenarrative.ai/api/v1/summarize")
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 \"format\": \"chapters\"\n}"
response = http.request(request)
puts response.read_body{
"summary": "This video covers the key moments from the championship game...",
"duration_sec": 3600,
"chapters": [
{
"title": "Opening Kickoff",
"start_time_sec": 0,
"end_time_sec": 420
}
]
}{
"detail": "Invalid video URL provided"
}{
"detail": "Invalid video URL provided"
}Analysis
Summarize Video
Generate AI-powered video summaries
POST
/
api
/
v1
/
summarize
Summarize Video
curl --request POST \
--url https://api.usenarrative.ai/api/v1/summarize \
--header 'Content-Type: application/json' \
--data '
{
"video_url": "https://example.com/video.mp4",
"format": "chapters"
}
'import requests
url = "https://api.usenarrative.ai/api/v1/summarize"
payload = {
"video_url": "https://example.com/video.mp4",
"format": "chapters"
}
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', format: 'chapters'})
};
fetch('https://api.usenarrative.ai/api/v1/summarize', 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/summarize",
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',
'format' => 'chapters'
]),
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/summarize"
payload := strings.NewReader("{\n \"video_url\": \"https://example.com/video.mp4\",\n \"format\": \"chapters\"\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/summarize")
.header("Content-Type", "application/json")
.body("{\n \"video_url\": \"https://example.com/video.mp4\",\n \"format\": \"chapters\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenarrative.ai/api/v1/summarize")
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 \"format\": \"chapters\"\n}"
response = http.request(request)
puts response.read_body{
"summary": "This video covers the key moments from the championship game...",
"duration_sec": 3600,
"chapters": [
{
"title": "Opening Kickoff",
"start_time_sec": 0,
"end_time_sec": 420
}
]
}{
"detail": "Invalid video URL provided"
}{
"detail": "Invalid video URL provided"
}POST /api/v1/summarize
Generate an AI-powered summary of video content. Supports multiple output formats including bullet points, paragraphs, and timestamped chapters.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| video_url | URL | Yes | URL to the video to summarize |
| format | enum | No | Output format: bullet_points, paragraph, or chapters (default: paragraph) |
Response
| Field | Description |
|---|---|
| summary | Generated summary text |
| chapters | Chapter breakdown (only when format=chapters) |
| duration_sec | Duration of the video in seconds |
Chapter Object (when format=chapters)
| Field | Description |
|---|---|
| title | Chapter title |
| start_time_sec | Start time of the chapter in seconds |
| end_time_sec | End time of the chapter in seconds |
Example Request
curl -X POST https://api.usenarrative.ai/api/v1/summarize \
-H "Content-Type: application/json" \
-d '{
"video_url": "https://example.com/game.mp4",
"format": "chapters"
}'
Example Response (Chapters Format)
{
"summary": "This video covers the championship game between the Eagles and Giants, featuring key plays and dramatic moments throughout all four quarters.",
"chapters": [
{
"title": "First Quarter - Opening Drives",
"start_time_sec": 0,
"end_time_sec": 900
},
{
"title": "Second Quarter - Eagles Take the Lead",
"start_time_sec": 900,
"end_time_sec": 1800
},
{
"title": "Halftime Analysis",
"start_time_sec": 1800,
"end_time_sec": 2100
},
{
"title": "Third Quarter - Giants Fight Back",
"start_time_sec": 2100,
"end_time_sec": 3000
},
{
"title": "Fourth Quarter - Dramatic Finish",
"start_time_sec": 3000,
"end_time_sec": 3600
}
],
"duration_sec": 3600
}
Example Response (Bullet Points Format)
{
"summary": "- Eagles won the championship game 28-24\n- Key touchdown by Smith in the 4th quarter\n- Giants mounted a comeback in the 3rd quarter\n- Over 50,000 fans in attendance",
"duration_sec": 3600
}
Notes
- Processing time varies based on video length
- The AI analyzes both audio and visual content
- Chapters format is ideal for creating video navigation
- Bullet points format is concise and scannable
- Paragraph format provides a narrative summary
Body
application/json
Response
Video summarized successfully

