> ## 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

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

## XAISTT

Initialize the xAI STT plugin.

```ts theme={null}
import { XAISTT } from '@zeroruntime/js-sdk/plugins';  // direct to the vendor, with your key
```

### Options

<ParamField path="sample_rate" type="number" default="48000" />

<ParamField path="encoding" type="'pcm' | 'mulaw' | 'alaw'" default="pcm" />

<ParamField path="interim_results" type="boolean" default="true" />

<ParamField path="endpointing" type="number" default="50" />

<ParamField path="language" type="string | null" default="en" />

<ParamField path="diarize" type="boolean" default="false" />

<ParamField path="multichannel" type="boolean" default="false" />

<ParamField path="channels" type="number" default="1" />

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