LiveKit docs › Partner spotlight › xAI › Overview

---

# xAI and LiveKit

> Build world-class realtime AI apps with Grok API and LiveKit Agents.

- **[Grok Voice Agent API playground](https://grok.livekit.io/)**: Play with the Grok Voice Agent API in this LiveKit-powered playground

## xAI ecosystem support

[xAI](https://console.x.ai/) provides some of the most powerful AI models and services today, which integrate into LiveKit Agents in the following ways:

- **Grok Models**: A family of state-of-the-art, high-performance LLMs.
- **Grok Voice Agent API**: A speech-to-speech realtime model, API compatible with OpenAI's Realtime API.
- **Grok Text to Speech API**: A text-to-speech model delivering natural, expressive voices
- **Grok Speech to Text API**: A speech-to-text model enabling low-latency, accurate transcriptions

## Getting started

Use the Voice AI quickstart to build a voice AI app with Grok.

- **[Voice AI quickstart](https://docs.livekit.io/agents/start/voice-ai.md)**: Build your first voice AI app with Grok Voice Agent API.

Install the xAI plugin:

```shell
uv add "livekit-agents[xai]~=1.5"

```

Add your xAI API key to your `.env` file:

** Filename: `.env`**

```shell
XAI_API_KEY=<your-xai-api-key>

```

Use `xai.realtime.RealtimeModel` as the LLM component to initialize your `AgentSession`:

** Filename: `agent.py`**

```python
from livekit.plugins import xai

# ...

# in your entrypoint function
session = AgentSession(
    llm=xai.realtime.RealtimeModel(
        voice="Ara",
    ),
)

```

## LiveKit Agents overview

LiveKit Agents is an open source framework for building realtime AI apps in Python and Node.js. It supports complex voice AI [workflows](https://docs.livekit.io/agents/logic/workflows.md) with multiple agents and discrete processing steps, and includes built-in load balancing.

LiveKit provides SIP support for [telephony integration](https://docs.livekit.io/agents/start/telephony.md) and full-featured [frontend SDKs](https://docs.livekit.io/agents/start/frontend.md) in multiple languages. It uses [WebRTC](https://docs.livekit.io/intro.md#what-is-webrtc) transport for end-user devices, enabling high-quality, low-latency realtime experiences. To learn more, see [LiveKit Agents](https://docs.livekit.io/agents.md).

## Additional resources

The following links provide more information on each available xAI component in LiveKit Agents.

- **[Grok Voice Agent API](https://docs.livekit.io/agents/models/realtime/plugins/xai.md)**: LiveKit Agents plugin for Grok Voice Agent API.

- **[Grok LLM](https://docs.livekit.io/agents/models/llm/xai.md)**: LiveKit Agents plugin for Grok models.

- **[Grok TTS](https://docs.livekit.io/agents/models/tts/xai.md)**: LiveKit Agents plugin for Grok Text to Speech API.

- **[Grok STT](https://docs.livekit.io/agents/models/stt/xai.md)**: LiveKit Agents plugin for Grok Speech to Text API.

---

This document was rendered at 2026-06-07T11:34:26.914Z.
For the latest version of this document, see [https://docs.livekit.io/agents/integrations/xai.md](https://docs.livekit.io/agents/integrations/xai.md).

To explore all LiveKit documentation, see [llms.txt](https://docs.livekit.io/llms.txt).