Grok API access
xAI's Grok 4.x models through 7API, with the same key and base URL as every other family.
| Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M |
|---|---|---|---|---|---|---|
| Grok 4.7 | grok-4.7 | 500K | 66K | $0.10 | $0.10 | $0.02 |
| Grok 4.6 | grok-4.6 | 500K | 66K | $0.10 | $0.10 | $0.02 |
| Grok 4.5 | grok-4.5 | 200K | 64K | $0.10 | $0.10 | $0.02 |
Rates are in USD per million tokens. Last checked 2026-11-20.
What to know
- Grok 4.7 and 4.6 have a 500K-token context window. Grok 4.5 has 200K.
- Use Chat Completions in OpenAI-format tools, or
claude-grok-4.7in Claude Code.
Quick start
curl https://7api.st/v1/chat/completions \
-H "Authorization: Bearer $SEVENAPI_API_KEY" -H "Content-Type: application/json" \
-d '{"model": "grok-4.7", "messages": [{"role": "user", "content": "Hello"}]}'Set the base URL to https://7api.st/v1 for OpenAI-format clients, or https://7api.st for Anthropic-format clients. See the quickstart for SDK examples.
Independent benchmarks
Scores published by third parties, not by 7API. See all benchmarks for sources and method.
| Model | Artificial Analysis Intelligence Index | Effort |
|---|---|---|
grok-4.7 | 46 | xhigh |
