Move Videos to Folder
curl --request POST \
--url https://api.memories.ai/serve/api/v1/folders/move \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"folder_id": 671631448308117500,
"video_nos": [
"VI671631448308117504"
]
}
'import requests
url = "https://api.memories.ai/serve/api/v1/folders/move"
payload = {
"folder_id": 671631448308117500,
"video_nos": ["VI671631448308117504"]
}
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({folder_id: 671631448308117500, video_nos: ['VI671631448308117504']})
};
fetch('https://api.memories.ai/serve/api/v1/folders/move', 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/folders/move",
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([
'folder_id' => 671631448308117500,
'video_nos' => [
'VI671631448308117504'
]
]),
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/folders/move"
payload := strings.NewReader("{\n \"folder_id\": 671631448308117500,\n \"video_nos\": [\n \"VI671631448308117504\"\n ]\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/folders/move")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"folder_id\": 671631448308117500,\n \"video_nos\": [\n \"VI671631448308117504\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memories.ai/serve/api/v1/folders/move")
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 \"folder_id\": 671631448308117500,\n \"video_nos\": [\n \"VI671631448308117504\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": "0000",
"msg": "success",
"data": {},
"success": true,
"failed": false
}Folder Management
Move Videos to Folder
Move one or more videos into a target folder.
POST
/
serve
/
api
/
v1
/
folders
/
move
Move Videos to Folder
curl --request POST \
--url https://api.memories.ai/serve/api/v1/folders/move \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"folder_id": 671631448308117500,
"video_nos": [
"VI671631448308117504"
]
}
'import requests
url = "https://api.memories.ai/serve/api/v1/folders/move"
payload = {
"folder_id": 671631448308117500,
"video_nos": ["VI671631448308117504"]
}
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({folder_id: 671631448308117500, video_nos: ['VI671631448308117504']})
};
fetch('https://api.memories.ai/serve/api/v1/folders/move', 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/folders/move",
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([
'folder_id' => 671631448308117500,
'video_nos' => [
'VI671631448308117504'
]
]),
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/folders/move"
payload := strings.NewReader("{\n \"folder_id\": 671631448308117500,\n \"video_nos\": [\n \"VI671631448308117504\"\n ]\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/folders/move")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"folder_id\": 671631448308117500,\n \"video_nos\": [\n \"VI671631448308117504\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memories.ai/serve/api/v1/folders/move")
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 \"folder_id\": 671631448308117500,\n \"video_nos\": [\n \"VI671631448308117504\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": "0000",
"msg": "success",
"data": {},
"success": true,
"failed": false
}Product: Visual Search
Use case: Organize your indexed videos into folders and scope uploads/searches to a folder
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 target folder exists — create it with Create Folder, or use
-1for the Default folder.
Request Example
Uses
application/json — send the request body as JSON.import requests
headers = {"Authorization": "sk-mavi-..."}
json_body = {
"folder_id": 671631448308117504,
"video_nos": ["VI671631448308117504", "VI671631448308117505"]
}
response = requests.post(
"https://api.memories.ai/serve/api/v1/folders/move",
headers=headers,
json=json_body,
)
print(response.json())
cURL
curl -X POST "https://api.memories.ai/serve/api/v1/folders/move" \
-H "Authorization: sk-mavi-..." \
-H "Content-Type: application/json" \
-d '{"folder_id": 671631448308117504, "video_nos": ["VI671631448308117504"]}'
Parameters
integer
required
Target folder id.
-1 moves videos into the Default folder. The target must already exist and belong to your account — it is not created automatically. Values other than -1 must be > 0.array
required
Video identifiers to move. Maximum 500 per request. Videos that do not belong to your account are rejected.
Response Example
{
"code": "0000",
"msg": "success",
"data": null
}
Response Fields
string
Business status code.
0000 indicates success.string
Human-readable status message.
Notes & Limits
- Target must exist: a non-existent target folder (including
-1if your Default folder was never created) returnsFolder does not exist or does not belong to the current user. - If none of the supplied
video_nosbelong to your account, the request returnsNo videos found for the provided video numbers. - At most 500 videos can be moved in a single request.
Authorizations
Body
application/json
