# xAI models

40 models · one OpenAI-compatible API

40 xAI models are on OpenCheap, each at its own price per 1M tokens. The cheapest to call is Grok 4.1 Fast, at $0.20 per 1M input tokens and $0.50 per 1M output tokens. The largest context is grok-4:fast's, 2M tokens. Prices are per 1M input / output tokens, as of 2026-12-04 11:48 UTC.

## Every xAI model

Price per 1M tokens, input / output

- [Grok 4.7](https://opencheap.si/models/grok-4.7): grok-4.7 $1.26 / $5.03 · 500K context · 9 providers
- [Grok 2 Vision 1212](https://opencheap.si/models/grok-2-vision-1212): grok-2-vision-1212 $1.80 / $9.00 · 1 provider
- [grok-3](https://opencheap.si/models/grok-3): grok-3 $3.15 / $15.74 · 131K context · 1 provider
- [grok-3-beta](https://opencheap.si/models/grok-3-beta): grok-3-beta $3.16 / $15.79 · 131K context · 1 provider
- [grok-3-fast-beta](https://opencheap.si/models/grok-3-fast-beta): grok-3-fast-beta $5.24 / $26.21 · 131K context · 1 provider
- [grok-3-fast-latest](https://opencheap.si/models/grok-3-fast-latest): grok-3-fast-latest $5.24 / $26.21 · 131K context · 1 provider
- [grok-3-latest](https://opencheap.si/models/grok-3-latest): grok-3-latest $3.15 / $15.75 · 131K context · 1 provider
- [grok-3-mini-fast-beta](https://opencheap.si/models/grok-3-mini-fast-beta): grok-3-mini-fast-beta $0.63 / $4.20 · 131K context · 1 provider
- [grok-3-mini-fast-latest](https://opencheap.si/models/grok-3-mini-fast-latest): grok-3-mini-fast-latest $0.63 / $4.19 · 131K context · 1 provider
- [grok-3-mini-latest](https://opencheap.si/models/grok-3-mini-latest): grok-3-mini-latest $0.32 / $0.53 · 131K context · 1 provider
- [grok-3-mini:fast](https://opencheap.si/models/grok-3-mini:fast): grok-3-mini:fast $0.63 / $4.21 · 131K context · 1 provider
- [Grok 4](https://opencheap.si/models/grok-4): grok-4 $3.15 / $15.76 · 256K context · 2 providers
- [grok-4-0709](https://opencheap.si/models/grok-4-0709): grok-4-0709 $3.15 / $15.77 · 128K context · 1 provider
- [grok-4-fast-non-reasoning](https://opencheap.si/models/grok-4-fast-non-reasoning): grok-4-fast-non-reasoning $0.21 / $0.53 · 128K context · 1 provider
- [grok-4-fast-reasoning](https://opencheap.si/models/grok-4-fast-reasoning): grok-4-fast-reasoning $0.21 / $0.52 · 128K context · 1 provider
- [grok-4-latest](https://opencheap.si/models/grok-4-latest): grok-4-latest $3.14 / $15.72 · 128K context · 1 provider
- [grok-4:fast](https://opencheap.si/models/grok-4:fast): grok-4:fast $0.21 / $0.52 · 2M context · 1 provider
- [Grok 4.1 Fast](https://opencheap.si/models/grok-4.1-fast-non-reasoning): grok-4.1-fast-non-reasoning $0.20 / $0.50 · 1M context · 2 providers
- [grok-4.1-fast-non-reasoning-latest](https://opencheap.si/models/grok-4.1-fast-non-reasoning-latest): grok-4.1-fast-non-reasoning-latest $0.21 / $0.52 · 128K context · 1 provider
- [Grok 4.1 Fast (reasoning)](https://opencheap.si/models/grok-4.1-fast-reasoning): grok-4.1-fast-reasoning $0.20 / $0.50 · 1M context · 2 providers
- [grok-4.1-fast-reasoning-latest](https://opencheap.si/models/grok-4.1-fast-reasoning-latest): grok-4.1-fast-reasoning-latest $0.21 / $0.53 · 128K context · 1 provider
- [grok-4.1:fast](https://opencheap.si/models/grok-4.1:fast): grok-4.1:fast $0.21 / $0.53 · 128K context · 1 provider
- [grok-4.20](https://opencheap.si/models/grok-4.20): grok-4.20 $1.25 / $2.50 · 2M context · 3 providers
- [Grok 4.20 Beta](https://opencheap.si/models/grok-4.20-beta): grok-4.20-beta $0.26 / $1.05 · 2M context · 2 providers
- [Grok 4.20 Beta 0309](https://opencheap.si/models/grok-4.20-beta-0309-non-reasoning): grok-4.20-beta-0309-non-reasoning $2.00 / $6.00 · 2M context · 2 providers
- [Grok 4.20 Beta 0309 (reasoning)](https://opencheap.si/models/grok-4.20-beta-0309-reasoning): grok-4.20-beta-0309-reasoning $2.00 / $6.00 · 2M context · 2 providers
- [Grok 4.20 Multi-Agent](https://opencheap.si/models/grok-4.20-multi-agent): grok-4.20-multi-agent $1.25 / $2.50 · 2M context · 3 providers
- [Grok 4.20 Multi Agent 0309](https://opencheap.si/models/grok-4.20-multi-agent-0309): grok-4.20-multi-agent-0309 $2.00 / $6.00 · 1M context · 1 provider
- [Grok 4.20 Multi-Agent Beta](https://opencheap.si/models/grok-4.20-multi-agent-beta): grok-4.20-multi-agent-beta $1.49 / $2.97 · 2M context · 2 providers
- [Grok 4.20 Multi Agent Beta 0309](https://opencheap.si/models/grok-4.20-multi-agent-beta-0309): grok-4.20-multi-agent-beta-0309 $2.00 / $6.00 · 2M context · 1 provider
- [Grok 4 20](https://opencheap.si/models/grok-4.20-non-reasoning): grok-4.20-non-reasoning $2.00 / $6.00 · 1M context · 1 provider
- [Grok 4 20 (reasoning)](https://opencheap.si/models/grok-4.20-reasoning): grok-4.20-reasoning $2.00 / $6.00 · 1M context · 1 provider
- [Grok 4.3](https://opencheap.si/models/grok-4.3): grok-4.3 $0.31 / $0.63 · 1M context · 7 providers
- [grok-4.3-latest](https://opencheap.si/models/grok-4.3-latest): grok-4.3-latest $1.31 / $2.63 · 200K context · 1 provider
- [Grok 4.5](https://opencheap.si/models/grok-4.5): grok-4.5 $2.10 / $6.30 · 500K context · 7 providers
- [Grok 4.6](https://opencheap.si/models/grok-4.6): grok-4.6 $2.00 / $6.00 · 500K context · 7 providers
- [Grok Build 0.1](https://opencheap.si/models/grok-build-0.1): grok-build-0.1 $1.00 / $2.00 · 256K context · 1 provider
- [Grok Code Fast 1](https://opencheap.si/models/grok-code-fast-1): grok-code-fast-1 $1.00 / $2.00 · 256K context · 1 provider
- [Grok Latest](https://opencheap.si/models/grok-latest): grok-latest $2.00 / $6.00 · 500K context · 1 provider
- [Grok Vision Beta](https://opencheap.si/models/grok-vision-beta): grok-vision-beta $5.60 / $16.80 · 1 provider

## Call any xAI model

Every model from xAI is called the same way: point the OpenAI SDK at `https://api.opencheap.si/v1` with your OpenCheap key and pass the model id, for example [opencheap/grok-4.7](https://opencheap.si/models/grok-4.7). Each request goes to the cheapest healthy provider of that model, and every answer reports what it cost in `usage.cost`. You pay per token from one prepaid balance, and credits never expire.

```
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.opencheap.si/v1", api_key=os.environ["OPENCHEAP_API_KEY"])
r = client.chat.completions.create(model="opencheap/grok-4.7",
    messages=[{"role": "user", "content": "Hi"}])
print(r.choices[0].message.content)
```

---

Source: https://opencheap.si/models/lab/xai · All models: https://opencheap.si/models · Prices as JSON: https://api.opencheap.si/v1/prices · Index for agents: https://opencheap.si/llms.txt
