All Products
Search
Document Center

Alibaba Cloud Model Studio:Realtime API overview

Last Updated:Nov 27, 2026

Explore supported Realtime API models, access methods, authentication, and existing tutorials and demos.

The Realtime API supports real-time multimodal interaction, speech recognition, speech synthesis, voice conversation, and audio and video translation. Find the access methods supported by your model, then choose one for your application and open the corresponding access documentation.

Model and protocol support

The following table lists the protocols supported by each model and application. Click "Supported" to open the corresponding access documentation.

Model/application typeModelWebSocketWebRTCAOQ

Real-time multimodal

qwen3.8-omni-flash-realtime、qwen3.5-omni-plus-realtime、qwen3.5-omni-flash-realtime

Supported

Supported

Supported

Real-time speech synthesis

qwen-audio-3.1-tts-plus、qwen-audio-3.1-tts-flash、qwen-audio-3.0-tts-flash、qwen-audio-3.0-tts-plus

Supported

Unsupported

Supported

CosyVoice series models

Supported

Unsupported

Supported

Real-time speech recognition

qwen-audio-3.1-asr-flash-message, qwen-audio-3.1-asr-flash-streaming, qwen-audio-3.0-asr-flash-streaming, Fun-ASR-Realtime series models

Qwen-Audio-ASR-Message

Qwen-Audio-ASR-Streaming

Fun-ASR-Realtime

Unsupported

Qwen-Audio-ASR-Message

Qwen-Audio-ASR-Streaming

Fun-ASR-Realtime

Real-time voice conversation

qwen-audio-3.1-realtime-plus、qwen-audio-3.1-realtime-flash、qwen-audio-3.0-realtime-plus、qwen-audio-3.0-realtime-flash

Supported

Supported

Supported

Qwen-Audio-Live

qwen-audio-3.1-live

Supported

Supported

Supported

Real-time speech translation

Qwen-Livetranslate-Realtime series models

Supported

Supported

Supported

NoteFor information such as model names, context windows, prices, and snapshot versions, see the Alibaba Cloud Model Studio console. For rate limits, see Rate limiting.

WebSocket SDKs by model

ModelLanguages and platforms
Qwen-Omni-RealtimePython · Java · C#
Qwen-Audio-ASR-StreamingPython · Java · Node.js · C# · Android · iOS · HarmonyOS · Flutter
Qwen-Audio-ASR-MessagePython · Java · Node.js · C# · Android · iOS · HarmonyOS · Flutter
Fun-ASR-RealtimePython · Java · C# · Android · iOS · HarmonyOS · Flutter
Qwen-ASR-RealtimePython · Java
ParaformerPython · Java · C# · HarmonyOS · Flutter
Qwen-Audio-TTSPython · Java · Node.js · C# · Android · iOS · HarmonyOS · Flutter
CosyVoicePython · Java · C# · Android · iOS · HarmonyOS · Flutter
Qwen-TTS-RealtimePython · Java
Qwen-Audio-RealtimeNode.js · C# · Android · iOS · HarmonyOS · Flutter
Qwen-LiveTranslate-RealtimePython · Java · C# · Flutter

C# reference SDK overview · Methods and events

Choose an access method

The Realtime API supports WebSocket, WebRTC, and AOQ (AI over QUIC). Available access methods and input and output capabilities depend on the selected model. Refer to its access documentation.

DimensionWebSocketWebRTCAOQ

Use cases

Real-time voice and multimodal interaction, server-side integration, rapid prototyping

Real-time browser audio and video interaction, applications with existing WebRTC infrastructure

Native applications that need weak-network optimization and coordinated transmission of audio, video, and model events

Browser compatibility

Natively supported; the API authentication requirements still apply

Natively supported

The current AOQ SDK does not provide browser access

Echo cancellation and noise suppression

Provided by the audio capture and processing components used by the client

Provided by the browser or WebRTC client, depending on the platform and configuration

Depends on the AOQ SDK audio configuration for the selected platform

Client platform support

All platforms (any environment that supports WebSocket)

Browsers, mobile clients

Mobile, desktop, and Linux. For details, see AOQ SDK downloads.

Token Plan

Supported

Supported

