Qwen Audio 3.1 Realtime Flash

WEBSOCKET /v1/realtimeDuplex speech conversation over one socket, with 88 voices, native web search that works alongside tool calling, and separate text and audio token rates.
At a glance
Pricing
Example request
Parameters
Notes
Connecting
Full-duplex voice over a WebSocket at wss://api.empiriolabs.ai/v1/realtime?model=qwen-audio-3-1-realtime-flash, authenticated with the ordinary Authorization Bearer header. Configure the session with session.update over the socket: voice, instructions, modalities, turn detection, languages and delivery.
Sending audio
- Append microphone audio as
input_audio_buffer.appendevents. - Voice activity detection decides when you have stopped speaking, so keep streaming for about a second after the speech ends.
Language and delivery
Set input_language to the language you speak, which the transcript of your speech is written in, and output_language to the language the spoken reply is read in. Each takes auto or one of zh, en, ja, ko, vi, th, id, ar, fr, de, es, pt, ru and it. The output language does not translate the reply, so ask for its language in your instructions too. speed (0.5 to 2) sets the speaking rate, enable_speech_emotion the expressive delivery, and max_history_turns (1 to 50) how many earlier exchanges the model reads.
Voices
The voices on this model are its own set. Pick one from the voice list rather than carrying a voice across from another model, or leave it unset and the default is supplied for you.
Web search
Web search is off by default. Turn it on with enable_search. It works in the same session as function calling, and search results are added to the conversation and count as input tokens.
Billing
Audio and text tokens are priced separately in both directions. A spoken reply is billed for its audio output tokens only, and the text output rate applies to replies with no audio. Each completed turn is billed on its own from the usage the model reports.
Machine-readable schema: GET https://api.empiriolabs.ai/v1/models/qwen-audio-3-1-realtime-flash.
