About the xAI API
Grok models
Grok is a family of models from xAI. xAI develops its Grok text models primarily for programming, agentic tasks and knowledge work with documents, and alongside them releases the Grok Imagine image and video models. Grok models call functions and tools, understand images and let you adjust reasoning depth to the task.
The flagship of the lineup is Grok 4.7: released on September 21, 2026, it replaced Grok 4.6 and Grok 4.5. xAI calls it its strongest model for code and knowledge work.
What Grok 4.7 can do
Per xAI's documentation, Grok 4.7 has a 500K-token context window, accepts text and images as input and replies with text. Its knowledge runs through May 2026. Reasoning depth is set by the low, medium, high or xhigh level, with high as the default.
In comparisons published by xAI, Grok 4.7 is markedly stronger than Grok 4.6:
| Benchmark | Grok 4.7 | Grok 4.6 |
|---|---|---|
| Terminal-Bench 4.0 | 37.6% | 20.3% |
| CursorBench 4.0 | 46.3% | 40.4% |
| DeepSWE v1.1 | 71.0% | 65.2% |
| HealthBench Professional | 56.7% | 48.5% |
| GDPval, Elo points | 1695 | 1605 |
According to xAI, the gains come from a larger base model, longer reinforcement learning and additional training in the Grok Bot agentic environment. Speed remained at the level of Grok 4.6.
What tasks it fits
- coding agents: edits across a repository, terminal work, tracking down errors;
- multi-step agentic tasks with function and tool calls;
- analysis of documents, screenshots and images;
- professional tasks in law, medicine and office work.
For long agentic sessions, xAI advises periodically compacting the accumulated context: that way the model doesn't lose track of the task and requests stay shorter. For simple and high-volume requests, lower the reasoning level — responses arrive faster and use fewer tokens.
Grok 4.7, 4.6 and 4.5
All three models have a 500K-token context window, but Grok 4.7 is stronger at code and agentic tasks at the same speed. For new projects it makes sense to start with it and keep the earlier versions where your workflow is already tuned on them.