Get visual captions (4 modes)
curl --request GET \
--url https://api.memories.ai/serve/datalake/v1/videos/{id}/caption \
--header 'Authorization: <api-key>'import requests
url = "https://api.memories.ai/serve/datalake/v1/videos/{id}/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/datalake/v1/videos/{id}/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/datalake/v1/videos/{id}/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/datalake/v1/videos/{id}/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/datalake/v1/videos/{id}/caption")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memories.ai/serve/datalake/v1/videos/{id}/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{
"segments": [
{
"start": 25,
"end": 32,
"text": "…"
}
],
"aggregated": "joined text"
}Moments & Derived Content
Get Caption
Get visual captions (4 modes)
GET
/
datalake
/
v1
/
videos
/
{id}
/
caption
Get visual captions (4 modes)
curl --request GET \
--url https://api.memories.ai/serve/datalake/v1/videos/{id}/caption \
--header 'Authorization: <api-key>'import requests
url = "https://api.memories.ai/serve/datalake/v1/videos/{id}/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/datalake/v1/videos/{id}/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/datalake/v1/videos/{id}/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/datalake/v1/videos/{id}/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/datalake/v1/videos/{id}/caption")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memories.ai/serve/datalake/v1/videos/{id}/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{
"segments": [
{
"start": 25,
"end": 32,
"text": "…"
}
],
"aggregated": "joined text"
}Product: Video Datalake
Host:
https://api.memories.ai/serve/datalake/v1
Auth: Authorization: sk-mai-...as=url > since > start/end > no params: whole text, a time window, an incremental cursor (live polling), or a WebVTT file link.
Pricing: $0.001 / call · See Pricing for the full model.
Response Fields
string
Whole-text mode: the full caption string.
array
Windowed / incremental:
[{start,end,text}].string
Incremental mode cursor.
boolean
true while still indexing (more segments coming).string
as=url mode: signed WebVTT link.Notes
Empty content while stillprocessing → 409 video_not_ready.Authorizations
Send Authorization: sk-mai-...
Path Parameters
Video ID.
Query Parameters
Window start seconds.
Window end seconds.
Incremental cursor (empty for first page).
url to get a .vtt signed link.
Response
200 - application/json
Success
