TikTok Video Caption
curl --request POST \
--url https://mavi-backend.memories.ai/serve/api/v2/tiktok/video/mai/transcript \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"video_url": "https://www.tiktok.com/@cutshall73/video/7543017294226558221"
}
'import requests
url = "https://mavi-backend.memories.ai/serve/api/v2/tiktok/video/mai/transcript"
payload = { "video_url": "https://www.tiktok.com/@cutshall73/video/7543017294226558221" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({video_url: 'https://www.tiktok.com/@cutshall73/video/7543017294226558221'})
};
fetch('https://mavi-backend.memories.ai/serve/api/v2/tiktok/video/mai/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://mavi-backend.memories.ai/serve/api/v2/tiktok/video/mai/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://www.tiktok.com/@cutshall73/video/7543017294226558221'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://mavi-backend.memories.ai/serve/api/v2/tiktok/video/mai/transcript"
payload := strings.NewReader("{\n \"video_url\": \"https://www.tiktok.com/@cutshall73/video/7543017294226558221\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://mavi-backend.memories.ai/serve/api/v2/tiktok/video/mai/transcript")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"video_url\": \"https://www.tiktok.com/@cutshall73/video/7543017294226558221\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mavi-backend.memories.ai/serve/api/v2/tiktok/video/mai/transcript")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"video_url\": \"https://www.tiktok.com/@cutshall73/video/7543017294226558221\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"task_id": "1cd78354af824c8eb1dafe4ed2435720"
},
"failed": false,
"success": true
}
{
"code": 200,
"message": "SUCCESS",
"data": {
"videoTranscript": {
"data": {
"data": [
{
"end_time": 16.0,
"start_time": 0.0,
"transcript": "A woman with blonde hair and glasses, wearing a leopard print dress, stands behind a young boy with blonde hair who is sitting in a high chair. The boy is wearing a white t-shirt with a black and red graphic that says SEE YOU LATER. He has food on his face and is holding a small, clear object in his left hand. The woman leans forward, talking to the boy, and then reaches down to adjust something on the high chair tray. The boy smiles and laughs, looking up at the woman, who then adjusts her hair."
},
{
"end_time": 30.0,
"start_time": 16.0,
"transcript": "The woman continues to talk to the boy, who is still in the high chair. She points to something on the tray and then reaches down to pick up a small, dark object. The boy watches her, then smiles and laughs again. Another child's blonde hair briefly appears in the bottom left corner of the frame as the woman continues to interact with the boy."
},
{
"end_time": 31.0,
"start_time": 30.0,
"transcript": "A young child with blonde hair leans into the frame, looking directly at the viewer. Behind the child, a woman with glasses and blonde hair, wearing a leopard print top, smiles and gestures with her right hand. Another child, a toddler, sits in a high chair in the background, partially obscured."
}
],
"error_rate": 0.0,
"usage_metadata": {
"duration": 0.0,
"model": "gemini-2.5-flash",
"output_tokens": 899,
"prompt_tokens": 13760
}
},
"msg": "Video transcription completed successfully",
"success": true
},
"audioTranscript": {
"data": {
"data": [
{
"end_time": 0.74,
"speaker": null,
"start_time": 0.0,
"text": " Say hi!"
},
{
"end_time": 1.42,
"speaker": null,
"start_time": 1.12,
"text": " Hi!"
},
{
"end_time": 3.26,
"speaker": null,
"start_time": 1.58,
"text": " Say I'm alive!"
}
],
"usage_metadata": {
"duration": 36.53898,
"model": "whisper-1",
"output_tokens": 0,
"prompt_tokens": 0
}
},
"msg": "ASR transcription completed successfully",
"success": true
}
},
"task_id": "fe8587b278534ed5af6b0e9bcba9ed11"
}
TikTok
TikTok Video Caption
Get TikTok video caption.
POST
/
tiktok
/
video
/
mai
/
transcript
TikTok Video Caption
curl --request POST \
--url https://mavi-backend.memories.ai/serve/api/v2/tiktok/video/mai/transcript \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"video_url": "https://www.tiktok.com/@cutshall73/video/7543017294226558221"
}
'import requests
url = "https://mavi-backend.memories.ai/serve/api/v2/tiktok/video/mai/transcript"
payload = { "video_url": "https://www.tiktok.com/@cutshall73/video/7543017294226558221" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({video_url: 'https://www.tiktok.com/@cutshall73/video/7543017294226558221'})
};
fetch('https://mavi-backend.memories.ai/serve/api/v2/tiktok/video/mai/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://mavi-backend.memories.ai/serve/api/v2/tiktok/video/mai/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://www.tiktok.com/@cutshall73/video/7543017294226558221'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://mavi-backend.memories.ai/serve/api/v2/tiktok/video/mai/transcript"
payload := strings.NewReader("{\n \"video_url\": \"https://www.tiktok.com/@cutshall73/video/7543017294226558221\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://mavi-backend.memories.ai/serve/api/v2/tiktok/video/mai/transcript")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"video_url\": \"https://www.tiktok.com/@cutshall73/video/7543017294226558221\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mavi-backend.memories.ai/serve/api/v2/tiktok/video/mai/transcript")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"video_url\": \"https://www.tiktok.com/@cutshall73/video/7543017294226558221\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"task_id": "1cd78354af824c8eb1dafe4ed2435720"
},
"failed": false,
"success": true
}
{
"code": 200,
"message": "SUCCESS",
"data": {
"videoTranscript": {
"data": {
"data": [
{
"end_time": 16.0,
"start_time": 0.0,
"transcript": "A woman with blonde hair and glasses, wearing a leopard print dress, stands behind a young boy with blonde hair who is sitting in a high chair. The boy is wearing a white t-shirt with a black and red graphic that says SEE YOU LATER. He has food on his face and is holding a small, clear object in his left hand. The woman leans forward, talking to the boy, and then reaches down to adjust something on the high chair tray. The boy smiles and laughs, looking up at the woman, who then adjusts her hair."
},
{
"end_time": 30.0,
"start_time": 16.0,
"transcript": "The woman continues to talk to the boy, who is still in the high chair. She points to something on the tray and then reaches down to pick up a small, dark object. The boy watches her, then smiles and laughs again. Another child's blonde hair briefly appears in the bottom left corner of the frame as the woman continues to interact with the boy."
},
{
"end_time": 31.0,
"start_time": 30.0,
"transcript": "A young child with blonde hair leans into the frame, looking directly at the viewer. Behind the child, a woman with glasses and blonde hair, wearing a leopard print top, smiles and gestures with her right hand. Another child, a toddler, sits in a high chair in the background, partially obscured."
}
],
"error_rate": 0.0,
"usage_metadata": {
"duration": 0.0,
"model": "gemini-2.5-flash",
"output_tokens": 899,
"prompt_tokens": 13760
}
},
"msg": "Video transcription completed successfully",
"success": true
},
"audioTranscript": {
"data": {
"data": [
{
"end_time": 0.74,
"speaker": null,
"start_time": 0.0,
"text": " Say hi!"
},
{
"end_time": 1.42,
"speaker": null,
"start_time": 1.12,
"text": " Hi!"
},
{
"end_time": 3.26,
"speaker": null,
"start_time": 1.58,
"text": " Say I'm alive!"
}
],
"usage_metadata": {
"duration": 36.53898,
"model": "whisper-1",
"output_tokens": 0,
"prompt_tokens": 0
}
},
"msg": "ASR transcription completed successfully",
"success": true
}
},
"task_id": "fe8587b278534ed5af6b0e9bcba9ed11"
}
Product: Visual Intelligence — Social Media Scraping
Use case: Fetch video metadata, transcripts, captions, and comments from YouTube, Instagram, TikTok, and Twitter/X
Host:
https://mavi-backend.memories.ai/serve/api/v2
Auth: Authorization: sk-mavi-... (no Bearer prefix)Channel routing guide: see Social Media Scraping Overview. Endpoints with a
channel request field let you choose apify, rapid, or memories.ai; endpoints without this field use managed routing.Pricing: Base fee (0.01/video)+Inputtokens(0.45/1M) + Output tokens (3.75/1M)+Duration(0.0001/sec)
This is an asynchronous endpoint. It returns a
task_id immediately. You must configure a Webhook to receive the processing results.If no webhook is configured on the account, the call is rejected at submit time with HTTP 400:{"code": 400, "msg": "An async request requires at least one webhook.", "data": null}
Code Example
import requests
BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2"
API_KEY = "sk-mavi-..."
HEADERS = {
"Authorization": f"{API_KEY}"
}
def tiktok_video_caption(video_url: str):
url = f"{BASE_URL}/tiktok/video/mai/transcript"
data = {"video_url": video_url}
resp = requests.post(url, headers=HEADERS, json=data)
return resp.json()
# Usage example
result = tiktok_video_caption("https://www.tiktok.com/@cutshall73/video/7543017294226558221")
print(result)
Response
Returns the caption task information.{
"code": 200,
"msg": "success",
"data": {
"task_id": "1cd78354af824c8eb1dafe4ed2435720"
},
"failed": false,
"success": true
}
{
"code": 200,
"message": "SUCCESS",
"data": {
"videoTranscript": {
"data": {
"data": [
{
"end_time": 16.0,
"start_time": 0.0,
"transcript": "A woman with blonde hair and glasses, wearing a leopard print dress, stands behind a young boy with blonde hair who is sitting in a high chair. The boy is wearing a white t-shirt with a black and red graphic that says SEE YOU LATER. He has food on his face and is holding a small, clear object in his left hand. The woman leans forward, talking to the boy, and then reaches down to adjust something on the high chair tray. The boy smiles and laughs, looking up at the woman, who then adjusts her hair."
},
{
"end_time": 30.0,
"start_time": 16.0,
"transcript": "The woman continues to talk to the boy, who is still in the high chair. She points to something on the tray and then reaches down to pick up a small, dark object. The boy watches her, then smiles and laughs again. Another child's blonde hair briefly appears in the bottom left corner of the frame as the woman continues to interact with the boy."
},
{
"end_time": 31.0,
"start_time": 30.0,
"transcript": "A young child with blonde hair leans into the frame, looking directly at the viewer. Behind the child, a woman with glasses and blonde hair, wearing a leopard print top, smiles and gestures with her right hand. Another child, a toddler, sits in a high chair in the background, partially obscured."
}
],
"error_rate": 0.0,
"usage_metadata": {
"duration": 0.0,
"model": "gemini-2.5-flash",
"output_tokens": 899,
"prompt_tokens": 13760
}
},
"msg": "Video transcription completed successfully",
"success": true
},
"audioTranscript": {
"data": {
"data": [
{
"end_time": 0.74,
"speaker": null,
"start_time": 0.0,
"text": " Say hi!"
},
{
"end_time": 1.42,
"speaker": null,
"start_time": 1.12,
"text": " Hi!"
},
{
"end_time": 3.26,
"speaker": null,
"start_time": 1.58,
"text": " Say I'm alive!"
}
],
"usage_metadata": {
"duration": 36.53898,
"model": "whisper-1",
"output_tokens": 0,
"prompt_tokens": 0
}
},
"msg": "ASR transcription completed successfully",
"success": true
}
},
"task_id": "fe8587b278534ed5af6b0e9bcba9ed11"
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | string | Response code indicating the result status |
| msg | string | Response message describing the operation result |
| data | object | Response data object containing task information |
| data.task_id | string | Unique identifier of the caption task |
| success | boolean | Indicates whether the operation was successful |
| failed | boolean | Indicates whether the operation failed |
Callback Response Parameters
When the TikTok video caption generation is complete, a callback will be sent to your configured webhook URL.| Parameter | Type | Description |
|---|---|---|
| code | string | Response code (200 indicates success) |
| message | string | Status message (e.g., “SUCCESS”) |
| data | object | Response data object containing both video and audio transcription results |
| data.videoTranscript | object | Video transcription result object |
| data.videoTranscript.data | object | Inner data object containing video caption segments and usage information |
| data.videoTranscript.data.data | array | Array of video caption segments with timestamps |
| data.videoTranscript.data.data[].start_time | number | Start time of the video segment in seconds |
| data.videoTranscript.data.data[].end_time | number | End time of the video segment in seconds |
| data.videoTranscript.data.data[].transcript | string | Video transcription text describing the visual content |
| data.videoTranscript.data.error_rate | number | Error rate of the video caption (0.0 means no errors) |
| data.videoTranscript.data.usage_metadata | object | Usage statistics for the video caption |
| data.videoTranscript.data.usage_metadata.duration | number | Processing duration in seconds |
| data.videoTranscript.data.usage_metadata.model | string | The AI model used for video caption (e.g., “gemini-2.5-flash”) |
| data.videoTranscript.data.usage_metadata.output_tokens | integer | Number of tokens in the generated video caption |
| data.videoTranscript.data.usage_metadata.prompt_tokens | integer | Number of tokens in the input prompt |
| data.videoTranscript.msg | string | Detailed message about the video caption result |
| data.videoTranscript.success | boolean | Indicates whether the video caption was successful |
| data.audioTranscript | object | Audio transcription result object |
| data.audioTranscript.data | object | Inner data object containing audio transcription segments and usage information |
| data.audioTranscript.data.data | array | Array of audio transcription segments with timestamps |
| data.audioTranscript.data.data[].start_time | number | Start time of the audio segment in seconds |
| data.audioTranscript.data.data[].end_time | number | End time of the audio segment in seconds |
| data.audioTranscript.data.data[].text | string | Audio transcription text for this segment |
| data.audioTranscript.data.data[].speaker | string | null | Speaker identifier (null if speaker identification not enabled) |
| data.audioTranscript.data.usage_metadata | object | Usage statistics for the audio transcription |
| data.audioTranscript.data.usage_metadata.duration | number | Audio duration in seconds |
| data.audioTranscript.data.usage_metadata.model | string | The model used for audio transcription (e.g., “whisper-1”) |
| data.audioTranscript.data.usage_metadata.output_tokens | integer | Number of output tokens (0 for audio transcription) |
| data.audioTranscript.data.usage_metadata.prompt_tokens | integer | Number of prompt tokens (0 for audio transcription) |
| data.audioTranscript.msg | string | Detailed message about the audio transcription result |
| data.audioTranscript.success | boolean | Indicates whether the audio transcription was successful |
| task_id | string | The task ID associated with this transcription request |
Authorizations
Body
application/json
The TikTok video URL
Example:
"https://www.tiktok.com/@cutshall73/video/7543017294226558221"
⌘I
