About
Start Session
1. Calling the API#
Install the client#
The client provides a convenient way to interact with the model API.
npm install @fal-ai/client@alpha @fal-ai/server-proxy@alphaExperimental realtime API
fal.realtime.open is currently available on the alpha release and may change in a minor version.
Set up the server proxy#
Keep FAL_KEY on your server and expose an authenticated proxy route to your browser. For a Next.js App Router application, create app/api/fal/proxy/route.ts:
import { route } from "@fal-ai/server-proxy/nextjs";
export const { GET, POST, PUT } = route;Set FAL_KEY in the server environment, and protect this route with your application's authentication before deploying it.
Real-time via WebRTC#
This deployment publishes a WMA WebRTC contract. The example uses fal.realtime.open; its media handlers, capture constraints, and control message are generated from the linked AsyncAPI document.
import { createFalClient } from "@fal-ai/client";
import { wma } from "@fal-ai/client/realtime";
const fal = createFalClient({ proxyUrl: "/api/fal/proxy" });
const session = fal.realtime.open(wma("minimax/h3-max/director"), {
receive: [
"video",
"audio"
],
onMedia: (stream) => {
const element = document.querySelector("video");
if (element) element.srcObject = stream;
},
onData: (raw) => {
const message = JSON.parse(raw);
if (message?.type === "configured" && message?.["prompt_version"] === 1) {
console.log("Session configured. You can now send text updates.");
}
console.log(message);
},
onState: (state) => console.log("realtime:", state),
onError: (error) => console.error(error),
});
// Send setup once. The client buffers this until the control channel opens.
// Wait for the matching acknowledgement in onData before sending updates.
session.send({
"prompt_version": 1,
"resolution": "768p",
"aspect_ratio": "16:9",
"type": "configure",
"prompt": "A continuous original live-action American sitcom produced in 1994, following the same ensemble of adult roommates, coworkers, neighbors, and rivals. Preserve appearances, apartment and workplace layouts, relationships, jobs, secrets, running jokes, and unresolved storylines. Advance through dialogue, entrances, misunderstandings, escalating attempts to hide mistakes, reversals, and warm character payoffs. Avoid references to existing sitcoms or actors.",
"protocol_version": 1,
"memory": 3
});
// Later, release the peer connection and network resources:
// await session.close();Session flow#
Configure once, wait for the model to acknowledge setup, then update the running session. The transport being live does not mean the model is configured.
1. Configure the session#
Send configure once with /prompt_version set to 1. These field paths are JSON Pointers into message payloads. Use the setup message reference below for all configuration fields.
{
"prompt_version": 1,
"resolution": "768p",
"aspect_ratio": "16:9",
"type": "configure",
"prompt": "A continuous original live-action American sitcom produced in 1994, following the same ensemble of adult roommates, coworkers, neighbors, and rivals. Preserve appearances, apartment and workplace layouts, relationships, jobs, secrets, running jokes, and unresolved storylines. Advance through dialogue, entrances, misunderstandings, escalating attempts to hide mistakes, reversals, and warm character payoffs. Avoid references to existing sitcoms or actors.",
"protocol_version": 1,
"memory": 3
}2. Wait for acknowledgement#
Wait for configured whose /prompt_version matches the version you sent in setup. Only that acknowledgement enables text updates. Pending, applied, or rejected input events do not confirm session readiness.
3. Update the running session#
Send prompt with your text at /prompt. Start from {"type":"prompt"}, add the text and the next /prompt_version, and validate the complete payload against the message schema. The first update uses 2; increase by 1 for each subsequent submission.
{
"type": "prompt",
"prompt": "They follow a narrow path down to the harbor.",
"prompt_version": 2
}This action sends only the template, text, and version fields. Other options in the raw message schema are outside this text-update flow. If you use them too, coordinate the same session-wide version sequence.
Track each update#
Match the version in each event to the submission it describes, including the initial setup input. Several updates can have different outcomes while the session stays ready.
- Pending (
prompt_pending): The model is preparing this input. Match the submitted version at/prompt_version. - Applied (
prompt_applied): Accepted for generation. The result may not be generating or visible yet. Match the submitted version at/prompt_version. - Rejected (
prompt_rejected): This input was not accepted. An earlier applied input can remain active. Match the submitted version at/prompt_version.
You can send another update while preparation is pending. Newer updates can replace older pending preparation, and the older input may never receive a final event. A missing acknowledgement means the outcome is unknown; it does not prove rejection.
Handle errors#
For error, read the code at /code and the explanation at /error. Match input failures using /prompt_version.
- Session failure: Ends this session attempt, even without a matching version. Codes:
configuration_timeout,initialization_timeout,invalid_initial_image,invalid_initial_audio,invalid_initial_script,invalid_input,balance_unavailable,content_policy,generation_timeout,generation_failed. - Input failure: Fails only the submission with a known matching version. An absent or unknown version is diagnostic. Codes:
stale_prompt_version. - Diagnostic: Provides information without declaring the session or a submission failed. Codes:
invalid_message,not_configured,immutable_settings.
Treat unknown codes as diagnostics. An input failure without a known matching submission is also diagnostic; do not guess which input failed.
End or reconnect#
stream_exhausted ends this session attempt. A closed or failed connection also ends the attempt. Later messages must not reopen it. A session failure does not need to emit a separate end event.
Do not automatically replay setup or updates. Start a new sequence at 1 for a new session. Gaps are allowed; never reuse a version after uncertain delivery, and keep versions within the message schema and JavaScript's safe integer range.
2. Authentication#
The browser connects through your server proxy, which reads FAL_KEY from the server environment. Never put that key in browser code.
API Key#
Protect your API Key
When running code on the client-side (e.g. in a browser, mobile app or GUI applications), make sure to not expose your FAL_KEY. Instead, use a server-side proxy to make requests to the API. For more information, check out our server-side integration guide.
3. Schema#
Media#
Client contract for the WebRTC session created by the linked OpenAPI operation.
Tracks are described from the browser's perspective. Send tracks are captured by the browser and sent to the model; receive tracks come back from the model.
Send
No send media tracks.
Receive
{
"frameRate": 24
}Client messages#
Client configure message
type: "configure"payload: objectCorrelation field: /prompt_version
Additional properties: not allowed
promptstring* requiredAt least 1 character · At most 50000 characters
resolutionstringDefault: "768p"
Values: "480p", "768p", "1080p"
aspect_ratiostringDefault: "16:9"
Values: "16:9", "9:16", "1:1"
image_urlstring | nullURL of the image to use as the exact first frame. The opening prompt expansion also sees this image, so the first segment's prompt is grounded in it.
Default: null
At least 1 character when not null
end_image_urlstring | nullOne-shot exact final frame for the first chunk. Director jointly plans that arrival and the following checkpoint continuation.
Default: null
At least 1 character when not null
audio_urlstring | nullOptional startup soundtrack. The stream's audio is pinned to this recording from the first chunk as FL2VA target audio, not a Ref2VA reference: every chunk is conditioned on the next window of it (plus the regenerated seam) until it ends, and the source PCM itself is what plays. Live prompt messages can replace or queue more audio at any time.
Default: null
At least 1 character when not null
memoryintegerNumber of prior segment prompts retained as context for future prompt expansion.
Default: 12
minimum: 1 · maximum: 50
audio_bitrateinteger | nullSession audio target in bits/s: 96000, 128000, or 192000. Explicit values use Opus audio mode on direct WebRTC; LiveKit uses its native mode with the same bitrate target. Null preserves transport defaults (WebRTC: 96000, voip). Immutable; reconnect to compare.
Default: null
When not null:
Values: 96000, 128000, 192000
seedinteger | nullDefault: null
prompt_versioninteger* requiredminimum: 1
protocol_versionintegerConstant: 1
scriptobject[] | nullOptional upfront script: beats at whole-second offsets from the first generated video. prompt stays the series premise; a beat prompt directs from its offset on. Cannot be combined with end_image_url or audio_url (place them in the script).
Default: null
Must match at least one of the following:
object[]minItems: 1 · maxItems: 64
objectA direction on the associated video's clock, never the stream clock.
Additional properties: not allowed
end_image_urlstring | nullExact final frame of the chunk that ends at this offset. Offsets of successive end images must be at least three seconds apart.
Default: null
At least 1 character when not null
offsetinteger* requiredWhole seconds from the start of the first video generated under this script. Text and audio placed here start at this second; an end image here is the exact final frame at this second.
minimum: 0
audio_urlstring | nullAudio that starts playing exactly at this offset as FL2VA target audio; overlapping sources are mixed. The source PCM itself plays.
Default: null
At least 1 character when not null
promptstring | nullDirection that starts at this offset and persists until the next text beat; it also appears as a timed span inside the chunk.
Default: null
At least 1 character when not null · At most 50000 characters when not null
nulltypestring* requiredConstant: "configure"
Drop a fixed ensemble into audience-created misunderstandings.
{
"prompt_version": 1,
"resolution": "768p",
"aspect_ratio": "16:9",
"type": "configure",
"prompt": "A continuous original live-action American sitcom produced in 1994, following the same ensemble of adult roommates, coworkers, neighbors, and rivals. Preserve appearances, apartment and workplace layouts, relationships, jobs, secrets, running jokes, and unresolved storylines. Advance through dialogue, entrances, misunderstandings, escalating attempts to hide mistakes, reversals, and warm character payoffs. Avoid references to existing sitcoms or actors.",
"protocol_version": 1,
"memory": 3
}Client ping message
type: "ping"payload: objectAdditional properties: not allowed
typestring* requiredConstant: "ping"
tsnumber* required{
"type": "ping",
"ts": 0
}Client prompt message
type: "prompt"payload: objectCorrelation field: /prompt_version
Additional properties: not allowed
promptstring | nullDefault: null
At least 1 character when not null · At most 50000 characters when not null
end_image_urlstring | nullDefault: null
At least 1 character when not null
audio_urlstring | nullFL2VA target audio for future chunks; this is not a Ref2VA reference. With audio_behavior 'replace' (default) it starts at the next undispatched chunk and drops any queued audio; with 'queue' it plays after every previously accepted source ends, sample-exact.
Default: null
At least 1 character when not null
audio_behaviorstring'replace' cuts to this audio at the next chunk; 'queue' appends it.
Default: "replace"
Values: "replace", "queue"
replanbooleanWhen a prompt is included: true (default) busts the planned prompt queue so the new direction applies at the next undispatched chunk; false appends the direction after the already-planned chunks.
Default: true
prompt_versioninteger* requiredminimum: 1
script_modestring'replace' cuts to the script at the next chunk; 'append' queues it.
Default: "replace"
Values: "replace", "append"
scriptobject[] | nullA new script: beats at whole-second offsets from the first video generated under it. Exclusive with prompt/end_image_url/audio_url. With script_mode 'replace' (default) it replaces the pending and current direction at the next undispatched chunk; 'append' starts at the chunk boundary after the running script's last text beat is represented and its audio tails have finished (queued behind earlier appended scripts). Beats without a prompt keep the current text direction.
Default: null
Must match at least one of the following:
object[]minItems: 1 · maxItems: 64
objectA direction on the associated video's clock, never the stream clock.
Additional properties: not allowed
end_image_urlstring | nullExact final frame of the chunk that ends at this offset. Offsets of successive end images must be at least three seconds apart.
Default: null
At least 1 character when not null
offsetinteger* requiredWhole seconds from the start of the first video generated under this script. Text and audio placed here start at this second; an end image here is the exact final frame at this second.
minimum: 0
audio_urlstring | nullAudio that starts playing exactly at this offset as FL2VA target audio; overlapping sources are mixed. The source PCM itself plays.
Default: null
At least 1 character when not null
promptstring | nullDirection that starts at this offset and persists until the next text beat; it also appears as a timed span inside the chunk.
Default: null
At least 1 character when not null · At most 50000 characters when not null
nulltypestring* requiredConstant: "prompt"
Send a new direction after configuration is acknowledged
{
"prompt_version": 2,
"script_mode": "replace",
"type": "prompt",
"prompt": "They follow a narrow path down to the harbor.",
"replan": true,
"audio_behavior": "replace"
}Client stop message
type: "stop"payload: objectAdditional properties: not allowed
typestring* requiredConstant: "stop"
{
"type": "stop"
}Server messages#
Server audio_applied message
type: "audio_applied"payload: objectAn audio update was accepted; it conditions the next eligible chunk.
starts_at_chunk_index is the first chunk that can carry it (the next
undispatched chunk for replace; for queue the chunk where the
preceding sources end, if already known).
prompt_versioninteger* requiredminimum: 1
transcribedboolean* requiredremaining_secondsnumber* requiredminimum: 0
duration_secondsnumber* requiredexclusiveMinimum: 0
behaviorstring* requiredValues: "replace", "queue"
queued_sourcesinteger* requiredminimum: 0
sourcestring* requiredtypestring* requiredConstant: "audio_applied"
{
"prompt_version": 1,
"transcribed": true,
"remaining_seconds": 0,
"duration_seconds": 5e-324,
"behavior": "replace",
"queued_sources": 0,
"source": "string",
"type": "audio_applied"
}Server audio_exhausted message
type: "audio_exhausted"payload: objectAccepted audio ran out inside this chunk; the rest is silence.
Later chunks continue without audio conditioning (checkpoint continuation on the same family) until new audio is accepted.
source_versioninteger | nullDefault: null
minimum: 0 when not null
typestring* requiredConstant: "audio_exhausted"
silent_secondsnumber* requiredminimum: 0
chunk_indexinteger* requiredminimum: 0
{
"type": "audio_exhausted",
"silent_seconds": 0,
"chunk_index": 0
}Server audio_pending message
type: "audio_pending"payload: objectprompt_versioninteger* requiredminimum: 1
behaviorstring* requiredValues: "replace", "queue"
typestring* requiredConstant: "audio_pending"
{
"prompt_version": 1,
"behavior": "replace",
"type": "audio_pending"
}Server audio_rejected message
type: "audio_rejected"payload: objectprompt_versioninteger* requiredminimum: 1
reasonstring* requiredValues: "invalid_audio", "content_policy", "preparation_failed", "queue_full", "stale_prompt_version"
typestring* requiredConstant: "audio_rejected"
errorstring* required{
"prompt_version": 1,
"reason": "invalid_audio",
"type": "audio_rejected",
"error": "string"
}Server chunk message
type: "chunk"payload: objectprompt_versioninteger* requiredminimum: 1
generation_secondsnumber* requiredminimum: 0
next_generation_estimate_secondsnumber* requiredminimum: 0
presented_frame_countinteger | nullDefault: null
exclusiveMinimum: 0 when not null
trimmed_context_framesinteger* requiredminimum: 0
native_playable_frame_countinteger | nullDefault: null
exclusiveMinimum: 0 when not null
dispatchobject* requiredwall_msnumber* requiredminimum: 0
classified_msnumber* requiredminimum: 0
overhead_msnumber* requiredminimum: 0
phases_msobject* requiredAdditional properties: number
numberscript_offset_secondsinteger | nullDefault: null
minimum: 0 when not null
buffer_depth_secondsnumber* requiredminimum: 0
chunk_indexinteger* requiredminimum: 0
routestring* requiredValues: "gorgonea", "betelgeuse", "regulus", "unknown"
scheduling_lead_msnumber* requiredscheduling_slack_msnumber* requiredhard_cutbooleanDefault: false
script_end_keyframeboolean | nullDefault: null
buffer_depth_chunksinteger* requiredminimum: 0
requested_duration_secondsinteger* requiredminimum: 5 · maximum: 15
typestring* requiredConstant: "chunk"
playback_secondsnumber* requiredexclusiveMinimum: 0
generated_frame_countinteger* requiredexclusiveMinimum: 0
script_versioninteger | nullDefault: null
minimum: 1 when not null
{
"prompt_version": 1,
"generation_seconds": 0,
"next_generation_estimate_seconds": 0,
"trimmed_context_frames": 0,
"dispatch": {
"wall_ms": 0,
"classified_ms": 0,
"overhead_ms": 0,
"phases_ms": {}
},
"buffer_depth_seconds": 0,
"chunk_index": 0,
"route": "gorgonea",
"scheduling_lead_ms": 0,
"scheduling_slack_ms": 0,
"buffer_depth_chunks": 0,
"requested_duration_seconds": 5,
"type": "chunk",
"playback_seconds": 5e-324,
"generated_frame_count": 1
}Server chunk_metrics message
type: "chunk_metrics"payload: objectroutestring* requiredValues: "gorgonea", "betelgeuse", "regulus", "unknown"
chunk_consumable_interval_msnumber | nullDefault: null
minimum: 0 when not null
unitsstring* requiredConstant: "ms"
gaugesobject* requiredAdditional properties: number
numberchunk_consumable_ready_msnumber | nullDefault: null
minimum: 0 when not null
phases_msobject* requiredAdditional properties: number
numberchunk_indexinteger* requiredminimum: 0
typestring* requiredConstant: "chunk_metrics"
{
"route": "gorgonea",
"units": "ms",
"gauges": {},
"phases_ms": {},
"chunk_index": 0,
"type": "chunk_metrics"
}Server configured message
type: "configured"payload: objectCorrelation field: /prompt_version
prompt_versioninteger* requiredminimum: 1
has_initial_audioboolean | nullDefault: null
aspect_ratiostring | nullDefault: null
When not null:
Values: "16:9", "9:16", "1:1"
has_initial_imageboolean | nullDefault: null
memoryinteger | nullDefault: null
minimum: 1 when not null · maximum: 50 when not null
resolutionstring | string | nullDefault: null
Must match at least one of the following:
stringValues: "480p", "544p", "640p", "704p", "768p"
stringValues: "480p", "768p", "1080p"
nullaudio_bitrateinteger | nullDefault: null
When not null:
Values: 96000, 128000, 192000
accelerationstring | nullDefault: null
When not null:
Values: "none", "regular"
typestring* requiredConstant: "configured"
enable_safety_checkerboolean* requiredchunk_durationinteger | nullDefault: null
minimum: 5 when not null · maximum: 15 when not null
{
"prompt_version": 1,
"type": "configured",
"enable_safety_checker": true
}Server deadline_missed message
type: "deadline_missed"payload: objectlate_by_secondsnumber* requiredminimum: 0
behaviorstring* requiredConstant: "freeze_video_and_silence_audio_until_ready"
typestring* requiredConstant: "deadline_missed"
chunk_indexinteger* requiredminimum: 0
{
"late_by_seconds": 0,
"behavior": "freeze_video_and_silence_audio_until_ready",
"type": "deadline_missed",
"chunk_index": 0
}Server error message
type: "error"payload: objectCorrelation field: /prompt_version
prompt_versioninteger | nullDefault: null
minimum: 1 when not null
codestring* requiredValues: "balance_unavailable", "content_policy", "configuration_timeout", "generation_failed", "generation_timeout", "immutable_settings", "initialization_timeout", "invalid_initial_image", "invalid_initial_audio", "invalid_initial_script", "invalid_input", "invalid_message", "not_configured", "stale_prompt_version"
typestring* requiredConstant: "error"
detailobject[] | nullDefault: null
Must match at least one of the following:
object[]objectnullerrorstring* required{
"code": "balance_unavailable",
"type": "error",
"error": "string"
}Server pong message
type: "pong"payload: objecttypestring* requiredConstant: "pong"
client_tsnumber* required{
"type": "pong",
"client_ts": 0
}Server prompt_applied message
type: "prompt_applied"payload: objectCorrelation field: /prompt_version
A direction (or script) is admitted; the script fields report scripts.
script_origin_chunk_index is the first chunk generated under the
script when that is already fixed (a replacement binds to the next
undispatched chunk); an appended script reports None until it starts.
prompt_versioninteger* requiredminimum: 1
script_modestring | nullDefault: null
When not null:
Values: "replace", "append"
typestring* requiredConstant: "prompt_applied"
script_origin_chunk_indexinteger | nullDefault: null
minimum: 0 when not null
script_queuedinteger | nullDefault: null
minimum: 0 when not null
script_beatsinteger | nullDefault: null
minimum: 1 when not null
{
"prompt_version": 1,
"type": "prompt_applied"
}Server prompt_pending message
type: "prompt_pending"payload: objectCorrelation field: /prompt_version
prompt_versioninteger* requiredminimum: 1
typestring* requiredConstant: "prompt_pending"
{
"prompt_version": 1,
"type": "prompt_pending"
}Server prompt_rejected message
type: "prompt_rejected"payload: objectCorrelation field: /prompt_version
prompt_versioninteger* requiredminimum: 1
reasonstring* requiredValues: "content_policy", "preparation_failed", "stale_prompt_version", "invalid_script", "infeasible_timing", "invalid_audio", "invalid_image", "queue_full"
typestring* requiredConstant: "prompt_rejected"
errorstring | nullDefault: null
{
"prompt_version": 1,
"reason": "content_policy",
"type": "prompt_rejected"
}Server session_info message
type: "session_info"payload: objectscript_session_max_decoded_audio_bytesintegerDefault: 335544320
fpsintegerConstant: 24
one_session_per_machinebooleanConstant: true
max_audio_source_secondsnumberDefault: 600
audio_behaviorsstring[]Default: ["replace","queue"]
stringValues: "replace", "queue"
scriptsbooleanConstant: true
audio_sample_rateintegerConstant: 48000
accelerationsstring[]Default: ["none","regular"]
stringValues: "none", "regular"
script_max_queuedintegerConstant: 4
controller_machine_typestringConstant: "XL"
script_modesstring[]Default: ["replace","append"]
stringValues: "replace", "append"
script_max_audio_beatsintegerConstant: 8
script_min_opening_chunk_secondsintegerConstant: 5
default_memoryintegerConstant: 12
aspect_ratiosstring[]Default: ["16:9","9:16","1:1"]
stringValues: "16:9", "9:16", "1:1"
min_chunk_durationintegerConstant: 5
session_limit_scopestringDefault: "configured"
Values: "configured", "effective"
script_min_end_image_spacing_secondsintegerConstant: 3
chunk_secondsintegerConstant: 10
opening_reservedbooleanDefault: false
script_max_beatsintegerConstant: 64
appstringConstant: "minimax-h3-max-director"
script_min_chunk_secondsintegerConstant: 3
prompt_context_segmentsintegerConstant: 12
max_chunk_durationintegerConstant: 15
prompt_deck_sizeintegerConstant: 6
client_message_typesstring[]Default: ["configure","ping","prompt","stop"]
stringValues: "configure", "ping", "prompt", "stop"
default_accelerationstringConstant: "regular"
default_chunk_durationintegerConstant: 10
backend_selectionstringConstant: "minimax-h3-turbo-balancer"
prompt_expanderstringConstant: "fast"
script_max_decoded_audio_bytesintegerDefault: 67108864
script_max_pendingintegerConstant: 4
continuation_context_framesintegerConstant: 39
min_memoryintegerConstant: 1
resolutionsstring[]Default: ["480p","768p","1080p"]
stringValues: "480p", "768p", "1080p"
max_session_secondsnumber | nullDefault: null
protocol_versionintegerConstant: 1
audio_bitratesinteger[]Default: [96000,128000,192000]
integerValues: 96000, 128000, 192000
audio_conditioningbooleanConstant: true
script_max_end_imagesintegerConstant: 16
max_memoryintegerConstant: 50
default_audio_bitrateinteger | nullDefault: null
When not null:
Values: 96000, 128000, 192000
continuation_playback_secondsnumberDefault: 8.5
conditioning_audio_sample_rateintegerConstant: 32000
server_message_typesstring[]Default: ["audio_applied","audio_exhausted","audio_pending","audio_rejected","chunk","chunk_metrics","configured","deadline_missed","error","pong","prompt_applied","prompt_pending","prompt_rejected","session_info","session_metrics","stream_exhausted"]
stringValues: "audio_applied", "audio_exhausted", "audio_pending", "audio_rejected", "chunk", "chunk_metrics", "configured", "deadline_missed", "error", "pong", "prompt_applied", "prompt_pending", "prompt_rejected", "session_info", "session_metrics", "stream_exhausted"
typestring* requiredConstant: "session_info"
{
"fps": 24,
"one_session_per_machine": true,
"scripts": true,
"audio_sample_rate": 48000,
"script_max_queued": 4,
"controller_machine_type": "XL",
"script_max_audio_beats": 8,
"script_min_opening_chunk_seconds": 5,
"default_memory": 12,
"min_chunk_duration": 5,
"script_min_end_image_spacing_seconds": 3,
"chunk_seconds": 10,
"script_max_beats": 64,
"app": "minimax-h3-max-director",
"script_min_chunk_seconds": 3,
"prompt_context_segments": 12,
"max_chunk_duration": 15,
"prompt_deck_size": 6,
"default_acceleration": "regular",
"default_chunk_duration": 10,
"backend_selection": "minimax-h3-turbo-balancer",
"prompt_expander": "fast",
"script_max_pending": 4,
"continuation_context_frames": 39,
"min_memory": 1,
"protocol_version": 1,
"audio_conditioning": true,
"script_max_end_images": 16,
"max_memory": 50,
"conditioning_audio_sample_rate": 32000,
"type": "session_info"
}Server session_metrics message
type: "session_metrics"payload: objectunitsstring* requiredConstant: "ms"
phasesobject* requiredAdditional properties: object
objectp95_msnumber* requiredminimum: 0
countinteger* requiredminimum: 0
max_msnumber* requiredminimum: 0
p50_msnumber* requiredminimum: 0
total_msnumber* requiredminimum: 0
history_limitinteger* requiredminimum: 1
gaugesobject* requiredAdditional properties: number
numbertypestring* requiredConstant: "session_metrics"
finalbooleanDefault: false
session_wall_msnumber* requiredminimum: 0
history_sizeinteger* requiredminimum: 0
{
"units": "ms",
"phases": {},
"history_limit": 1,
"gauges": {},
"type": "session_metrics",
"session_wall_ms": 0,
"history_size": 0
}Server stream_exhausted message
type: "stream_exhausted"payload: objectreasonstring* requiredValues: "stopped", "session_limit"
typestring* requiredConstant: "stream_exhausted"
chunksinteger* requiredminimum: 0
{
"reason": "stopped",
"type": "stream_exhausted",
"chunks": 0
}