Stop Stream Video Understanding
curl --request POST \
--url https://stream.memories.ai/v1/understand/stop/{task_id} \
--header 'Authorization: <api-key>'import requests
url = "https://stream.memories.ai/v1/understand/stop/{task_id}"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://stream.memories.ai/v1/understand/stop/{task_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://stream.memories.ai/v1/understand/stop/{task_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://stream.memories.ai/v1/understand/stop/{task_id}"
req, _ := http.NewRequest("POST", 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.post("https://stream.memories.ai/v1/understand/stop/{task_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://stream.memories.ai/v1/understand/stop/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 14,
"task_id": "5347085a-1747-4731-bdde-3856d09502c4"
}Live Video Understanding
Stop Stream Video Understanding
Stop an active live-stream understanding task.
POST
/
v1
/
understand
/
stop
/
{task_id}
Stop Stream Video Understanding
curl --request POST \
--url https://stream.memories.ai/v1/understand/stop/{task_id} \
--header 'Authorization: <api-key>'import requests
url = "https://stream.memories.ai/v1/understand/stop/{task_id}"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://stream.memories.ai/v1/understand/stop/{task_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://stream.memories.ai/v1/understand/stop/{task_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://stream.memories.ai/v1/understand/stop/{task_id}"
req, _ := http.NewRequest("POST", 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.post("https://stream.memories.ai/v1/understand/stop/{task_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://stream.memories.ai/v1/understand/stop/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 14,
"task_id": "5347085a-1747-4731-bdde-3856d09502c4"
}Product: Visual Intelligence — Live Video Understanding
Use case: Apply a custom AI prompt continuously to a live RTMP stream (e.g. captioning, activity recognition, custom monitoring), results to your callback every 5s
Mode: Server-Pull (you give us an RTMP URL → we pull → results to your callback)
Host:
https://stream.memories.ai
Auth: Authorization: sk-mavi-... (no Bearer prefix)If the RTMP source stops on its own or was never reachable when
/streamConnect was called, the task terminates automatically — you don’t need to call this endpoint in that case.Request Example
import requests
task_id = "5347085a-1747-4731-bdde-3856d09502c4"
url = f"https://stream.memories.ai/v1/understand/stop/{task_id}"
headers = {"Authorization": "sk-mavi-..."}
response = requests.post(url, headers=headers)
print(response.json())
Stop Stream Response
{
"status": 14,
"task_id": "5347085a-1747-4731-bdde-3856d09502c4"
}
Error Codes
| Code | Meaning |
|---|---|
-1 | Invalid request or task_id not found |
5000 | Internal server error |