Supported

  • WebSocket: Suitable for real-time voice and multimodal interaction, server-side integration, and prototype validation. The DashScope SDK enables quick implementation of real-time voice conversations.
  • WebRTC: Suitable for real-time audio and video interaction that requires native browser support or an existing WebRTC infrastructure.
  • AOQ: AOQ is based on QUIC and optimized for real-time interaction on weak networks. It supports separate-track transmission of audio/video and model events, and is suitable for native applications that need to integrate media capture, encoding/decoding, and playback capabilities.

Preparation

Confirm the regions and endpoints for calls, and obtain the API Key for the corresponding region and workspace.

NoteFor first-time use, activate the service as prompted by the console. After creation, immediately copy and securely store the API Key, manage it through environment variables, and do not embed it in clients or commit it to code repositories.

When using AOQ, download the AOQ SDK based on your client platform.

Authentication Method

The Realtime API uses an API Key for identity authentication. Whether you connect via the AOQ, WebRTC, or WebSocket protocol, authentication is completed through the Authorization field in the HTTP request header carrying a Bearer Token.

WebRTC and WebSocket authenticate at connection establishment; AOQ uses the API Key for authentication when the AppServer requests a connection credential, and the client then establishes the connection with a temporary token. Data transmission after the connection is established does not require repeated authentication.

Connection Authentication Details

WebSocket

WebSocket carries the API Key in the HTTP request header for authentication when establishing the connection. For specific requirements, see the access documentation of the corresponding model.

WebRTC

Qwen-Audio-Live submits the Offer SDP over a control WebSocket and authenticates when the WebSocket connection is established. See Qwen-Audio-Live WebRTC access.

The following models exchange SDP via HTTP POST and authenticate at this stage. The client sends an Offer SDP, and the server returns an Answer SDP.

AOQ

AOQ adopts a server-side proxy authentication mode: the API Key is used only on the business AppServer side, and the client establishes the connection with a temporary token returned by the gateway, preventing the API Key from being exposed on the client.

Obtain the connection credential

When the business requires a media connection, the AppServer requests a connection credential and returns it to the client, which then calls connect(config) to establish the connection.

To obtain the credential in advance, the AppServer can set tokenExpiresInSecs in the request body. The client must complete the connection within the specified validity period; after expiration, the credential must be obtained again. If not set, the connection should be established immediately after the credential is obtained. This parameter does not limit the session duration after the connection is established.

AOQ 即时鉴权与媒体建连时序

Request path

SeriesConnection request path
Qwen-Omni-Realtime、Qwen-Audio-Realtime、Qwen-Livetranslate-Realtime/api/v1/webrtc/realtime
Qwen-Audio-TTS、CosyVoice、Qwen-Audio-ASR-Streaming、Qwen-Audio-ASR-Message、Fun-ASR-Realtime/api/v1/webrtc/inference

Request description

ParameterPosition and typeDescription

{endpoint}

URL · string

Required. Use the endpoint of the selected region and workspace. When using Token Plan, the WorkspaceId in the domain is fixed to token-plan.

model

Query parameter · string

Required. The model ID to call. Select the connection path according to the Series in the table above.

Authorization

Request header · string

Required. The format is Bearer <API_KEY>. Use the API Key that corresponds to the access domain.

Content-Type

Request header · string

Required. Fixed to application/json.

x-dashscope-rtc-transport

Request header · string

Required. Native AOQ SDKs use moq; Web SDKs connected through the browser WebTransport use webtransport.

clientIp

Request body · string

Optional. The client's real public IP address, used to select the Relay access point; if not specified, the request source IP is used.

tokenExpiresInSecs

Request body · integer

Optional. The validity period of the connection Token, in seconds, an integer from 1 to 1800. Set it only when you need to obtain the credential in advance. A wrong type or an out-of-range value causes the request to fail.

On the AppServer, send the request using the corresponding {endpoint} and the environment variable DASHSCOPE_API_KEY. The following example uses qwen3.8-omni-flash-realtime; when calling a model on the Inference path, change the path to /api/v1/webrtc/inference and set the corresponding model.

curl -X POST \
  "https://{endpoint}/api/v1/webrtc/realtime?model=qwen3.8-omni-flash-realtime" \
  -H "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
  -H "Content-Type: application/json" \
  -H "x-dashscope-rtc-transport: moq" \
  -d '{}'
