Live Digest
curl --request POST \
--url https://trio.machinefi.com/api/live-digest \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"stream_url": "<string>",
"window_minutes": 10,
"webhook_url": "<string>",
"capture_interval_seconds": 60,
"max_windows": 2,
"include_frames": false
}
'import requests
url = "https://trio.machinefi.com/api/live-digest"
payload = {
"stream_url": "<string>",
"window_minutes": 10,
"webhook_url": "<string>",
"capture_interval_seconds": 60,
"max_windows": 2,
"include_frames": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
stream_url: '<string>',
window_minutes: 10,
webhook_url: '<string>',
capture_interval_seconds: 60,
max_windows: 2,
include_frames: false
})
};
fetch('https://trio.machinefi.com/api/live-digest', 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://trio.machinefi.com/api/live-digest",
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([
'stream_url' => '<string>',
'window_minutes' => 10,
'webhook_url' => '<string>',
'capture_interval_seconds' => 60,
'max_windows' => 2,
'include_frames' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://trio.machinefi.com/api/live-digest"
payload := strings.NewReader("{\n \"stream_url\": \"<string>\",\n \"window_minutes\": 10,\n \"webhook_url\": \"<string>\",\n \"capture_interval_seconds\": 60,\n \"max_windows\": 2,\n \"include_frames\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://trio.machinefi.com/api/live-digest")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"stream_url\": \"<string>\",\n \"window_minutes\": 10,\n \"webhook_url\": \"<string>\",\n \"capture_interval_seconds\": 60,\n \"max_windows\": 2,\n \"include_frames\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://trio.machinefi.com/api/live-digest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"stream_url\": \"<string>\",\n \"window_minutes\": 10,\n \"webhook_url\": \"<string>\",\n \"capture_interval_seconds\": 60,\n \"max_windows\": 2,\n \"include_frames\": false\n}"
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"created_at": "<string>",
"stream_url": "<string>",
"job_type": "<string>",
"details": {},
"message": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"remediation": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"remediation": "<string>"
}
}Monitoring
Live Digest
Generate periodic narrative summaries via SSE streaming
POST
/
live-digest
Live Digest
curl --request POST \
--url https://trio.machinefi.com/api/live-digest \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"stream_url": "<string>",
"window_minutes": 10,
"webhook_url": "<string>",
"capture_interval_seconds": 60,
"max_windows": 2,
"include_frames": false
}
'import requests
url = "https://trio.machinefi.com/api/live-digest"
payload = {
"stream_url": "<string>",
"window_minutes": 10,
"webhook_url": "<string>",
"capture_interval_seconds": 60,
"max_windows": 2,
"include_frames": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
stream_url: '<string>',
window_minutes: 10,
webhook_url: '<string>',
capture_interval_seconds: 60,
max_windows: 2,
include_frames: false
})
};
fetch('https://trio.machinefi.com/api/live-digest', 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://trio.machinefi.com/api/live-digest",
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([
'stream_url' => '<string>',
'window_minutes' => 10,
'webhook_url' => '<string>',
'capture_interval_seconds' => 60,
'max_windows' => 2,
'include_frames' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://trio.machinefi.com/api/live-digest"
payload := strings.NewReader("{\n \"stream_url\": \"<string>\",\n \"window_minutes\": 10,\n \"webhook_url\": \"<string>\",\n \"capture_interval_seconds\": 60,\n \"max_windows\": 2,\n \"include_frames\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://trio.machinefi.com/api/live-digest")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"stream_url\": \"<string>\",\n \"window_minutes\": 10,\n \"webhook_url\": \"<string>\",\n \"capture_interval_seconds\": 60,\n \"max_windows\": 2,\n \"include_frames\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://trio.machinefi.com/api/live-digest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"stream_url\": \"<string>\",\n \"window_minutes\": 10,\n \"webhook_url\": \"<string>\",\n \"capture_interval_seconds\": 60,\n \"max_windows\": 2,\n \"include_frames\": false\n}"
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"created_at": "<string>",
"stream_url": "<string>",
"job_type": "<string>",
"details": {},
"message": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"remediation": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"remediation": "<string>"
}
}Starts a summary-oriented monitoring job that samples the stream and emits narrative summaries.
Use this when you need trend-level understanding over time, not binary trigger detection.
Delivery Mode Selection
POST /live-digest selects response mode by request shape:
Accept: text/event-streamand nowebhook_url-> SSE modewebhook_urlpresent -> webhook mode- otherwise -> polling mode
Response Semantics by Mode
Polling mode
Returns a job response (job_id, status, created_at, job_type, stream_url, optional message).
Follow with GET /jobs/{job_id} for runtime details and summary outcomes.
Webhook mode
Returns a job response immediately, then delivers async summary/status events. Common webhooktype values:
job_startedsummary_generatedjob_stoppederror
SSE mode
Returns live text events. Common event names:startedprogresssummarystoppederror
stopped and error as terminal events for that stream session.
Tuning Semantics
window_minutes: coverage duration per summarycapture_interval_seconds: sampling cadencemax_windows: optional cap on total windows
Related
- Tuning patterns: Tune Monitoring for Latency, Accuracy, and Cost
- Job state details: Get Job Details
- Workflow chooser: Choose Your Workflow
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Body
application/json
Request to start a live digest job (SSE streaming).
YouTube Live URL or RTSP stream to digest
Required string length:
1 - 500Time window in minutes
Required range:
1 <= x <= 60Webhook URL for notifications
Required string length:
1 - 2083Frame capture interval
Required range:
10 <= x <= 300Stop after N summaries. None = run until max duration
Required range:
x >= 1Include base64 frame grid in summary events
Response
Successful Response