infery
← All models

Grok Voice

grok-voice-realtime

Text to Speechby xAI

Build real-time voice applications powered by Grok. Stream audio and text bidirectionally via WebSocket for voice assistants, phone agents, and interactive voice systems.

Details

Accepts
text

Pricing

Price
0.104 cr / second

Prices in credits (1 credit = $0.01).

Data schema

Input

FieldTypeDescription
typerequiredstringxAI realtime event type (e.g. 'session.update', 'input_audio_buffer.append', 'response.create', 'response.output_audio.delta'). Events are relayed verbatim in both directions.
toolsServer-side tools available to the agent. Web, X, and remote MCP tools are supported; every tool is disabled by default. An explicitly supplied object always reaches the session, so previously enabled tools can be cleared.
voiceBuilt-in xAI voice for the agent's speech. Uses Grok's default voice when omitted.
promptSystem instructions describing the agent's persona and conversation context. Uses Grok's default persona when omitted.
turn_detectionAutomatic turn detection: any configured object (even empty) lets the agent detect when you stop speaking and reply on its own. Set null for manual turns; omit to keep the session default.

Output

FieldTypeDescription
typestringxAI realtime event type (e.g. 'session.update', 'input_audio_buffer.append', 'response.create', 'response.output_audio.delta'). Events are relayed verbatim in both directions.
toolsServer-side tools available to the agent. Web, X, and remote MCP tools are supported; every tool is disabled by default. An explicitly supplied object always reaches the session, so previously enabled tools can be cleared.
voiceBuilt-in xAI voice for the agent's speech. Uses Grok's default voice when omitted.
promptSystem instructions describing the agent's persona and conversation context. Uses Grok's default persona when omitted.
turn_detectionAutomatic turn detection: any configured object (even empty) lets the agent detect when you stop speaking and reply on its own. Set null for manual turns; omit to keep the session default.