curl -X POST \
  "https://{endpoint}/api/v1/webrtc/realtime?model=qwen3.8-omni-flash-realtime" \
  -H "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
  -H "Content-Type: application/json" \
  -H "x-dashscope-rtc-transport: moq" \
  -d '{"tokenExpiresInSecs": 600}'
curl -X POST \
  "https://{endpoint}/api/v1/webrtc/realtime?model=qwen3.8-omni-flash-realtime" \
  -H "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
  -H "Content-Type: application/json" \
  -H "x-dashscope-rtc-transport: webtransport" \
  -d '{}'
curl -X POST \
  "https://{endpoint}/api/v1/webrtc/realtime?model=qwen3.8-omni-flash-realtime" \
  -H "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
  -H "Content-Type: application/json" \
  -H "x-dashscope-rtc-transport: webtransport" \
  -d '{"tokenExpiresInSecs": 600}'

Response description

FieldTypeDescription and SDK mapping

sid

string

The unique session identifier. For native SDKs, fill it into AoqConnectConfig.sid; for the Web SDK, use this identifier to configure the connection.

aoqTokenForClient

string

The temporary Token used by the client to establish the connection. For native SDKs, fill it into AoqConnectConfig.token; the Web SDK uses this Token to establish the connection.

clientRelayEndpoints

array

The array of Relay access points, each containing endpoint, port, and route_index. For native SDKs, fill the access points into relayEndpoints and map route_index to routeIndex; if route_index is not returned, use the array index. Each access point of the Web SDK also contains certHashes.

clientRelayEndpoints[].certHashes

array<string>

Returned only for Web SDK requests. A list of SHA-256 fingerprints of the WebTransport server certificate for this access point; each fingerprint is a 64-character lowercase hexadecimal string.

clientRelayCertFingerprint

string

Returned only for native SDK requests. Fill the Relay TLS certificate fingerprint into AoqConnectConfig.certFingerprint. The Web SDK uses the certHashes in each access point.

sidExpiresInSecs

integer

The validity period (in seconds) of the temporary connection Token. Returned only when the request sets tokenExpiresInSecs, with the same value as in the request; not returned if it is not set.

extraInfo.workspaceIdHash

string

The hash of the Workspace ID. For native SDKs, fill it into AoqConnectConfig.workspaceIdHash; the Web SDK uses it as described in its access instructions.

The access points, ports, and certificate fingerprints in the following response are example values; use the values actually returned by the API.

{
  "sid": "<session_id>",
  "aoqTokenForClient": "<token>",
  "clientRelayEndpoints": [
    {"endpoint": "192.0.2.1", "port": 8443, "route_index": 0}
  ],
  "clientRelayCertFingerprint": "sha256/<fingerprint>",
  "extraInfo": {"workspaceIdHash": "<workspace_id_hash>"}
}
{
  "sid": "<session_id>",
  "aoqTokenForClient": "<token>",
  "clientRelayEndpoints": [
    {"endpoint": "192.0.2.1", "port": 8443, "route_index": 0}
  ],
  "clientRelayCertFingerprint": "sha256/<fingerprint>",
  "sidExpiresInSecs": 600,
  "extraInfo": {"workspaceIdHash": "<workspace_id_hash>"}
}
{
  "sid": "<session_id>",
  "aoqTokenForClient": "<token>",
  "clientRelayEndpoints": [
    {
      "endpoint": "192.0.2.1",
      "port": 4443,
      "route_index": 0,
      "certHashes": [
        "7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069"
      ]
    }
  ],
  "sidExpiresInSecs": 600,
  "extraInfo": {
    "workspaceIdHash": "<workspace_id_hash>"
  }
}

When a Web SDK request does not set tokenExpiresInSecs, sidExpiresInSecs is not returned either, and the structure of the other fields remains unchanged.

Developer resources

WebRTC Tutorials

AOQ Tutorials and Demos

Use the Android Demo to verify AOQ integration results. Scan the QR code to download the APK, configure the API Key and workspaceId after installation, and then you can try some of the models supported by the Demo.

AOQ Android Demo 下载二维码