Realtime Emotion API

Read a window of a realtime session

Changed on

Read what a session you started produced over one span: the transcript, and the emotion statistics of the streams you ask for.

Use it to follow a session from your server without holding the results socket open. Reading a window does not cost credits of its own, but it is how the session is billed when you do not hold the socket: the session's time is charged, at the same per-second rate, up to its present whenever it is read and when it is ended. A caller that never reads gets no output and pays nothing. A session whose balance has run out is ended and answered 402.

Every time is in milliseconds on one session clock, shared by every stream and by the words; origin_epoch_ms is the Unix time of its zero. The span is half-open, [start_ms, end_ms). An empty or partial window is a 200: silence is data. While a stream carries the pending flag more of the span may still arrive, so ask again; stop once it is gone.

A session started with emotion_analysis_enabled false ran no emotion model: asking it for a stream is a 400, and the transcript is always available. Available while the session is live and for a short time after it ends.

Authentication: Requires valid API key in X-API-Key header.

get/v2/realtime/session/{session_id}/window

Request

  • Base URL
    https://api.imentiv.ai (the document declares no server; this is the origin it was published from)
  • Auth
    • API key in header X-API-Key
    • or HTTP bearer
    • or OAuth 2
      Authorization code: https://api.imentiv.ai/oauth/authorize
      Token URL: https://api.imentiv.ai/oauth/token scopes: realtime.write

Path parameters

session_idstring required

The session ID

Query parameters

start_msinteger required

Start of the span, in milliseconds on the session clock.

end_msinteger required

End of the span (exclusive). Must be greater than start_ms.

modalitiesstring[]

Emotion streams to include, repeated: face, voice, text. Omit for the transcript only.

Response

Successful Response

session_idstring required
origin_epoch_msinteger required

The Unix time, in milliseconds, of the session clock's zero.

now_msinteger required

The session clock when this was answered. It stops moving once the session ends.

start_msinteger required

The start of the span asked for, echoed.

end_msinteger required

The end of the span asked for, echoed.

modalitiesstring[]

The streams asked for, echoed without repeats.

modalities_usedstring[]

The streams that had at least one reading in the window.

words_granularity'word' | 'segment' required

Whether each entry of words is one word or a whole segment.

words_processed_through_msinteger nullable

The session time up to which the transcript is final.

words_flagsstring[]

Why the transcript may be incomplete. pending means ask again.

Changes