Usage guide
Setup, environment variables, and Python/JavaScript/Go usage examples.
XAIRealtime
Speech-to-speech conversation with xAI’s Grok voice models, using your own xAI API key. Choose it when you want one model to listen, reason and speak with minimal latency. Authenticates with XAI_API_KEY from your environment, or an explicitapi_key.
Fields
Grok voice model name, e.g. “grok-voice-think-fast-2.0”. Defaults to ‘grok-voice-think-fast-2.0’.
Session settings such as voice, instructions and reasoning effort (“none” or “high”), passed as a dict. Defaults to None (not set).