Create Folder
curl --request POST \
--url https://api.memories.ai/serve/api/v1/folders/create \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data name=my-projectimport requests
url = "https://api.memories.ai/serve/api/v1/folders/create"
payload = { "name": "my-project" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<api-key>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({name: 'my-project'})
};
fetch('https://api.memories.ai/serve/api/v1/folders/create', 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/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "name=my-project",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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/create"
payload := strings.NewReader("name=my-project")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
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/create")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("name=my-project")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memories.ai/serve/api/v1/folders/create")
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/x-www-form-urlencoded'
request.body = "name=my-project"
response = http.request(request)
puts response.read_body{
"code": "0000",
"msg": "success",
"data": {
"folder_id": 671631448308117500,
"folder_name": "my-project"
}
}Folder Management
Create Folder
Create a new folder to organize videos in your Private Video Library.
POST
/
serve
/
api
/
v1
/
folders
/
create
Create Folder
curl --request POST \
--url https://api.memories.ai/serve/api/v1/folders/create \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data name=my-projectimport requests
url = "https://api.memories.ai/serve/api/v1/folders/create"
payload = { "name": "my-project" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<api-key>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({name: 'my-project'})
};
fetch('https://api.memories.ai/serve/api/v1/folders/create', 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/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "name=my-project",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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/create"
payload := strings.NewReader("name=my-project")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
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/create")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("name=my-project")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memories.ai/serve/api/v1/folders/create")
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/x-www-form-urlencoded'
request.body = "name=my-project"
response = http.request(request)
puts response.read_body{
"code": "0000",
"msg": "success",
"data": {
"folder_id": 671631448308117500,
"folder_name": "my-project"
}
}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)folder_id can then be passed to Upload Video (folder_id), Move Videos, or the list/search endpoints to scope them to this folder.
Prerequisites
- You have created a memories.ai API key.
Request Example
Uses
application/x-www-form-urlencoded — send name as a form field.import requests
headers = {"Authorization": "sk-mavi-..."}
response = requests.post(
"https://api.memories.ai/serve/api/v1/folders/create",
headers=headers,
data={"name": "my-project"},
)
print(response.json())
cURL
curl -X POST "https://api.memories.ai/serve/api/v1/folders/create" \
-H "Authorization: sk-mavi-..." \
-d "name=my-project"
Parameters
string
required
Folder name. Maximum 100 characters. Must be unique within your account — creating a folder with an existing name is rejected.
Response Example
{
"code": "0000",
"msg": "success",
"data": {
"folder_id": 671631448308117504,
"folder_name": "my-project"
}
}
Response Fields
string
Business status code.
0000 indicates success.string
Human-readable status message.
integer
Identifier of the newly created folder.
string
Folder display name.
Notes & Limits
- Creating a folder with a name that already exists returns
Folder with this name already exists. - The built-in Default folder does not need to be created — omit
folder_idon upload to use it.
Authorizations
Body
application/x-www-form-urlencoded
Folder name. Max 100 chars, unique within your account.
Maximum string length:
100Example:
"my-project"
