Beta OpenAI Live API
wss://realtime.acedata.cloud/v1/live/sessions
wss://realtime.acedata.cloud/aichat2/live
Full-duplex GPT-Live voice sessions with live captions and backend delegation, billed by active duration.
Request Headers
authorizationstring
Bearer token
Request Body
The first WebSocket JSON message sent after the connection is successfully established. The GET handshake itself has no HTTP request body. Audio can only be sent after receiving `session.started`.
typestringRequired parameter
The first WebSocket message type is fixed as `session.start`.
sessionobjectRequired parameter
Session configuration; use default values for fixed parameters that are not filled in.
audioobject
Session audio format and output voice tone.
formatobject
rateintegerRequired parameter
Sample rate, fixed at 24000 Hz.
typestringRequired parameter
24 kHz mono, 16-bit little-endian PCM raw audio, without a WAV file header.
outputobject
voicestring
Output voice selected when starting the conversation, default marin.
modelstring
Voice conversation model, fixed as gpt-live-1.
storeboolean
Recording storage is currently not supported and is fixed to false.
delegationobject
typestringRequired parameter
Background tasks are handled by your application, and model or tool calls are billed separately.
instructionsstring
Behavior and response requirements for the voice assistant.
event_idstring
Optional client event identifier; parameter errors return this value via error.client_event_id.
Pushed events
error
typestring
errorobject
typestring
paramstring
messagestring
client_event_idstring
session.closed
typestring
usageobject
secondsnumber
Cumulative active seconds; continuously receiving 12 and 15 indicates a total of 15 seconds.
reasonstring
session.started
typestring
sessionobject
idstring
modelstring
session.usage.updated
typestring
usageobject
secondsnumber
Cumulative active seconds; continuously receiving 12 and 15 indicates a total of 15 seconds.
session.delegation.created
typestring
delegation_idstring
Background task identifier; include this value when returning the result.
session.output_audio.delta
typestring
deltastring
Base64-encoded PCM16 audio, decode and play in order.
session.input_transcript.delta
typestring
deltastring
Add subtitle text this time.
end_msnumber
Subtitle end time, in milliseconds.
start_msnumber
Subtitle start time, in milliseconds.
session.output_transcript.delta
typestring
deltastring
Subtitle text added this time.
end_msnumber
Subtitle end time, in milliseconds.
start_msnumber
Subtitle start time, in milliseconds.
Response

Integration guide
Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.
OpenAI generation
Allow Use General Balance
When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.

