xAI offers 58 models through Lava’s AI Gateway, supporting Chat Completions, Chat Completions (Native). Authentication usesDocumentation Index
Fetch the complete documentation index at: https://lava.so/docs/llms.txt
Use this file to discover all available pages before exploring further.
Authorization: Bearer. See the xAI API docs for provider-specific parameters.
Supports both managed (Lava’s API keys) and unmanaged (bring your own credentials) mode.
Quick Start
Chat Completions
Target URL:https://api.x.ai/v1/chat/completions
| Content Type | application/json |
| Streaming | Yes (set stream: true in request body) |
| Model | Input / 1M tokens | Output / 1M tokens |
|---|---|---|
| grok-3-fast-beta | $5.00 | $25.00 |
| grok-3-fast | $5.00 | $25.00 |
| grok-3-fast-latest | $5.00 | $25.00 |
| grok-4-0709 | $3.00 | $15.00 |
| grok-4-latest | $3.00 | $15.00 |
| grok-4 | $3.00 | $15.00 |
| grok-3-beta | $3.00 | $15.00 |
| grok-3 | $3.00 | $15.00 |
| grok-3-latest | $3.00 | $15.00 |
| grok-4.20-0309-reasoning | $2.00 | $6.00 |
| grok-4.20-0309-non-reasoning | $2.00 | $6.00 |
| grok-4.20-multi-agent-0309 | $2.00 | $6.00 |
| grok-3-mini-fast-beta | $0.60 | $4.00 |
| grok-3-mini-fast | $0.60 | $4.00 |
| grok-3-mini-fast-latest | $0.60 | $4.00 |
| grok-3-mini-beta | $0.30 | $0.50 |
| grok-3-mini | $0.30 | $0.50 |
| grok-3-mini-latest | $0.30 | $0.50 |
| grok-4-1-fast-reasoning | $0.20 | $0.50 |
| grok-4-1-fast-reasoning-latest | $0.20 | $0.50 |
| grok-4-1-fast-non-reasoning | $0.20 | $0.50 |
| grok-4-1-fast-non-reasoning-latest | $0.20 | $0.50 |
| grok-code-fast-1 | $0.20 | $1.50 |
| grok-code-fast | $0.20 | $1.50 |
| grok-code-fast-1-0825 | $0.20 | $1.50 |
| grok-4-fast-non-reasoning | $0.20 | $0.50 |
| grok-4-fast-non-reasoning-latest | $0.20 | $0.50 |
| grok-4-fast-reasoning | $0.20 | $0.50 |
| grok-4-fast-reasoning-latest | $0.20 | $0.50 |
Chat Completions (Native)
Target URL:https://api.x.ai/v1/messages
| Content Type | application/json |
| Streaming | Yes (set stream: true in request body) |
| Model | Input / 1M tokens | Output / 1M tokens |
|---|---|---|
| grok-3-fast-beta | $5.00 | $25.00 |
| grok-3-fast | $5.00 | $25.00 |
| grok-3-fast-latest | $5.00 | $25.00 |
| grok-4-0709 | $3.00 | $15.00 |
| grok-4-latest | $3.00 | $15.00 |
| grok-4 | $3.00 | $15.00 |
| grok-3-beta | $3.00 | $15.00 |
| grok-3 | $3.00 | $15.00 |
| grok-3-latest | $3.00 | $15.00 |
| grok-4.20-0309-reasoning | $2.00 | $6.00 |
| grok-4.20-0309-non-reasoning | $2.00 | $6.00 |
| grok-4.20-multi-agent-0309 | $2.00 | $6.00 |
| grok-3-mini-fast-beta | $0.60 | $4.00 |
| grok-3-mini-fast | $0.60 | $4.00 |
| grok-3-mini-fast-latest | $0.60 | $4.00 |
| grok-3-mini-beta | $0.30 | $0.50 |
| grok-3-mini | $0.30 | $0.50 |
| grok-3-mini-latest | $0.30 | $0.50 |
| grok-4-1-fast-reasoning | $0.20 | $0.50 |
| grok-4-1-fast-reasoning-latest | $0.20 | $0.50 |
| grok-4-1-fast-non-reasoning | $0.20 | $0.50 |
| grok-4-1-fast-non-reasoning-latest | $0.20 | $0.50 |
| grok-code-fast-1 | $0.20 | $1.50 |
| grok-code-fast | $0.20 | $1.50 |
| grok-code-fast-1-0825 | $0.20 | $1.50 |
| grok-4-fast-non-reasoning | $0.20 | $0.50 |
| grok-4-fast-non-reasoning-latest | $0.20 | $0.50 |
| grok-4-fast-reasoning | $0.20 | $0.50 |
| grok-4-fast-reasoning-latest | $0.20 | $0.50 |
Next Steps
All Providers
Browse all supported AI providers
Forward Proxy
Learn how to construct proxy URLs and authenticate requests