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

# xAI

> Route xAI Grok model requests through Toqan Router's AI Gateway. Set up your API key and access Grok chat and reasoning models with observability.

## Setup Your API Key

To use xAI with Toqan Router, follow these steps:

1. Navigate to **AI Gateway** > BYOK
2. Find **xAI** in the list
3. Click the **Configure** button next to xAI
4. In the modal that opens, select <kbd>Setup your own API Key</kbd>
5. Enter a name for this configuration (e.g., "xAI Production")
6. Paste your xAI API Key into the provided field
7. Click **Save** to complete the setup

Your xAI API key is now configured and ready to use with Toqan Router in **AI Studio** or through the **AI Gateway**.

> [!NOTE]
>
> Get your xAI API key from the [xAI console](https://console.x.ai/).

## Available Models

The **AI Gateway** supports Grok models with vision capabilities and reasoning modes.

* **Grok 4**: `xai/grok-4`, `xai/grok-4-fast` — latest generation
* **Grok 3**: `xai/grok-3`, `xai/grok-3-fast`, `xai/grok-3-mini` — with vision and reasoning support
* Function calling and streaming supported across all models

All models are available through the **AI Gateway** with the `xai/` prefix. For the full model list, see the [Supported Models](/docs/ai-gateway/supported-models.md) page.


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