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

NameTypeDetails
Authorizationrequiredstring

Bearer <your API key>. Keys are created in the dashboard; see Authentication.

Request body

Content type application/json.

  • recordboolean or null

    Record the call (audio and transcript, kept 30 days). Default true; false turns recording off for the call that uses this token.

Example request body
{}

Response

201 Success.

  • request_idstringrequired
  • objectstringrequired

    always "noesis.stream_token"

  • tokenstringrequired

    Single-use token (ntk_...), valid for 5 minutes. Pass it as ?token= or as the Twilio <Parameter name="token">.

  • session_idstringrequired

    The session id the call that uses this token will have. Poll GET /v1/detect/sessions/{session_id} for its results.

  • expires_atstringrequired
  • expires_inintegerrequired

    Seconds until the token expires.

  • recordbooleanrequired

    Whether the call will be recorded.

Example response

JSON
{
  "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

StatusMeaning
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
curl -X POST "https://api.noesis.detectif.ai/v1/detect/stream-tokens" \
  -H "Authorization: Bearer $DETECTIF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'