> ## 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 llm provider.

<Card title="Usage guide" icon="book" href="/plugins/llm/xai" horizontal>
  Setup, environment variables, and Python/JavaScript/Go usage examples.
</Card>

## XAILLM

LLM Plugin for xAI (Grok) API.

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

### Options

<ParamField path="model" type="string" default="grok-4-1-fast-non-reasoning" />

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

<ParamField path="temperature" type="number" default="0.7" />

<ParamField path="tool_choice" type="'auto' | 'required' | 'none'" default="auto" />

<ParamField path="max_completion_tokens" type="number | null" default="null" />
