New
Grok-4 · 1M tokens
The generation Grok-4.1 builds on. State of the art for coding from generation through to delivery, with the same 1M-token context window.
What you get
- 1M tokens for every unit you buy. Order several units to stack quota.
- A personal access key for
grok-4, issued automatically once your order is completed. - No shipping: delivery is digital, under My Account > Order History and by email.
Capabilities
- Open weights lineage
- Coding
- Tool calls
- Reasoning
Best for
Teams standardising on Grok-4 before moving to 4.1.
Quick start
from xai_sdk import Client
from xai_sdk.chat import user
client = Client(api_key="YOUR_ACCESS_KEY")
chat = client.chat.create(model="grok-4")
chat.append(user("Hello"))
print(chat.sample().content)
| Model Specs | |
| Model ID | grok-4 |
| Context Window | 1M tokens |
| Max Output | 128K tokens |
| Modalities | Text in / text out |
| Capabilities | Open weights lineage, Coding, Tool calls, Reasoning |
| Best For | Teams standardising on Grok-4 before moving to 4.1 |
| Unit Size | 1M tokens |
$4.40
10 or more $4.18
50 or more $3.96