x-ai/grok-4
Model Card
Grok 4 is xAI's flagship reasoning model released July 2025, trained with unprecedented reinforcement learning scale on 200,000 GPUs. It features native tool use, real-time search integration, and Grok 4 Heavy achieves 50% on Humanity's Last Exam benchmark.
Context Window
N/A
tokens
Max Output
N/A
tokens
Input Cost
$3
per million tokens
Output Cost
$15
per million tokens
API Usage Example
Add xAI: Grok 4 to your app with just a few lines of code.
No API keys, no backend, no configuration required.
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.chat("Explain quantum computing in simple terms", {
model: "x-ai/grok-4"
}).then(response => {
document.body.innerHTML = response.message.content;
});
</script>
</body>
</html>
Get started with Puter.js
Add xAI: Grok 4 to your app without worrying about API keys or setup.
Read the Docs View Tutorials