---
title: "xAI (Grok)"
description: "API Reference for xAI Grok models"
---

## Usage

```python
from ai_query.providers import xai

model = xai("grok-2-latest")
```

## Configuration

The `xai` provider connects to the xAI API.

### Environment Variables

| Variable | Description |
| --- | --- |
| `XAI_API_KEY` | Your xAI API key |
