Delete Asset
curl --request DELETE \
--url https://mavi-backend.memories.ai/serve/api/v2/{asset_id} \
--header 'Authorization: <api-key>'import requests
url = "https://mavi-backend.memories.ai/serve/api/v2/{asset_id}"
headers = {"Authorization": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};
fetch('https://mavi-backend.memories.ai/serve/api/v2/{asset_id}', 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/{asset_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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://mavi-backend.memories.ai/serve/api/v2/{asset_id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://mavi-backend.memories.ai/serve/api/v2/{asset_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mavi-backend.memories.ai/serve/api/v2/{asset_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": null,
"success": true,
"failed": false
}
Asset Management
Delete Asset
Delete an asset by its ID
DELETE
/
{asset_id}
Delete Asset
curl --request DELETE \
--url https://mavi-backend.memories.ai/serve/api/v2/{asset_id} \
--header 'Authorization: <api-key>'import requests
url = "https://mavi-backend.memories.ai/serve/api/v2/{asset_id}"
headers = {"Authorization": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};
fetch('https://mavi-backend.memories.ai/serve/api/v2/{asset_id}', 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/{asset_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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://mavi-backend.memories.ai/serve/api/v2/{asset_id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://mavi-backend.memories.ai/serve/api/v2/{asset_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mavi-backend.memories.ai/serve/api/v2/{asset_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": null,
"success": true,
"failed": false
}
Product: Visual Intelligence — Asset Management
Use case: Upload, manage, and download video/image assets used by other Visual Intelligence APIs
Host:
https://mavi-backend.memories.ai/serve/api/v2
Auth: Authorization: sk-mavi-... (no Bearer prefix)Code Examples
const BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2";
const API_KEY = "sk-mavi-...";
const assetId = "re_657739295220518912";
const response = await fetch(`${BASE_URL}/${assetId}`, {
method: 'DELETE',
headers: {
'Authorization': API_KEY
}
});
const data = await response.json();
console.log(data);
import axios from 'axios';
const BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2";
const API_KEY = "sk-mavi-...";
const assetId = "re_657739295220518912";
const response = await axios.delete(`${BASE_URL}/${assetId}`, {
headers: {
'Authorization': API_KEY
}
});
console.log(response.data);
import requests
BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2"
API_KEY = "sk-mavi-..."
HEADERS = {
"Authorization": f"{API_KEY}"
}
def delete_asset(asset_id):
url = f"{BASE_URL}/{asset_id}"
response = requests.delete(url, headers=HEADERS)
return response.json()
# Usage example
result = delete_asset("re_657739295220518912")
print(result)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| asset_id | string | Yes | The unique identifier of the asset to delete (e.g., “re_657739295220518912”) |
Response
Returns a confirmation of the deletion.{
"code": 200,
"msg": "success",
"data": null,
"success": true,
"failed": false
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | string | Response code indicating the result status |
| msg | string | Response message describing the operation result |
| data | null | Response data object (null for delete operations) |
| success | boolean | Indicates whether the operation was successful |
| failed | boolean | Indicates whether the operation failed |
Notes
- This operation is irreversible
- All associated data will be permanently removed
- Returns error if asset ID doesn’t exist
Authorizations
Path Parameters
The unique identifier of the asset to delete
Response
200 - application/json
Asset deleted successfully
Response code indicating the result status
Example:
200
Response message describing the operation result
Example:
"success"
Response data object (null for delete operations)
Example:
null
Indicates whether the operation was successful
Example:
true
Indicates whether the operation failed
Example:
false
