Models
Enterprise
Subscribe
Resource
Documentation
Console

x.ai/grok-4-2

Grok.Color

X.ai: grok-4-2

Grok-4.2: A trillion-parameter AI productivity behemoth featuring native 16-Agent cluster collaboration. It processes real-time data streams and evolves via high-frequency weekly updates. It is the ultimate API for commercial automation, complex enterprise decision-making, and personalized cognitive augmentation.

Modetext → text
Input price$0.04 per M tokens
Output price
Context length
Weekly usage0 tokens
Listed at

X.ai

Latency
Throughput
Upload rate
Context length
Max output
Input price$0.04per request
Output priceper request
Cache readper request
Cache writeper request

Performance

Avg TPS
Avg latency
Avg success rate
TPS
TTFT
Latency
Success rate

Success rate

Speed

Code Example

curl ${API_BASE_URL}/v1/chat/completions \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-4-2",
    "messages": [
      {
        "role": "user",
        "content": "Hello"
      }
    ]
  }'

Replace <YOUR_API_KEY> with the API key generated on your token management page.

Authentication

All requests must include the Authorization: Bearer <TOKEN> header.

Endpoint Path

POST
openai

Supported Parameters

ParameterTypeDefaultDescription

Rate Limits

GroupRPMTPMRPD

RPM = requests per minute, TPM = tokens per minute, RPD = requests per day. Limits apply by token group.

Pricing

GroupBilling typePrice summary