Blog

Qwen3.8 Omni Flash Realtime API: Cheap Voice-to-Voice With Tools (2026)

Unicorn API Team · · 8 min read

A microphone waveform flowing over a WebSocket into a realtime voice model that calls a tool and answers through a speaker

Real-time voice is the most expensive thing most AI products do. A text chatbot that answers a question costs a fraction of a cent; a voice agent that listens and talks back for ten minutes can cost more than the rest of the session combined, because every second of audio in and out is billed as tokens, and audio tokens are priced far above text. That is why the release of Qwen3.8 Omni Flash Realtime, Alibaba's speech-to-speech model with function calling, matters to anyone building voice agents: on audio, it is several times cheaper than the realtime models most developers reach for first, and it still calls your tools in the middle of a conversation.

This guide explains what the model is, what it can do, how its price compares with Gemini Live and the OpenAI Realtime API, and how to connect to it with a few lines of code. Every number below comes from the providers' own documentation or from a live call we ran against the API, and we say which is which.

What is Qwen3.8 Omni Flash Realtime?

Qwen3.8 Omni Flash Realtime is a speech-to-speech model from Alibaba's Qwen team. You stream it audio over a WebSocket and it streams back spoken audio plus a text transcript, with no separate speech recognition, language model and text-to-speech stages glued together. Alibaba's model page dates it October 11, 2026. It belongs to the Qwen Omni family, which also includes the non-realtime Qwen3.8 Omni Flash (text output) and the earlier Qwen3.5 Omni Realtime models.

The model is natively multimodal. According to Alibaba's documentation, it accepts:

  • Streaming audio as 16 kHz, 16-bit, mono PCM.
  • Text, for instructions and typed turns.
  • Video as consecutive image frames (JPEG, each frame at most 256 KB after Base64 encoding, up to 1080p), so an agent can look at a camera feed or a shared screen while it talks.

It answers with text and audio (24 kHz PCM). It is a closed, API-only model: Alibaba has published open weights for the earlier Qwen3-Omni 30B-A3B models under Apache 2.0, but not for Qwen3.8 Omni Flash Realtime.

Qwen3.8 Omni Flash Realtime specs at a glance

