Delete Videos
curl --request POST \
--url https://api.memories.ai/serve/api/v1/delete_videos \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
[
"VI1234567890",
"VI0987654321"
]
'import requests
url = "https://api.memories.ai/serve/api/v1/delete_videos"
payload = ["VI1234567890", "VI0987654321"]
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(['VI1234567890', 'VI0987654321'])
};
fetch('https://api.memories.ai/serve/api/v1/delete_videos', 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/delete_videos",
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([
'VI1234567890',
'VI0987654321'
]),
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://api.memories.ai/serve/api/v1/delete_videos"
payload := strings.NewReader("[\n \"VI1234567890\",\n \"VI0987654321\"\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://api.memories.ai/serve/api/v1/delete_videos")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n \"VI1234567890\",\n \"VI0987654321\"\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memories.ai/serve/api/v1/delete_videos")
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 \"VI1234567890\",\n \"VI0987654321\"\n]"
response = http.request(request)
puts response.read_body{
"code": "0000",
"msg": "success",
"data": {},
"success": true,
"failed": false
}Library Management
Delete Videos
Permanently delete one or more videos from your Private Video Library.
POST
/
serve
/
api
/
v1
/
delete_videos
Delete Videos
curl --request POST \
--url https://api.memories.ai/serve/api/v1/delete_videos \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
[
"VI1234567890",
"VI0987654321"
]
'import requests
url = "https://api.memories.ai/serve/api/v1/delete_videos"
payload = ["VI1234567890", "VI0987654321"]
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(['VI1234567890', 'VI0987654321'])
};
fetch('https://api.memories.ai/serve/api/v1/delete_videos', 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/delete_videos",
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([
'VI1234567890',
'VI0987654321'
]),
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://api.memories.ai/serve/api/v1/delete_videos"
payload := strings.NewReader("[\n \"VI1234567890\",\n \"VI0987654321\"\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://api.memories.ai/serve/api/v1/delete_videos")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n \"VI1234567890\",\n \"VI0987654321\"\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memories.ai/serve/api/v1/delete_videos")
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 \"VI1234567890\",\n \"VI0987654321\"\n]"
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.
Endpoint
POST /serve/api/v1/delete_videos Rate limit: Maximum 100 videos per request.Request Example
import requests
headers = {"Authorization": "sk-mavi-..."}
# List of video IDs to delete
data = ["VI1234567890", "VI0987654321"]
response = requests.post(
"https://api.memories.ai/serve/api/v1/delete_videos",
headers=headers,
json=data
)
print(response.json())
Request Body
Array of video IDs (strings) — sent as a raw JSON array.["VI1234567890", "VI0987654321"]
Request Parameters
string[]
required
Array of video identifiers to delete. Maximum 100 per request.
Response Example
Status code 200{
"code": "0000",
"msg": "success",
"data": null,
"success": true,
"failed": false
}
Delete now validates ownership and is all-or-nothing. If the array contains any
video_no that does not exist or does not belong to your account, the entire request is rejected and nothing is deleted — the response lists the offending video numbers. Only proceed with video numbers returned by your own List Videos.Error Responses
// Empty array
{"code":"0001","msg":"The video number list cannot be empty!","data":null,"success":false,"failed":true}
// More than 100 IDs in the array
{"code":"0001","msg":"The number of videos to delete cannot exceed 100!","data":null,"success":false,"failed":true}
// One or more video_no not owned by / unknown to the account (nothing is deleted)
{"code":"0001","msg":"The following videos do not exist or do not belong to the current account: [VI...]","data":null,"success":false,"failed":true}
Response Fields
string
Business status code.
"0000" indicates every supplied video_no was owned by your account and deleted. If any id is unknown or not owned, the request fails (non-0000) and nothing is deleted.string
Human-readable status message.
"success" on success; for failures see the Error Responses section above.null
Always
null on this endpoint — there is no per-video result array.boolean
true when all supplied videos passed the ownership check and were deleted; false if the request was rejected (see the ownership warning above).boolean
Inverse of
success.