Noesis
Sessions and usage
Look up a call by its session ID, and see your Noesis calls and minutes.
Both endpoints need a key with the noesis:read permission.
Look up a call
Every live call and recorded call has a session_id: it is in the ready event of a live call and in the result of a recorded call. Use it to read the call's state, its latest answer and its events:
curl https://api.noesis.detectif.ai/v1/detect/sessions/9f2c4e7a-1b3d-4c5e-8f60-2a7b9c1d3e4f \
-H "Authorization: Bearer $DETECTIF_API_KEY"import os
import requests
session_id = "9f2c4e7a-1b3d-4c5e-8f60-2a7b9c1d3e4f"
resp = requests.get(
f"https://api.noesis.detectif.ai/v1/detect/sessions/{session_id}",
headers={"Authorization": f"Bearer {os.environ['DETECTIF_API_KEY']}"},
timeout=30,
)
session = resp.json()
print(session["closed"], session["label"])const sessionId = "9f2c4e7a-1b3d-4c5e-8f60-2a7b9c1d3e4f";
const res = await fetch(`https://api.noesis.detectif.ai/v1/detect/sessions/${sessionId}`, {
headers: { Authorization: `Bearer ${process.env.DETECTIF_API_KEY}` },
});
const session = await res.json();
console.log(session.closed, session.label);closedsays whether the call has ended. While the call is live, the session shows the answers so far.- Use it after a dropped connection, or to check a call later.
- Only the account that created a session can read it. Any other session ID returns
404withsession_not_found.
Usage
Your account's Noesis calls and minutes:
curl https://api.noesis.detectif.ai/v1/detect/usage \
-H "Authorization: Bearer $DETECTIF_API_KEY"The fields are listed in the API Reference. Your credit balance, shared with the other DetectifAI APIs, is on the dashboard Overview page.
Calls at the same time
Your plan sets how many live calls and recordings can run at the same time. Over the limit, a new call is refused with 429 (close code 4429 on the WebSocket) until one of your calls ends.