SpecValue
MakerAlibaba (Qwen team)
Model id on Unicorn APIqwen3-8-omni-flash-realtime (Alibaba's id qwen3.8-omni-flash-realtime also works)
InputStreaming audio, text, video frames
OutputAudio and text
Context window196,608 input tokens; 65,536 output tokens
Conversation memoryUp to 100 audio turns and 600 seconds of audio in history
LanguagesSpeech recognition in 113 languages and dialects; speech output in 36 (Alibaba's documentation)
Voices30+ preset voices, including Chinese dialect voices; default voice "Tina"
Turn detectionServer VAD, semantic VAD, or manual turns
ToolsCustom function calling (tested below); Alibaba also documents remote MCP tools
WeightsClosed, API only

How much cheaper is it than Gemini Live and OpenAI Realtime?

Realtime voice models bill audio in tokens, but every provider turns a second of speech into a different number of tokens. Comparing price per million tokens alone is misleading, so the table below shows both the list price per million audio tokens and the cost per minute of audio.

For Gemini and OpenAI, the per-minute figures come from their own documentation: Google publishes per-minute prices next to its token prices and counts 32 tokens per second of audio; OpenAI counts one input audio token per 100 ms and one output audio token per 50 ms. Alibaba does not publish a token rate for this model, so we measured it with a live call: a 7.6-second spoken question counted as 56 input audio tokens (about 7.4 per second), and an 11.1-second spoken answer counted as 139 output audio tokens (12.5 per second).

ModelAudio in, per 1M tokensAudio out, per 1M tokensListening, per minuteSpeaking, per minute
Qwen3.8 Omni Flash Realtime on Unicorn API (plan credits)$1.86$3.74about $0.0008about $0.0028
Same model on Unicorn API (top-up credits)$2.79$5.61about $0.0012about $0.0042
Gemini 3.8 Live (Google, paid tier)$3.00$12.00$0.005$0.018
OpenAI gpt-realtime-mini$10.00$20.00$0.006$0.024
OpenAI gpt-realtime-2.1$32.00$64.00$0.019$0.077
xAI Grok Voice 3.0billed per minute, not per token$0.08 per minute of conversation

Read per minute, Qwen3.8 Omni Flash Realtime on Unicorn API costs roughly a sixth of Gemini 3.8 Live for both listening and speaking on plan credits, and about a quarter at the higher top-up rate. Against OpenAI's realtime models the gap is wider still. Qwen's per-minute figures rest on our own measurement and will move a little with speaking speed and silence, but the order of magnitude does not.

Two honest caveats. First, audio is not the whole bill on any realtime API: each reply also re-reads the session's instructions, tool definitions and the conversation so far as text input. On Unicorn API that text costs 46 credits per million tokens ($0.46 on a plan), and in our test it came to about 1,100 tokens per reply, or about 0.05 credits. Gemini and OpenAI bill that context too, at $0.75 and $0.60 to $4 per million text tokens respectively. Second, Google offers a free tier for Gemini Live, which can be the cheapest option for a prototype that never leaves the free quota.

What a real call costs

Our test call asked, out loud, for the weather in Lisbon and whether an umbrella was needed. The model called a weather tool, read the tool's answer and replied in an 11-second spoken sentence. The whole exchange, two model replies including the tool call, came to about 0.18 credits, or about $0.002. A ten-minute support call with the caller and the agent each speaking for five minutes costs about 1.8 credits in audio on plan credits (around $0.02), plus the text context of each turn.

Where can you use Qwen3.8 Omni Flash Realtime?

Alibaba sells the model directly through Alibaba Cloud Model Studio, which needs an Alibaba Cloud account, a Model Studio workspace and regional endpoints. Outside Alibaba, it is hard to find. When we checked the major model marketplaces and inference hosts at the time of writing, OpenRouter listed only the non-realtime Qwen3.8 Omni Flash with text output and no WebSocket voice endpoint; Novita and SiliconFlow host the older open Qwen3-Omni 30B models without speech output; DeepInfra and fal offer Qwen text-to-speech models rather than the Omni realtime model. We found no other hosted API serving Qwen3.8 Omni Flash Realtime as a live voice-to-voice WebSocket.

On Unicorn API it sits in the same catalog as the image, video, music and chat models, behind the same API key and the same credit balance:

  • One key, one bill. No cloud console, workspace or region setup; credits you already hold for other models pay for voice calls too.
  • Billed per reply. After every spoken reply the socket sends a unicorn.usage event with the credits that reply cost and your remaining balance, so an app can show the running cost of a call.
  • Browser-safe sessions. A server asks for a one-use ticket that is valid for 60 seconds, and the browser opens the WebSocket with it, so your API key never reaches the client.
  • Try it before you code. The Voice page in the Studio runs a live call from your microphone with a running transcript and cost.

The limits to plan around: up to three live calls at a time per account (an app built on an app key gets three per end user, up to 50 per app), a call ends after 60 minutes or 5 idle minutes, and opening a call needs at least 1 credit in the balance.

How function calling works in a voice conversation

Tool support is what turns a talking model into an agent that can look up an order, book a slot or check stock while the caller is still on the line. Qwen3.8 Omni Flash Realtime uses the same event shapes as other realtime APIs, so the flow will look familiar:

  1. You declare your functions in session.update under tools, each with a name, a description and a JSON Schema for its parameters.
  2. The caller speaks. When the model decides it needs a tool, it emits response.function_call_arguments.done with the function name, a call_id and the arguments as a JSON string.
  3. Your code runs the function and sends the result back with conversation.item.create, an item of type function_call_output carrying the same call_id, followed by response.create.
  4. The model speaks its answer using the result.
One voice turn with a tool call: speech in, the model calls a function, the function returns JSON, the model answers out loud
One voice turn with a tool call: the model pauses its answer, your code runs the function, and the reply uses the result.

In our test, the tool call arrived about two seconds after the end of the question, and the first audio of the spoken answer about one second after we returned the tool result. One rule from Alibaba's documentation: custom tools and the built-in web search (enable_search) cannot be used in the same session.

Connect in JavaScript: a voice turn with a tool call

You need an API key from the API keys page. First, ask for a session ticket. The answer includes a ready-to-open WebSocket URL:

curl -X POST https://api.unicornapi.net/v1/realtime/sessions \
  -H "Authorization: Bearer $UNICORN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "qwen3-8-omni-flash-realtime" }'

The script below, for Node.js 22 or later, is the one we used for the measurements in this article. It opens the call, declares a get_weather tool, streams a recorded question as 16 kHz PCM, answers the tool call and logs the spoken reply's transcript and cost:

import fs from "node:fs";

const API = "https://api.unicornapi.net";
const ticket = await fetch(API + "/v1/realtime/sessions", {
  method: "POST",
  headers: { Authorization: "Bearer " + process.env.UNICORN_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({ model: "qwen3-8-omni-flash-realtime" }),
}).then((r) => r.json());

const pcm = fs.readFileSync("question.pcm"); // 16 kHz, 16-bit, mono PCM
const ws = new WebSocket(ticket.url);
const send = (event) => ws.send(JSON.stringify(event));

ws.onmessage = (message) => {
  const e = JSON.parse(message.data);
  switch (e.type) {
    case "session.created":
      send({
        type: "session.update",
        session: {
          modalities: ["text", "audio"],
          voice: "Tina",
          instructions: "You are a concise voice assistant. Use tools when they help.",
          input_audio_format: "pcm",
          output_audio_format: "pcm",
          turn_detection: null, // manual turns for a recorded file; use server_vad for a live microphone
          tools: [{
            type: "function",
            function: {
              name: "get_weather",
              description: "Current weather and rain chance for a city",
              parameters: { type: "object", properties: { city: { type: "string" } }, required: ["city"] },
            },
          }],
        },
      });
      break;
    case "session.updated":
      for (let i = 0; i < pcm.length; i += 3200) {
        send({ type: "input_audio_buffer.append", audio: pcm.subarray(i, i + 3200).toString("base64") });
      }
      send({ type: "input_audio_buffer.commit" });
      send({ type: "response.create" });
      break;
    case "response.function_call_arguments.done": {
      const { city } = JSON.parse(e.arguments);
      const result = { city, temp_c: 19, condition: "light rain from 2 pm", rain_chance: 0.7 }; // call your real API here
      send({ type: "conversation.item.create", item: { type: "function_call_output", call_id: e.call_id, output: JSON.stringify(result) } });
      send({ type: "response.create" });
      break;
    }
    case "response.audio.delta":
      // Base64 24 kHz PCM: play it or write it to a file
      break;
    case "response.audio_transcript.done":
      console.log("Model said:", e.transcript);
      break;
    case "unicorn.usage":
      console.log("This reply cost", e.credits, "credits; balance", e.balance);
      break;
    case "error":
      console.error(e.error);
      break;
  }
};

Our run printed the tool call get_weather {"city": "Lisbon"} and then this spoken answer: "It's 19°C in Lisbon now, with light rain expected from 2 pm and a 70% chance of precipitation. I'd grab an umbrella for this afternoon."

For a live microphone, switch turn_detection to { "type": "server_vad", "threshold": 0.5, "silence_duration_ms": 800 }. The server then decides when the caller has finished speaking (Alibaba's documented range for the silence window is 200 to 6,000 ms), and an input_audio_buffer.speech_started event tells you the caller has started talking again, which is your cue to stop playback so they can interrupt. Alibaba also offers semantic_vad, which judges the end of a turn from meaning as well as silence.

When to choose Qwen3.8 Omni Flash Realtime, and when not to

Choose it when audio minutes dominate your costs: phone and support agents, language tutors, voice companions, in-game characters, kiosks, and any product where calls run for minutes rather than seconds. Its tool calling covers the usual agent work, and video-frame input lets the same session see what the user is showing it.

Look elsewhere in three cases. If you need a specific voice or a cloned brand voice, a dedicated text-to-speech model in a classic speech-recognition, language-model, text-to-speech pipeline gives more control at the cost of latency. If your app must stay on one cloud for compliance, use that cloud's own realtime model. And if you are prototyping inside Google's free tier, Gemini Live costs nothing until you outgrow it.

Quality is the part numbers cannot settle for you. The quickest way to judge it is to talk to it: open the Voice page, ask it something your users would ask, and interrupt it halfway through an answer.

The bottom line

Qwen3.8 Omni Flash Realtime brings full-duplex voice with function calling, video-frame input and a 196K-token context to a price point that changes what is affordable: per minute of audio, it runs at roughly a sixth of Gemini 3.8 Live on Unicorn API plan credits and a small fraction of OpenAI's realtime models. Few hosted APIs outside Alibaba offer it at all. On Unicorn API it is one WebSocket away, billed per reply from the same balance as every other model, with plan and top-up prices on the pricing page and the full event reference in the docs.

Frequently asked questions

Does Qwen3.8 Omni Flash Realtime support function calling?

Yes. You declare tools in session.update; the model emits response.function_call_arguments.done with the function name, a call_id and JSON arguments, and you return the result as a function_call_output item before asking for the next response. We tested this end to end on Unicorn API. Custom tools cannot be combined with the built-in web search in one session.

How much does Qwen3.8 Omni Flash Realtime cost per minute?

On Unicorn API, audio costs 186 credits per million input tokens and 374 per million output tokens ($1.86 and $3.74 on plan credits). In our measurement a minute of listening used about 444 audio tokens and a minute of speaking about 750, so roughly $0.0008 and $0.0028 per minute, plus the text context each reply re-reads.

Is Qwen3.8 Omni Flash Realtime cheaper than Gemini Live?

Per minute of audio, yes, by a wide margin. Google lists Gemini 3.8 Live at $0.005 per minute of audio in and $0.018 per minute out; Qwen3.8 Omni Flash Realtime on Unicorn API came to about a sixth of that on plan credits and about a quarter on top-up credits. Gemini Live has a free tier, which can still be cheaper for small prototypes.

Is Qwen3.8 Omni Flash Realtime open source?

No. It is a closed, API-only model. Alibaba published open weights for the earlier Qwen3-Omni 30B-A3B models under Apache 2.0, but those are older models and the open hosts we checked serve them without speech output.

Where can I use Qwen3.8 Omni Flash Realtime besides Alibaba Cloud?

At the time of writing we found no other hosted API serving it as a live voice WebSocket; OpenRouter lists only the non-realtime text-output version. On Unicorn API it works with the same key and credits as every other model, and you can try it in the browser on the Studio Voice page.