Get Video Caption
curl --request GET \
--url https://api.memories.ai/serve/api/v1/get_video_caption \
--header 'Authorization: <api-key>'import requests
url = "https://api.memories.ai/serve/api/v1/get_video_caption"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.memories.ai/serve/api/v1/get_video_caption', 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.memories.ai/serve/api/v1/get_video_caption",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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.memories.ai/serve/api/v1/get_video_caption"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.memories.ai/serve/api/v1/get_video_caption")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memories.ai/serve/api/v1/get_video_caption")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": "0000",
"msg": "success",
"data": {},
"success": true,
"failed": false
}Library Management
Get Video Caption
Retrieve the visual (scene-by-scene) caption auto-generated for a video in your Private Video Library.
GET
/
serve
/
api
/
v1
/
get_video_caption
Get Video Caption
curl --request GET \
--url https://api.memories.ai/serve/api/v1/get_video_caption \
--header 'Authorization: <api-key>'import requests
url = "https://api.memories.ai/serve/api/v1/get_video_caption"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.memories.ai/serve/api/v1/get_video_caption', 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.memories.ai/serve/api/v1/get_video_caption",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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.memories.ai/serve/api/v1/get_video_caption"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.memories.ai/serve/api/v1/get_video_caption")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memories.ai/serve/api/v1/get_video_caption")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": "0000",
"msg": "success",
"data": {},
"success": true,
"failed": false
}Product: Visual Search
Use case: Upload videos and images, auto-index them, then search by natural language, image, or transcript phrase
Host:
https://api.memories.ai/serve/api/v1
Auth: Authorization: sk-mavi-... (no Bearer prefix)Prerequisites
- You have created a memories.ai API key.
- The video has been uploaded via the Upload API and finished parsing (
status: PARSE).
Endpoint
GET /serve/api/v1/get_video_captionRequest Example
import requests
url = "https://api.memories.ai/serve/api/v1/get_video_caption"
headers = {"Authorization": "sk-mavi-..."}
params = {
"video_no": "VI702915390254350336",
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
Query Parameters
string
required
The video identifier returned by the upload API.
Response Example
{
"code": "0000",
"msg": "success",
"data": {
"videoNo": "VI702915390254350336",
"transcriptions": [
{
"index": 0,
"content": "A person's hand is seen holding a white object, possibly a phone, near a wooden door. The camera pans slightly to reveal a wall with coats hanging on a rack.",
"startTime": "0",
"endTime": "4"
},
{
"index": 1,
"content": "The camera moves past a wooden door, revealing a hallway with another door at the end. A laundry basket is visible on the right.",
"startTime": "4",
"endTime": "7"
}
],
"createTime": "1777047288621",
"video_bucket": "mavi-resource",
"video_blob": "VI702915390254350336.mp4"
},
"success": true,
"failed": false
}
Response Fields
string
Business status code.
0000 indicates success.string
Human-readable status message.
string
Echo of the requested video identifier.
array
Ordered list of scene description segments covering the full video.
integer
Zero-based index of the segment within the video.
string
Natural-language description of what is visible on screen during this segment.
string
Segment start time in seconds, returned as a string.
string
Segment end time in seconds, returned as a string.
string
Upload-time timestamp of the underlying video, in milliseconds since epoch, returned as a string.
string
GCS bucket of the underlying video file. Omitted when the storage location cannot be resolved.
string
GCS blob (object) path of the underlying video. Use it with
video_bucket at GET /serve/api/v2/download?bucket=&blob= to fetch the file directly.boolean
true when code == "0000".boolean
Inverse of
success.Notes & Limits
- Availability:
data.transcriptionsis populated by the indexing pipeline. If the video has not yet reachedstatus: PARSE, the call may returndata: nullor an emptytranscriptionsarray — poll Get Metadata until parsing completes before depending on the result. - Numeric strings:
startTime,endTime, andcreateTimeare strings — cast withint(...)before arithmetic. - Rate limiting: Subject to the standard Visual Search rate limits. See Rate limits.
Authorizations
Query Parameters
The unique video ID returned by the upload API.
