Read a window of a realtime session
GET/v2/realtime/session/{session_id}/window
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.
Request
Responses
- 200
- 400
- 402
- 404
- 409
- 410
- 422
- 503
Successful Response
A stream was asked for that the session was not started for ({"detail": {"code": "modality_not_admitted"}}): any emotion stream when the session was started with emotion_analysis_enabled false, or face on a voice-only session.
The credits for the session have run out ({"detail": {"code": "insufficient_credits"}}). The session has been ended.
Not a session you started, or one that has not started yet.
The span starts after the session's present, or has been dropped from every stream asked for ({"detail": {"code": "window_out_of_range"}}).
The server holding this session restarted or went away, and the session ended with it. The body carries {"code": "session_node_gone"}. Start a new session; retrying this one will not help.
Validation Error
The window could not be read right now ({"detail": {"code": "window_unavailable"}}). Ask again.