xai: xAI Grok 4

grok-4
Context: 256k
Max Output: 256k
Input: $3.00/1M
Output: $15.00/1M
Latest and greatest flagship model, offering unparalleled performance in natural language, math and reasoning - the perfect jack of all trades. Features function calling, structured outputs, and reasoning capabilities.
Input: Text
Output: Text

Providers

xai
Credits
Context256k
Max Output256k
Input$3.00/1M
Output$15.00/1M
Cache Read$0.750/1M
Cache Write
helicone
Credits
Context256k
Max Output256k
Input$3.00/1M
Output$15.00/1M
Cache Read$0.750/1M
Cache Write
openrouter
Credits
Context256k
Max Output256k
Input (Max)$6.33/1M
Output (Max)$31.65/1M
Cache Read
Cache Write

Quick Start

Use xAI Grok 4 through Helicone's AI Gateway with automatic logging and monitoring.