> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroruntime.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Xai

> Python API reference for the xai text-to-speech provider.

## XAITTS

Initialize the xAI TTS plugin.

Slot: tts. Route: plugins -- direct to the vendor, with XAI\_API\_KEY or an
explicit api\_key.

```python theme={null}
from zeroruntime.plugins import XAITTS  # direct to the vendor, with your key
```

### Fields

<ParamField path="voice" type="str" default="eve" />

<ParamField path="language" type="str" default="en" />

<ParamField path="codec" type="Literal['pcm', 'mulaw']" default="pcm" />

<ParamField path="sample_rate" type="int" default="24000" />

<ParamField path="optimize_streaming_latency" type="int" default="0" />

<ParamField path="text_normalization" type="bool" default="False" />

<ParamField path="base_url" type="str" default="wss://api.x.ai/v1/tts" />

<ParamField path="max_connection_age_sec" type="float" default="300.0" />
