Create a stream token
POST/v1/detect/stream-tokens
Product: Noesis (call intelligence). URL: https://api.noesis.detectif.ai/v1/detect/stream-tokens.
Creates a single-use token for one live call, valid for 5 minutes, for clients that cannot send an Authorization header (Twilio <Stream>, Exotel, Telnyx, Vonage). Pass it as ?token= on the WebSocket URL or as the Twilio <Parameter name="token">. The response also has the session_id the call will use: poll GET /v1/detect/sessions/{session_id} for live state and the final answer. Send {"record": false} to not record that call. Does not use your balance. Requires scope noesis:detect.
Authentication
Send your API key as Authorization: Bearer <your API key>.
Headers
| Name | Type | Details |
|---|---|---|
Authorizationrequired | string |
|
Request body
Content type application/json.
recordboolean or nullRecord the call (audio and transcript, kept 30 days). Default true; false turns recording off for the call that uses this token.
{}Response
201 Success.
request_idstringrequiredobjectstringrequiredalways
"noesis.stream_token"tokenstringrequiredSingle-use token (ntk_...), valid for 5 minutes. Pass it as ?token= or as the Twilio <Parameter name="token">.
session_idstringrequiredThe session id the call that uses this token will have. Poll GET /v1/detect/sessions/{session_id} for its results.
expires_atstringrequiredexpires_inintegerrequiredSeconds until the token expires.
recordbooleanrequiredWhether the call will be recorded.
Example response
{
"request_id": "req_8f14e45fceea167a5a36dedd",
"object": "noesis.stream_token",
"token": "ntk_Q7xQ7xQ7xQ7xQ7xQ7xQ7xQ7xQ7xQ7xQ7xQ7xQ7xQ7xa",
"session_id": "5b2f0c9e8d7a4b6c9e1f2a3b4c5d6e7f",
"expires_at": "2026-10-19T09:35:00Z",
"expires_in": 300,
"record": true
}Errors
| Status | Meaning |
|---|---|
| 400 | The request is invalid, for example an API key in the URL or an unsupported parameter. |
| 401 | The API key is missing, invalid or revoked. |
| 403 | The key lacks the required scope, the e-mail address is not verified, or the account is suspended. |
| 429 | Too many requests, or too many calls and file analyses at the same time. Wait for Retry-After seconds. |
| 500 | Something went wrong on our side. |
Error bodies share one shape with a stable error.code; see Errors for every code and how to fix it.
Code samples
curl -X POST "https://api.noesis.detectif.ai/v1/detect/stream-tokens" \
-H "Authorization: Bearer $DETECTIF_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'import os
import requests
resp = requests.post(
"https://api.noesis.detectif.ai/v1/detect/stream-tokens",
headers={"Authorization": f"Bearer {os.environ['DETECTIF_API_KEY']}"},
json={},
timeout=30,
)
print(resp.status_code, resp.json())const res = await fetch("https://api.noesis.detectif.ai/v1/detect/stream-tokens", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.DETECTIF_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
console.log(res.status, await res.json());