curl --request POST \
--url https://mavi-backend.memories.ai/serve/api/v2/audio-stream/start \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"audio_url": "rtmp://example.com/live/audio",
"language_code": "en",
"punctuate": false,
"format_text": false,
"language_detection": false,
"language_confidence_threshold": 0,
"audio_start_from": 0,
"audio_end_at": 0,
"multichannel": false,
"speech_models": [
"<string>"
],
"speech_threshold": 0,
"disfluencies": false,
"speaker_labels": false,
"speakers_expected": 0,
"sentiment_analysis": false,
"entity_detection": false,
"auto_highlights": false,
"content_safety": false,
"iab_categories": false,
"auto_chapters": false,
"summarization": false,
"summary_model": "<string>",
"summary_type": "<string>",
"custom_topics": false,
"topics": [
"<string>"
],
"redact_pii": false,
"redact_pii_sub": "<string>",
"redact_pii_policies": [
"<string>"
],
"redact_pii_audio": false,
"redact_pii_audio_quality": "<string>",
"filter_profanity": false,
"custom_spelling": [
{}
],
"speech_understanding": {}
}
'import requests
url = "https://mavi-backend.memories.ai/serve/api/v2/audio-stream/start"
payload = {
"audio_url": "rtmp://example.com/live/audio",
"language_code": "en",
"punctuate": False,
"format_text": False,
"language_detection": False,
"language_confidence_threshold": 0,
"audio_start_from": 0,
"audio_end_at": 0,
"multichannel": False,
"speech_models": ["<string>"],
"speech_threshold": 0,
"disfluencies": False,
"speaker_labels": False,
"speakers_expected": 0,
"sentiment_analysis": False,
"entity_detection": False,
"auto_highlights": False,
"content_safety": False,
"iab_categories": False,
"auto_chapters": False,
"summarization": False,
"summary_model": "<string>",
"summary_type": "<string>",
"custom_topics": False,
"topics": ["<string>"],
"redact_pii": False,
"redact_pii_sub": "<string>",
"redact_pii_policies": ["<string>"],
"redact_pii_audio": False,
"redact_pii_audio_quality": "<string>",
"filter_profanity": False,
"custom_spelling": [{}],
"speech_understanding": {}
}
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({
audio_url: 'rtmp://example.com/live/audio',
language_code: 'en',
punctuate: false,
format_text: false,
language_detection: false,
language_confidence_threshold: 0,
audio_start_from: 0,
audio_end_at: 0,
multichannel: false,
speech_models: ['<string>'],
speech_threshold: 0,
disfluencies: false,
speaker_labels: false,
speakers_expected: 0,
sentiment_analysis: false,
entity_detection: false,
auto_highlights: false,
content_safety: false,
iab_categories: false,
auto_chapters: false,
summarization: false,
summary_model: '<string>',
summary_type: '<string>',
custom_topics: false,
topics: ['<string>'],
redact_pii: false,
redact_pii_sub: '<string>',
redact_pii_policies: ['<string>'],
redact_pii_audio: false,
redact_pii_audio_quality: '<string>',
filter_profanity: false,
custom_spelling: [{}],
speech_understanding: {}
})
};
fetch('https://mavi-backend.memories.ai/serve/api/v2/audio-stream/start', 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/audio-stream/start",
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([
'audio_url' => 'rtmp://example.com/live/audio',
'language_code' => 'en',
'punctuate' => false,
'format_text' => false,
'language_detection' => false,
'language_confidence_threshold' => 0,
'audio_start_from' => 0,
'audio_end_at' => 0,
'multichannel' => false,
'speech_models' => [
'<string>'
],
'speech_threshold' => 0,
'disfluencies' => false,
'speaker_labels' => false,
'speakers_expected' => 0,
'sentiment_analysis' => false,
'entity_detection' => false,
'auto_highlights' => false,
'content_safety' => false,
'iab_categories' => false,
'auto_chapters' => false,
'summarization' => false,
'summary_model' => '<string>',
'summary_type' => '<string>',
'custom_topics' => false,
'topics' => [
'<string>'
],
'redact_pii' => false,
'redact_pii_sub' => '<string>',
'redact_pii_policies' => [
'<string>'
],
'redact_pii_audio' => false,
'redact_pii_audio_quality' => '<string>',
'filter_profanity' => false,
'custom_spelling' => [
[
]
],
'speech_understanding' => [
]
]),
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://mavi-backend.memories.ai/serve/api/v2/audio-stream/start"
payload := strings.NewReader("{\n \"audio_url\": \"rtmp://example.com/live/audio\",\n \"language_code\": \"en\",\n \"punctuate\": false,\n \"format_text\": false,\n \"language_detection\": false,\n \"language_confidence_threshold\": 0,\n \"audio_start_from\": 0,\n \"audio_end_at\": 0,\n \"multichannel\": false,\n \"speech_models\": [\n \"<string>\"\n ],\n \"speech_threshold\": 0,\n \"disfluencies\": false,\n \"speaker_labels\": false,\n \"speakers_expected\": 0,\n \"sentiment_analysis\": false,\n \"entity_detection\": false,\n \"auto_highlights\": false,\n \"content_safety\": false,\n \"iab_categories\": false,\n \"auto_chapters\": false,\n \"summarization\": false,\n \"summary_model\": \"<string>\",\n \"summary_type\": \"<string>\",\n \"custom_topics\": false,\n \"topics\": [\n \"<string>\"\n ],\n \"redact_pii\": false,\n \"redact_pii_sub\": \"<string>\",\n \"redact_pii_policies\": [\n \"<string>\"\n ],\n \"redact_pii_audio\": false,\n \"redact_pii_audio_quality\": \"<string>\",\n \"filter_profanity\": false,\n \"custom_spelling\": [\n {}\n ],\n \"speech_understanding\": {}\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://mavi-backend.memories.ai/serve/api/v2/audio-stream/start")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"audio_url\": \"rtmp://example.com/live/audio\",\n \"language_code\": \"en\",\n \"punctuate\": false,\n \"format_text\": false,\n \"language_detection\": false,\n \"language_confidence_threshold\": 0,\n \"audio_start_from\": 0,\n \"audio_end_at\": 0,\n \"multichannel\": false,\n \"speech_models\": [\n \"<string>\"\n ],\n \"speech_threshold\": 0,\n \"disfluencies\": false,\n \"speaker_labels\": false,\n \"speakers_expected\": 0,\n \"sentiment_analysis\": false,\n \"entity_detection\": false,\n \"auto_highlights\": false,\n \"content_safety\": false,\n \"iab_categories\": false,\n \"auto_chapters\": false,\n \"summarization\": false,\n \"summary_model\": \"<string>\",\n \"summary_type\": \"<string>\",\n \"custom_topics\": false,\n \"topics\": [\n \"<string>\"\n ],\n \"redact_pii\": false,\n \"redact_pii_sub\": \"<string>\",\n \"redact_pii_policies\": [\n \"<string>\"\n ],\n \"redact_pii_audio\": false,\n \"redact_pii_audio_quality\": \"<string>\",\n \"filter_profanity\": false,\n \"custom_spelling\": [\n {}\n ],\n \"speech_understanding\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mavi-backend.memories.ai/serve/api/v2/audio-stream/start")
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 \"audio_url\": \"rtmp://example.com/live/audio\",\n \"language_code\": \"en\",\n \"punctuate\": false,\n \"format_text\": false,\n \"language_detection\": false,\n \"language_confidence_threshold\": 0,\n \"audio_start_from\": 0,\n \"audio_end_at\": 0,\n \"multichannel\": false,\n \"speech_models\": [\n \"<string>\"\n ],\n \"speech_threshold\": 0,\n \"disfluencies\": false,\n \"speaker_labels\": false,\n \"speakers_expected\": 0,\n \"sentiment_analysis\": false,\n \"entity_detection\": false,\n \"auto_highlights\": false,\n \"content_safety\": false,\n \"iab_categories\": false,\n \"auto_chapters\": false,\n \"summarization\": false,\n \"summary_model\": \"<string>\",\n \"summary_type\": \"<string>\",\n \"custom_topics\": false,\n \"topics\": [\n \"<string>\"\n ],\n \"redact_pii\": false,\n \"redact_pii_sub\": \"<string>\",\n \"redact_pii_policies\": [\n \"<string>\"\n ],\n \"redact_pii_audio\": false,\n \"redact_pii_audio_quality\": \"<string>\",\n \"filter_profanity\": false,\n \"custom_spelling\": [\n {}\n ],\n \"speech_understanding\": {}\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "success",
"data": {
"task_id": "660e8400-e29b-41d4-a716-446655440001",
"message": "Audio stream transcription started"
}
}
{
"code": 200,
"message": "SUCCESS",
"data": {
"status": 0,
"message": null,
"transcript": {
"message_type": "transcript",
"language_code": "en",
"language_probability": 0.98,
"text": "Hello, how are you doing today?",
"words": [
{
"text": "Hello",
"start": 0.0,
"end": 0.5,
"type": "word"
},
{
"text": "how",
"start": 0.6,
"end": 0.8,
"type": "word"
}
]
}
},
"task_id": "660e8400-e29b-41d4-a716-446655440001"
}
{
"code": 200,
"message": "SUCCESS",
"data": {
"status": 0,
"message": null,
"transcript": {
"type": "final_transcript",
"text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts.",
"words": [
{
"text": "Smoke",
"start": 250,
"end": 650,
"confidence": 0.97503
}
],
"created": "2025-01-01T00:00:00.000Z"
}
},
"task_id": "660e8400-e29b-41d4-a716-446655440001"
}
{
"code": 200,
"message": "SUCCESS",
"data": {
"status": 402,
"message": "You don't have enough points.",
"transcript": null
},
"task_id": "660e8400-e29b-41d4-a716-446655440001"
}
{
"code": 200,
"message": "SUCCESS",
"data": {
"status": 14,
"message": "Task stopped by user",
"transcript": null
},
"task_id": "660e8400-e29b-41d4-a716-446655440001"
}
Start Audio Stream Transcription
Start real-time audio stream transcription with ElevenLabs or AssemblyAI, controlled by a provider parameter.
curl --request POST \
--url https://mavi-backend.memories.ai/serve/api/v2/audio-stream/start \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"audio_url": "rtmp://example.com/live/audio",
"language_code": "en",
"punctuate": false,
"format_text": false,
"language_detection": false,
"language_confidence_threshold": 0,
"audio_start_from": 0,
"audio_end_at": 0,
"multichannel": false,
"speech_models": [
"<string>"
],
"speech_threshold": 0,
"disfluencies": false,
"speaker_labels": false,
"speakers_expected": 0,
"sentiment_analysis": false,
"entity_detection": false,
"auto_highlights": false,
"content_safety": false,
"iab_categories": false,
"auto_chapters": false,
"summarization": false,
"summary_model": "<string>",
"summary_type": "<string>",
"custom_topics": false,
"topics": [
"<string>"
],
"redact_pii": false,
"redact_pii_sub": "<string>",
"redact_pii_policies": [
"<string>"
],
"redact_pii_audio": false,
"redact_pii_audio_quality": "<string>",
"filter_profanity": false,
"custom_spelling": [
{}
],
"speech_understanding": {}
}
'import requests
url = "https://mavi-backend.memories.ai/serve/api/v2/audio-stream/start"
payload = {
"audio_url": "rtmp://example.com/live/audio",
"language_code": "en",
"punctuate": False,
"format_text": False,
"language_detection": False,
"language_confidence_threshold": 0,
"audio_start_from": 0,
"audio_end_at": 0,
"multichannel": False,
"speech_models": ["<string>"],
"speech_threshold": 0,
"disfluencies": False,
"speaker_labels": False,
"speakers_expected": 0,
"sentiment_analysis": False,
"entity_detection": False,
"auto_highlights": False,
"content_safety": False,
"iab_categories": False,
"auto_chapters": False,
"summarization": False,
"summary_model": "<string>",
"summary_type": "<string>",
"custom_topics": False,
"topics": ["<string>"],
"redact_pii": False,
"redact_pii_sub": "<string>",
"redact_pii_policies": ["<string>"],
"redact_pii_audio": False,
"redact_pii_audio_quality": "<string>",
"filter_profanity": False,
"custom_spelling": [{}],
"speech_understanding": {}
}
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({
audio_url: 'rtmp://example.com/live/audio',
language_code: 'en',
punctuate: false,
format_text: false,
language_detection: false,
language_confidence_threshold: 0,
audio_start_from: 0,
audio_end_at: 0,
multichannel: false,
speech_models: ['<string>'],
speech_threshold: 0,
disfluencies: false,
speaker_labels: false,
speakers_expected: 0,
sentiment_analysis: false,
entity_detection: false,
auto_highlights: false,
content_safety: false,
iab_categories: false,
auto_chapters: false,
summarization: false,
summary_model: '<string>',
summary_type: '<string>',
custom_topics: false,
topics: ['<string>'],
redact_pii: false,
redact_pii_sub: '<string>',
redact_pii_policies: ['<string>'],
redact_pii_audio: false,
redact_pii_audio_quality: '<string>',
filter_profanity: false,
custom_spelling: [{}],
speech_understanding: {}
})
};
fetch('https://mavi-backend.memories.ai/serve/api/v2/audio-stream/start', 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/audio-stream/start",
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([
'audio_url' => 'rtmp://example.com/live/audio',
'language_code' => 'en',
'punctuate' => false,
'format_text' => false,
'language_detection' => false,
'language_confidence_threshold' => 0,
'audio_start_from' => 0,
'audio_end_at' => 0,
'multichannel' => false,
'speech_models' => [
'<string>'
],
'speech_threshold' => 0,
'disfluencies' => false,
'speaker_labels' => false,
'speakers_expected' => 0,
'sentiment_analysis' => false,
'entity_detection' => false,
'auto_highlights' => false,
'content_safety' => false,
'iab_categories' => false,
'auto_chapters' => false,
'summarization' => false,
'summary_model' => '<string>',
'summary_type' => '<string>',
'custom_topics' => false,
'topics' => [
'<string>'
],
'redact_pii' => false,
'redact_pii_sub' => '<string>',
'redact_pii_policies' => [
'<string>'
],
'redact_pii_audio' => false,
'redact_pii_audio_quality' => '<string>',
'filter_profanity' => false,
'custom_spelling' => [
[
]
],
'speech_understanding' => [
]
]),
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://mavi-backend.memories.ai/serve/api/v2/audio-stream/start"
payload := strings.NewReader("{\n \"audio_url\": \"rtmp://example.com/live/audio\",\n \"language_code\": \"en\",\n \"punctuate\": false,\n \"format_text\": false,\n \"language_detection\": false,\n \"language_confidence_threshold\": 0,\n \"audio_start_from\": 0,\n \"audio_end_at\": 0,\n \"multichannel\": false,\n \"speech_models\": [\n \"<string>\"\n ],\n \"speech_threshold\": 0,\n \"disfluencies\": false,\n \"speaker_labels\": false,\n \"speakers_expected\": 0,\n \"sentiment_analysis\": false,\n \"entity_detection\": false,\n \"auto_highlights\": false,\n \"content_safety\": false,\n \"iab_categories\": false,\n \"auto_chapters\": false,\n \"summarization\": false,\n \"summary_model\": \"<string>\",\n \"summary_type\": \"<string>\",\n \"custom_topics\": false,\n \"topics\": [\n \"<string>\"\n ],\n \"redact_pii\": false,\n \"redact_pii_sub\": \"<string>\",\n \"redact_pii_policies\": [\n \"<string>\"\n ],\n \"redact_pii_audio\": false,\n \"redact_pii_audio_quality\": \"<string>\",\n \"filter_profanity\": false,\n \"custom_spelling\": [\n {}\n ],\n \"speech_understanding\": {}\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://mavi-backend.memories.ai/serve/api/v2/audio-stream/start")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"audio_url\": \"rtmp://example.com/live/audio\",\n \"language_code\": \"en\",\n \"punctuate\": false,\n \"format_text\": false,\n \"language_detection\": false,\n \"language_confidence_threshold\": 0,\n \"audio_start_from\": 0,\n \"audio_end_at\": 0,\n \"multichannel\": false,\n \"speech_models\": [\n \"<string>\"\n ],\n \"speech_threshold\": 0,\n \"disfluencies\": false,\n \"speaker_labels\": false,\n \"speakers_expected\": 0,\n \"sentiment_analysis\": false,\n \"entity_detection\": false,\n \"auto_highlights\": false,\n \"content_safety\": false,\n \"iab_categories\": false,\n \"auto_chapters\": false,\n \"summarization\": false,\n \"summary_model\": \"<string>\",\n \"summary_type\": \"<string>\",\n \"custom_topics\": false,\n \"topics\": [\n \"<string>\"\n ],\n \"redact_pii\": false,\n \"redact_pii_sub\": \"<string>\",\n \"redact_pii_policies\": [\n \"<string>\"\n ],\n \"redact_pii_audio\": false,\n \"redact_pii_audio_quality\": \"<string>\",\n \"filter_profanity\": false,\n \"custom_spelling\": [\n {}\n ],\n \"speech_understanding\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mavi-backend.memories.ai/serve/api/v2/audio-stream/start")
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 \"audio_url\": \"rtmp://example.com/live/audio\",\n \"language_code\": \"en\",\n \"punctuate\": false,\n \"format_text\": false,\n \"language_detection\": false,\n \"language_confidence_threshold\": 0,\n \"audio_start_from\": 0,\n \"audio_end_at\": 0,\n \"multichannel\": false,\n \"speech_models\": [\n \"<string>\"\n ],\n \"speech_threshold\": 0,\n \"disfluencies\": false,\n \"speaker_labels\": false,\n \"speakers_expected\": 0,\n \"sentiment_analysis\": false,\n \"entity_detection\": false,\n \"auto_highlights\": false,\n \"content_safety\": false,\n \"iab_categories\": false,\n \"auto_chapters\": false,\n \"summarization\": false,\n \"summary_model\": \"<string>\",\n \"summary_type\": \"<string>\",\n \"custom_topics\": false,\n \"topics\": [\n \"<string>\"\n ],\n \"redact_pii\": false,\n \"redact_pii_sub\": \"<string>\",\n \"redact_pii_policies\": [\n \"<string>\"\n ],\n \"redact_pii_audio\": false,\n \"redact_pii_audio_quality\": \"<string>\",\n \"filter_profanity\": false,\n \"custom_spelling\": [\n {}\n ],\n \"speech_understanding\": {}\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "success",
"data": {
"task_id": "660e8400-e29b-41d4-a716-446655440001",
"message": "Audio stream transcription started"
}
}
{
"code": 200,
"message": "SUCCESS",
"data": {
"status": 0,
"message": null,
"transcript": {
"message_type": "transcript",
"language_code": "en",
"language_probability": 0.98,
"text": "Hello, how are you doing today?",
"words": [
{
"text": "Hello",
"start": 0.0,
"end": 0.5,
"type": "word"
},
{
"text": "how",
"start": 0.6,
"end": 0.8,
"type": "word"
}
]
}
},
"task_id": "660e8400-e29b-41d4-a716-446655440001"
}
{
"code": 200,
"message": "SUCCESS",
"data": {
"status": 0,
"message": null,
"transcript": {
"type": "final_transcript",
"text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts.",
"words": [
{
"text": "Smoke",
"start": 250,
"end": 650,
"confidence": 0.97503
}
],
"created": "2025-01-01T00:00:00.000Z"
}
},
"task_id": "660e8400-e29b-41d4-a716-446655440001"
}
{
"code": 200,
"message": "SUCCESS",
"data": {
"status": 402,
"message": "You don't have enough points.",
"transcript": null
},
"task_id": "660e8400-e29b-41d4-a716-446655440001"
}
{
"code": 200,
"message": "SUCCESS",
"data": {
"status": 14,
"message": "Task stopped by user",
"transcript": null
},
"task_id": "660e8400-e29b-41d4-a716-446655440001"
}
https://mavi-backend.memories.ai/serve/api/v2
Auth: Authorization: sk-mavi-... (no Bearer prefix)- Use this HTTP endpoint when you have a stream URL (RTMP/RTSP/HLS) and want the server to handle audio decoding and streaming.
- Use the WebSocket endpoint when your client can send audio directly (e.g., browser microphone).
| Provider | Rate | Per 5s billing cycle | Per minute |
|---|---|---|---|
| AssemblyAI | $0.15/hour | $0.000208 | $0.0025 |
| ElevenLabs | $0.39/hour | $0.000542 | $0.0065 |
Cost (USD) = duration × rate / 3600
duration: Audio duration in secondsrate: 0.15(AssemblyAI)or0.39 (ElevenLabs)- Charges: pre-check at start, then billed every 5 seconds of audio streamed
Supported Protocols
- RTMP (Recommended)
- RTSP
- HLS (.m3u8)
- HTTP/HTTPS (direct audio URLs)
Key Features
- Real-time transcription via ElevenLabs or AssemblyAI (controlled by
providerparameter) - Server-side audio decoding (FFmpeg) — no client-side processing needed
- Verbatim callback: every upstream message forwarded as-is to your webhook
- Real-time billing every 5 seconds of audio
- Auto-stop on insufficient balance (status 402)
- All provider-specific parameters transparently forwarded
Architecture
Your Server
|
POST /audio-stream/start
{ audio_url, provider, ... }
|
v
+------------------+
| Memories.ai |
| |
audio_url -------> | FFmpeg (decode) |
| | |
| v |
| PCM 16kHz mono |
| | |
| v |
| WebSocket -------+-------> ElevenLabs / AssemblyAI
| |
| <-- messages ---|<------- Provider responses
| | |
| v |
| Webhook callback |-------> Your callback URL
+------------------+
Code Example
import requests
BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2"
API_KEY = "sk-mavi-..."
HEADERS = {
"Authorization": f"{API_KEY}",
"Content-Type": "application/json"
}
def start_audio_stream(audio_url: str):
url = f"{BASE_URL}/audio-stream/start"
data = {
"audio_url": audio_url,
"provider": "elevenlabs",
"language_code": "en",
"model_id": "scribe_v2_realtime",
"diarize": True,
"num_speakers": 2
}
resp = requests.post(url, json=data, headers=HEADERS)
return resp.json()
result = start_audio_stream("rtmp://example.com/live/audio")
print(result)
print(f"Task ID: {result['data']['task_id']}")
import requests
BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2"
API_KEY = "sk-mavi-..."
HEADERS = {
"Authorization": f"{API_KEY}",
"Content-Type": "application/json"
}
def start_audio_stream(audio_url: str):
url = f"{BASE_URL}/audio-stream/start"
data = {
"audio_url": audio_url,
"provider": "assemblyai",
"language_code": "en",
"speaker_labels": True,
"speakers_expected": 2,
"punctuate": True,
"format_text": True
}
resp = requests.post(url, json=data, headers=HEADERS)
return resp.json()
result = start_audio_stream("rtmp://example.com/live/audio")
print(result)
print(f"Task ID: {result['data']['task_id']}")
const axios = require('axios');
const BASE_URL = 'https://mavi-backend.memories.ai/serve/api/v2';
const API_KEY = 'sk-mavi-...';
const headers = {
'Authorization': API_KEY,
'Content-Type': 'application/json'
};
async function startAudioStream(audioUrl, provider = 'elevenlabs') {
const body = {
audio_url: audioUrl,
provider: provider,
language_code: 'en',
// ElevenLabs params
...(provider === 'elevenlabs' && {
model_id: 'scribe_v2_realtime',
diarize: true,
num_speakers: 2
}),
// AssemblyAI params
...(provider === 'assemblyai' && {
speaker_labels: true,
speakers_expected: 2,
punctuate: true,
format_text: true
})
};
const response = await axios.post(
`${BASE_URL}/audio-stream/start`,
body,
{ headers }
);
return response.data;
}
startAudioStream('rtmp://example.com/live/audio', 'elevenlabs')
.then(result => {
console.log(result);
console.log(`Task ID: ${result.data.task_id}`);
});
curl -X POST "https://mavi-backend.memories.ai/serve/api/v2/audio-stream/start" \
-H "Authorization: sk-mavi-..." \
-H "Content-Type: application/json" \
-d '{
"audio_url": "rtmp://example.com/live/audio",
"provider": "elevenlabs",
"language_code": "en",
"model_id": "scribe_v2_realtime",
"diarize": true,
"num_speakers": 2
}'
curl -X POST "https://mavi-backend.memories.ai/serve/api/v2/audio-stream/start" \
-H "Authorization: sk-mavi-..." \
-H "Content-Type: application/json" \
-d '{
"audio_url": "rtmp://example.com/live/audio",
"provider": "assemblyai",
"language_code": "en",
"speaker_labels": true,
"speakers_expected": 2,
"punctuate": true,
"format_text": true
}'
Response
Returns the task information for the started audio stream.{
"code": 200,
"message": "success",
"data": {
"task_id": "660e8400-e29b-41d4-a716-446655440001",
"message": "Audio stream transcription started"
}
}
{
"code": 200,
"message": "SUCCESS",
"data": {
"status": 0,
"message": null,
"transcript": {
"message_type": "transcript",
"language_code": "en",
"language_probability": 0.98,
"text": "Hello, how are you doing today?",
"words": [
{
"text": "Hello",
"start": 0.0,
"end": 0.5,
"type": "word"
},
{
"text": "how",
"start": 0.6,
"end": 0.8,
"type": "word"
}
]
}
},
"task_id": "660e8400-e29b-41d4-a716-446655440001"
}
{
"code": 200,
"message": "SUCCESS",
"data": {
"status": 0,
"message": null,
"transcript": {
"type": "final_transcript",
"text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts.",
"words": [
{
"text": "Smoke",
"start": 250,
"end": 650,
"confidence": 0.97503
}
],
"created": "2025-01-01T00:00:00.000Z"
}
},
"task_id": "660e8400-e29b-41d4-a716-446655440001"
}
{
"code": 200,
"message": "SUCCESS",
"data": {
"status": 402,
"message": "You don't have enough points.",
"transcript": null
},
"task_id": "660e8400-e29b-41d4-a716-446655440001"
}
{
"code": 200,
"message": "SUCCESS",
"data": {
"status": 14,
"message": "Task stopped by user",
"transcript": null
},
"task_id": "660e8400-e29b-41d4-a716-446655440001"
}
Request Parameters
Required
| Parameter | Type | Description |
|---|---|---|
| audio_url | string | Audio stream URL (RTMP, RTSP, HLS, or HTTP) |
| provider | string | Transcription provider: elevenlabs or assemblyai |
Common Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| language_code | string | - | Language code for transcription (e.g., en, zh, es, fr) |
ElevenLabs Parameters
These parameters are forwarded whenprovider=elevenlabs.
| Parameter | Type | Default | Description |
|---|---|---|---|
| model_id | string | scribe_v2_realtime | Model to use for transcription |
| tag_audio_events | boolean | false | Tag audio events (music, laughter, etc.) |
| num_speakers | integer | - | Expected number of speakers for diarization |
| diarize | boolean | false | Enable speaker diarization |
| enable_logging | boolean | false | Enable server-side logging |
| inactivity_timeout | integer | - | Session timeout (seconds) when no audio is received |
AssemblyAI Parameters
These parameters are forwarded whenprovider=assemblyai.
| Parameter | Type | Default | Description |
|---|---|---|---|
| punctuate | boolean | false | Add punctuation to the transcript |
| format_text | boolean | false | Format text in the transcript (numbers, dates) |
| language_detection | boolean | false | Enable automatic language detection |
| language_confidence_threshold | number | 0.0 | Confidence threshold for language detection (0.0-1.0) |
| audio_start_from | integer | 0 | Start transcription from this timestamp (ms) |
| audio_end_at | integer | 0 | End transcription at this timestamp (ms) |
| multichannel | boolean | false | Enable multi-channel audio processing |
| speech_models | array | - | Array of speech models to use |
| speech_threshold | number | 0.0 | Speech detection threshold (0.0-1.0) |
| disfluencies | boolean | false | Include disfluencies (um, uh) in transcript |
| speaker_labels | boolean | false | Enable speaker diarization |
| speakers_expected | integer | 0 | Expected number of speakers |
| sentiment_analysis | boolean | false | Enable sentiment analysis |
| entity_detection | boolean | false | Enable entity detection |
| auto_highlights | boolean | false | Enable automatic highlights extraction |
| content_safety | boolean | false | Enable content safety detection |
| iab_categories | boolean | false | Enable IAB category classification |
| auto_chapters | boolean | false | Enable automatic chapter generation |
| summarization | boolean | false | Enable automatic summarization |
| summary_model | string | - | Model for summarization (informative or conversational) |
| summary_type | string | - | Summary type (bullets or paragraph) |
| custom_topics | boolean | false | Enable custom topic detection |
| topics | array | - | Array of custom topics to detect |
| redact_pii | boolean | false | Redact personally identifiable information |
| redact_pii_sub | string | - | PII redaction substitution method |
| redact_pii_policies | array | - | Array of PII policies to apply |
| redact_pii_audio | boolean | false | Redact PII from audio |
| redact_pii_audio_quality | string | - | Quality for PII audio redaction |
| filter_profanity | boolean | false | Filter profanity from transcript |
| custom_spelling | array | - | Array of custom spelling corrections |
| speech_understanding | object | - | Speech understanding configuration |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | string | Response code (200 indicates success) |
| message | string | Response message |
| data.task_id | string | Unique identifier of the transcription task |
| data.message | string | Status message about the stream start |
Callback Response Parameters
Callbacks are sent continuously — one for each message received from the upstream provider.| Parameter | Type | Description |
|---|---|---|
| code | string | Response code (200 indicates callback delivery success) |
| message | string | Response message (“SUCCESS”) |
| task_id | string | The task ID associated with this stream |
| data.status | integer | Status code (0 for normal message, see Status Codes below) |
| data.message | string | Status message (null for normal messages) |
| data.transcript | object | Verbatim JSON from the upstream provider (null for error/control statuses) |
data.transcript field contains the raw, unmodified response from the selected provider. The structure differs between ElevenLabs and AssemblyAI. Refer to each provider’s documentation for detailed field descriptions.Status Codes
| Status | Name | Description | Stream Continues |
|---|---|---|---|
| 0 | Message | Normal transcription message from provider | Yes |
| -1 | Error | Processing or connection error | No |
| 14 | User Stopped | User called /audio-stream/stop | No |
| 16 | Capacity Reached | Server capacity limit reached | No |
| 402 | Insufficient Balance | User balance insufficient | No |
Important Notes
provideris required: You must specifyelevenlabsorassemblyai. Without it the request will fail.- Webhook required: Configure your webhook URL in user settings before using this API.
- Verbatim callbacks: Each callback contains the exact JSON message from the provider — the server does not transform or aggregate the data.
- Real-time billing: Billing occurs every 5 seconds of audio data streamed to the provider. Auto-stops when balance is insufficient.
- Pre-charge: Balance is checked at start (one 5-second unit). If insufficient, the task is not started (status 402).
- Parameter transparency: Parameters specific to a provider are forwarded as-is. Parameters not relevant to the selected provider are silently ignored by the provider.
Supported Languages
Common language codes (supported by both providers):en- Englishzh- Chinesees- Spanishfr- Frenchde- Germanja- Japaneseko- Korean- And many more…
Rate Limiting
- Maximum concurrent streams: Each user can run N concurrent stream tasks (video + audio combined)
- Capacity check: Returns status 16 if server capacity is reached
- Balance check: Returns status 402 if insufficient balance at start
Authorizations
Body
Audio stream URL (RTMP or RTSP protocol)
"rtmp://example.com/live/audio"
Language code for transcription
"en"
Add punctuation to the transcript
Format text in the transcript
Enable automatic language detection
Confidence threshold for language detection
Start transcription from this timestamp (milliseconds)
End transcription at this timestamp (milliseconds)
Enable multi-channel audio processing
Array of speech models to use
Speech detection threshold (0.0-1.0)
Include disfluencies in the transcript
Enable speaker diarization
Expected number of speakers
Enable sentiment analysis
Enable entity detection
Enable automatic highlights extraction
Enable content safety detection
Enable IAB category classification
Enable automatic chapter generation
Enable automatic summarization
Model to use for summarization
Type of summary to generate
Enable custom topic detection
Array of custom topics to detect
Redact personally identifiable information
PII redaction substitution method
Array of PII policies to apply
Redact PII from audio
Quality setting for PII audio redaction
Filter profanity from transcript
Array of custom spelling corrections
Speech understanding configuration
