> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# xAI

> Parameter reference for the xAI model class, which extends OpenAILike to connect to xAI's language models.

The xAI model provides access to xAI's language models.

## Parameters

| Parameter | Type | Default | Description |
| - | - | - | - |
| `id` | `str` | `"grok-4-1-fast-non-reasoning-latest"` | The ID of the xAI model to use |
| `name` | `str` | `"xAI"` | The name of the model |
| `provider` | `str` | `"xAI"` | The provider of the model |
| `api_key` | `Optional[str]` | `None` | The API key for xAI (defaults to XAI\_API\_KEY env var) |
| `base_url` | `str` | `"https://api.x.ai/v1"` | The base URL for the xAI API |
| `search_parameters` | `Optional[Dict[str, Any]]` | `None` | Search configuration for xAI live search, sent in the request body |

> [!WARNING]
>
> `grok-4-1-fast-non-reasoning-latest` is retained here because it is the class default in the pinned source. xAI has retired this alias and redirects it to Grok 4.3. Use `xAI(id="grok-4.3", reasoning_effort="none")` for the equivalent current configuration.

`xAI` extends [OpenAILike](https://agno-v2.mintlify.site/reference/models/openai-like.md) and accepts all of its parameters.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.