dialog-rsn-1.1, and dialog-rsn-1 is an alias for the latest version.
Limits and pricing
Concurrency, session duration, context window, audio formats, languages and the connected-minute rate.
Dialog-RSN-1 docs
The overview, quickstart, prompting pages and integration guides.
OpenAI Realtime reference
Field-level documentation for every event. This page lists what we accept and where we differ.
Connect
Connect towss://api.studio.poly.ai/v1/realtime with an API key from studio.poly.ai. Sign up or log in there and create the key in the API Keys tab. The quickstart has the steps.
Enterprise accounts on
studio.us.poly.ai connect to wss://api.us.poly.ai/v1/realtime instead, with a key from that Studio. A key only works on the host that matches the Studio that issued it, and a mismatch returns 401. Self-serve keys run in the US only. UK and EU workspaces are served from our EU region (Ireland) via api.uk.poly.ai and api.eu.poly.ai, available on request.session.created with the default session, and you don’t need to send anything to open the conversation. The OpenAI SDK appends /realtime to the base URL and sends your key as a bearer token.
session_id ([A-Za-z0-9_.-], up to 128 characters) names the session for your own logs. It comes back as session.poly_session_id. The model query parameter that OpenAI clients send is accepted and ignored.
The server pings every 20 seconds, which keeps a quiet connection open. A connection whose client sends no event for 5 minutes is closed with code 4408. A client that keeps streaming audio stays open.
Authenticate
Send your API key from studio.poly.ai in either header. They are equivalent.Configure the session
Sendsession.update after session.created. A partial update deep-merges onto the current session, so updating instructions doesn’t wipe tools. A rejected update applies nothing and sends no session.updated, so what comes back in session.updated is exactly what is in effect.
A new session speaks its replies. This update keeps that default, so replies arrive as audio and a transcript:
session.update
output_modalities to ["text"]. Replies then arrive as text, and you send playback reports as you play them.
session.update
Honored
poly_speech and poly_spoken go on a tool, not on the session. See PolyAI extensions.
Accepted and ignored
The server accepts and ignores these fields, which stock clients send by default. Most are left out ofsession.updated. audio.input.transcription and parallel_tool_calls are echoed back but change nothing.
model(the session reports the current model,dialog-rsn-1.1),tracing,truncation,includeaudio.input.noise_reductionaudio.input.transcription. Transcripts are always sent, and a transcription session readslanguage.- Turn-detection timing:
threshold,silence_duration_ms(honored on a transcription session),prefix_padding_ms,eagerness.type: "semantic_vad"is reported back asserver_vad. turn_detection.interrupt_response: true, which is already how the service behavesaudio.output.voiceset to an OpenAI voice name (alloy,marinand the rest): the deployment’s default voice speaks instead.audio.output.speed.parallel_tool_calls(the model makes one call per turn)
Refused
Fields that would change what you get if silently ignored are refused with anerror naming the field in param. The whole update is dropped, so a good field sent alongside a bad one doesn’t take effect either.
Audio in
Audio travels as base64 insideinput_audio_buffer.append. Binary WebSocket frames are refused.
- Send about 20 ms per frame (640 bytes at 16 kHz, 960 at 24 kHz). One frame may not exceed 256 KiB, and a larger frame closes the connection with code
1009. - Keep streaming during silence. The server decides where the turn ends from the audio, so a client that stops sending looks idle. With push-to-talk, append only while the caller holds the button, because silence you send becomes part of the turn.
- One turn may hold up to 300 seconds of audio. Anything longer is dropped.
- Audio in
conversation.item.createis refused withunsupported_item_type. Stream caller audio, and useconversation.item.createfor text, tool results and history.
Run a turn
Withcreate_response: true the sequence for one caller turn is:
- You stream
input_audio_buffer.appendframes. input_audio_buffer.speech_startedwhen the caller starts talking, theninput_audio_buffer.speech_stoppedandinput_audio_buffer.committedonce Dialog-RSN-1 judges the caller has finished.conversation.item.addedandconversation.item.donefor the caller’s turn.response.created,response.output_item.addedandresponse.content_part.added. Thenresponse.output_audio_transcript.deltaframes carry the reply’s words andresponse.output_audio.deltaframes carry its sound, as base64 PCM16 mono at 24 kHz sent at the pace it plays.response.output_audio.done,response.output_audio_transcript.done,response.content_part.doneandresponse.output_item.doneclose the reply, andresponse.donearrives once it has finished playing.conversation.item.input_audio_transcription.deltaand.completed, carrying what the model heard, arrive during the reply. See Caller transcripts.
response.output_text.delta frames until response.output_text.done, with no audio events.
With create_response: false, step 2 follows the first pause, or your input_audio_buffer.commit. Step 4 starts when you send response.create.
With turn_detection: null (push-to-talk), step 2 is only input_audio_buffer.committed, sent when you send input_audio_buffer.commit. Step 4 starts when you send response.create.
These samples stream a WAV file, print what the model heard and the reply’s transcript, and save the spoken reply. For a text session, add "output_modalities": ["text"] to the session.update and read response.output_text.delta instead.
Turn-taking and barge-in
Withcreate_response: true, Dialog-RSN-1 decides when the caller has finished, and tells you with two events.
input_audio_buffer.speech_startedarrives when the caller starts talking, and names the item id the turn will become. While a reply is playing, it arrives once Dialog-RSN-1 has judged the sound to be the caller.input_audio_buffer.speech_stoppedarrives when Dialog-RSN-1 judges the caller has finished, and the reply follows straight away. A pause mid-sentence doesn’t end the turn. A sound that turns out not to be the caller is dropped, so aspeech_startedcan arrive with nospeech_stoppedafter it.
instructions. The timing fields of turn_detection are accepted and ignored (see Accepted and ignored).
Setting create_response: false turns off Dialog-RSN-1’s judgment of when the caller has finished. A turn ends at the first pause, or when you send input_audio_buffer.commit, and nothing answers it until you send response.create. A pause mid-sentence splits the caller’s speech into two items in history.
A confirmed barge-in cancels the reply. If the caller starts talking while a response is still streaming, Dialog-RSN-1 confirms it’s the caller, then cancels the response as if you had sent response.cancel. There’s no separate event for this: the response ends with response.done and status cancelled, right after a speech_started. interrupt_response can’t be turned off. With push-to-talk nothing barges in, so send response.cancel to stop a reply.
When the server speaks the reply, it knows what the caller has heard. When you speak it yourself, send playback reports so barge-in follows your real playback and history keeps the words the caller heard.
Spoken or text replies
output_modalities: ["audio"], the default. The server speaks the reply. The sound streams asresponse.output_audio.delta, base64 PCM16 mono at 24 kHz, sent at the pace it plays. The words stream asresponse.output_audio_transcript.delta. Pick the voice withaudio.output.voice, a Cartesia voice id, or leave it unset for the default voice.response.donearrives once the reply has finished playing.output_modalities: ["text"], for your own text-to-speech. The reply streams asresponse.output_text.delta, with no audio events, and you speak it however you like. Use it when you want your own voice or vendor, control over playback, or a place to log the reply and run your guardrails before a caller hears it. Then send playback reports. Streaming to your TTS walks through it.
response.output_text.delta, so a client that reads only text deltas sees an empty reply and no error. Read the transcript deltas, or set ["text"].
Caller transcripts
Dialog-RSN-1 transcribes the caller in the same generation that answers the turn. The transcript streams asconversation.item.input_audio_transcription.delta and .completed, attributed to the caller’s audio item. It can arrive after the reply has started, so don’t wait for it before handling the reply. .completed reports the audio’s duration as its usage, and the response’s tokens arrive on response.done.
conversation.item.retrieve on a caller’s audio turn returns the transcript, not the audio. To transcribe without a reply, open a transcription session.
Responses
- One response at a time. A
response.createwhile a response is open is refused withconversation_already_has_active_response. Sendresponse.cancelfirst. Aresponse.createsent while the caller is still speaking is held and answered by the response to their turn. One sent while a reply the server speaks is still playing is held until that audio ends. Only one request is held at a time. response.createmay setinstructions,max_output_tokensandmetadata.parallel_tool_callsis ignored. Every other field must match the session or is refused withunsupported_parameter, namingresponse.<field>. That includesconversation: "none"(no out-of-band responses), a per-responseoutput_modalities,toolsortool_choice,input,audio,promptandreasoning. Change the session withsession.updateinstead.response.donealways ends a response, whatever the outcome. Itsresponse.statusiscompleted,cancelledorfailed. A canceled response closes any open output item asincomplete, so a client waiting on a matching.doneisn’t left hanging.
Function calling
Declare function tools insession.tools. When the model calls one, the arguments stream as response.function_call_arguments.delta, and response.function_call_arguments.done carries the name, the full arguments and a call_id. The model makes one call per turn.
Answer with conversation.item.create, an item of type: "function_call_output" with the matching call_id, then send response.create. A tool result ends no turn on its own, so nothing answers it until you ask.
For a tool declared as get_weather(location: string):
round trip
response.output_text.delta on a text session. To control the line, set poly_speech on the tool, or mark one string parameter with "poly_spoken": true (see PolyAI extensions). To return knowledge base results, attach poly_knowledge to the function_call_output item. Tools and knowledge covers both.
Transcription sessions
A transcription session transcribes each turn and never answers it. Use it for dictation, captions or notes, where you don’t need a reply. You pay for each turn’s audio and its transcript, with no history, instructions or reply to bill. Open one the way OpenAI’s clients do, withintent=transcription on the connection, then configure it with a session.update of type: "transcription":
session.created reports type: "transcription", with no model, instructions or tools.
Each turn goes like this:
- You stream
input_audio_buffer.appendframes. - The server sends
input_audio_buffer.speech_started, theninput_audio_buffer.speech_stoppedandinput_audio_buffer.committedat the next pause. Withturn_detection: nullyou get onlycommitted, after you sendinput_audio_buffer.commit. conversation.item.addedandconversation.item.donearrive for the turn, without a transcript yet.conversation.item.input_audio_transcription.deltaframes stream the transcript, and.completedcarries all of it with its usage in tokens. A turn that can’t be transcribed ends with.failedinstead.
- A turn ends at a pause. Nothing is answered, so the model doesn’t confirm where a turn ends, and a pause mid-sentence splits it into two items.
turn_detection.silence_duration_mssets how long that pause is (400 ms by default). A realtime session ignores this field. To decide where turns end yourself, useturn_detection: nulland sendinput_audio_buffer.commit. - Each turn is transcribed on its own, without earlier turns, and transcripts complete in the order the turns were spoken.
- Set the language with
audio.input.transcription.language, as an ISO 639 code such asesoren-US.transcription.modelandpromptare accepted and echoed back, but not used. response.createis refused withresponse_create_for_transcription_session.- A session keeps its type. A
session.updatewithtype: "realtime"on a transcription session is refused withinvalid_parameter, and so istype: "transcription"on a realtime session that has taken a turn or has one in progress. An update withouttypeapplies to the current session. A realtime session with an empty conversation can still switch to transcription.
.completed event, for a 1.2-second question:
text_tokens is billed at the cached input rate.
Playback reports
When you speak replies with your own text-to-speech, only your client knows what the caller has heard. These three client events tell the server. They have no OpenAI equivalent, and are namespacedpoly. the way field extensions are namespaced poly_. On a session the server speaks, it tracks playback itself and ignores them.
response_id from response.created through every report about that reply. Send a delta every 250 ms or so. The server builds what the caller has heard from those increments, so on a barge-in it knows where to cut the reply before stopped arrives. After stopped, the reply is kept in history as spoken_text, ending in a dash if dropped_ms says it was cut off.
The reports also set how long the barge-in check runs: Dialog-RSN-1 confirms an interruption for as long as the reply is audible, so a backchannel two seconds into a reply gets checked like any other interruption.
Reports are optional. A client that sends none gets an estimate instead. The server treats a reply as audible for as long as it takes to say at 15 characters a second, and after a barge-in keeps the words it estimates were heard. If your text-to-speech runs slower or starts late, sound after the estimate ends is taken as an interruption without that check. The first report you send replaces the estimate for the rest of the session.
PolyAI extensions
Extensions are additive fields on existing events, all prefixedpoly_. The only new events are the client-sent playback reports, and the server sends no new event types.
Open the conversation
Setpoly_first_assistant_message on the session to have the assistant open the call with fixed words, like Vapi’s firstMessage. Nothing is generated, so a greeting, a recording disclosure or an outbound opener is said exactly as written, with no wait for the model:
session.updated, as an ordinary response: response.created, the output item with its audio transcript or text events, and response.done, with zero token usage. On an audio session the server speaks it in the session’s voice and language, a caller who barges in cuts it off, and history keeps what they heard. On a text session you get the text to speak. It becomes the first assistant turn, so the model carries on from it. It’s said even if the caller has already started talking.
Don’t send response.create to start it. OpenAI clients often send one straight after session.update to have the assistant speak first. Here that request is answered as soon as the opener ends, so the model adds a second assistant turn of its own right after it.
It’s said once. If you send the same value again, for example when you resend your whole session, it’s accepted and does nothing. History you seed with conversation.item.create comes before it, so seed first and set it last. A different value once the conversation has a turn of its own or a response has started is refused with invalid_request_error, as is blank text. A transcription session refuses it with unsupported_parameter, like every field that shapes a reply. null clears it.
An assistant message you add with conversation.item.create is history only and is never spoken, so seeding earlier turns doesn’t read them aloud.
Events
Every event is a JSON text frame with atype and an event_id. Fields follow the OpenAI Realtime reference, and this page lists only what’s specific to Dialog-RSN-1.
Client to server
The server accepts the eleven standard client events and the three playback reports. Any othertype is refused with unsupported_event_type.
Server to client
Not sent:
rate_limits.updated, conversation.created, MCP events. Token usage arrives on response.done as response.usage.
Errors
Almost every failure answers with anerror event and keeps the connection open. The exceptions close the socket with one of the close codes below.
code, never on message. error.event_id names the client frame the error is about, where there is one. type is invalid_request_error for something you sent and server_error for something that failed on our side. A server_error that ends a response also arrives on response.done with status failed. There, status_details.error carries the code in both code and type, for example generation_failed.
Close codes
Handling a refused handshake and a timed-out session:
Differences from OpenAI Realtime
The protocol is OpenAI Realtime, and these are the places a client written for OpenAI sees something different.- Turn timing comes from the model. Dialog-RSN-1 decides when the caller has finished, and you shape it in
instructions. Onlycreate_responseis read fromturn_detection. The timing fields and"type": "semantic_vad"are accepted and ignored, andidle_timeout_msandinterrupt_response: falseare refused withunsupported_parameter. See Turn-taking and barge-in. - Truncating a text reply leaves history unchanged. On a reply you voice yourself,
conversation.item.truncatevalidates the item and answers, but leaves history as it was, because only your text-to-speech knows which word a millisecond offset falls on. On a reply the server spoke, it cuts history as OpenAI does. Send playback reports to set history to the words heard. - Without playback reports, a text session estimates playback. The barge-in check and the history kept after a barge-in follow an estimate of how long the reply takes to say. Playback reports replace it with your real playback.
- Voices are Cartesia voices.
audio.output.voicetakes a Cartesia voice id. An OpenAI voice name is accepted, and the deployment’s default voice speaks instead. - Function tools only. An MCP tool is refused with
unsupported_parameter, and the model makes one call per turn, soparallel_tool_callschanges nothing. - One response at a time, always in the conversation. A
response.createwhile a response is open is refused withconversation_already_has_active_response, and out-of-band responses (conversation: "none") are refused. A confirmed barge-in cancels the open response. - Transcription usage on a realtime session is a duration.
conversation.item.input_audio_transcription.completedreports the audio’s duration, and the response’s tokens arrive onresponse.usage. A transcription session reports tokens. - History is bounded. From the tenth caller audio turn, older turns release their audio and keep their transcript. When older history is summarized or dropped to fit the context window, the first
response.doneafter that lists the items the prompt now leaves out inpoly_compacted_item_ids. The items stay in history. A conversation that still outgrows the window fails that response withcontext_length_exceeded, and the connection stays open. - No session resumption. A dropped connection has no handle to resume with. Reconnect and resend whatever context the new session needs.
- Smaller wire details. Text and function-argument deltas can carry several tokens each, with the same concatenation. Transcription deltas are true increments.
previous_item_idis set onconversation.item.*events and left offresponse.output_item.*.speech_started.audio_start_mscounts the audio the server has received, which can differ from wall-clock time.session.createdandresponse.createdomit optional fields that are not in effect (usage,max_output_tokens,metadataand others).
Example flows
Three conversations, event by event. Flows 1 and 2 use the default spoken replies. Flow 3 is a text session.1. A typed question, answered on request
The session setscreate_response: false, so nothing answers until you ask.
- Client → server:
conversation.item.create, a user message: “What’s the capital of France?” - Server → client:
conversation.item.added, thenconversation.item.done - Client → server:
response.create - Server → client:
response.created,response.output_item.added,response.content_part.added, thenresponse.output_audio_transcript.deltaandresponse.output_audio.deltaframes, thenresponse.output_audio.done,response.output_audio_transcript.done,response.content_part.done,response.output_item.doneandresponse.done
Dialog-RSN-1: “The capital of France is Paris.”
2. A tool call
- Client → server:
session.updatewithtools: [get_time, get_weather] - The caller asks “What time is it right now?”, and the server starts a response.
- Server → client:
response.function_call_arguments.done:get_time({})withcall_idcall_000a14b52c2c4c9dae5a307369fad224, thenresponse.done. If the tool looks slow, the model may say a short line in the same response. - Client → server:
conversation.item.create(function_call_outputwith the samecall_idand the result{"time": "11:04 AM", "timezone": "CDT"}), thenresponse.create - Server → client: the spoken reply’s transcript and audio deltas, then
response.done
Dialog-RSN-1: “It’s 11:04 AM.”
3. Canceling a reply
On a session withoutput_modalities: ["text"]:
- Client → server:
response.create - Server → client:
response.created, then a fewresponse.output_text.deltaframes - Client → server:
response.cancel - Server → client:
response.donewith statuscancelled. Any open output item closes asincomplete.

