实时语音(Realtime)
curl --request GET \
--url wss://api.gravitex.ai/v1/realtime安全与音频
实时语音(Realtime)
WebSocket 实时音频对话
GET
/
v1
/
realtime
实时语音(Realtime)
curl --request GET \
--url wss://api.gravitex.ai/v1/realtimeDocumentation Index
Fetch the complete documentation index at: https://docs.gravitex.ai/llms.txt
Use this file to discover all available pages before exploring further.
简介
通过 WebSocket 建立实时语音对话会话,兼容 OpenAI Realtime API。需使用 WebSocket 协议连接,而非普通 HTTP POST。认证
在建立 WebSocket 连接时携带 Bearer Token(具体方式以 OpenAI Realtime 规范为准,通常为连接头或首条鉴权消息)。连接示例
wss://api.gravitex.ai/v1/realtime?model=gpt-4o-realtime-preview
实时模型,如
gpt-4o-realtime-preview常用说明
- 协议升级响应:101 Switching Protocols 表示连接成功
- 连接后按 Realtime 事件协议发送/接收音频与文本
- 适用于低延迟语音助手、实时翻译等场景
⌘I