xAI · Textreleased July 9, 2025

Grok 4

Context
256K
Verified
$2.88per 1M tokens

What it costs

One model, two catalogs. Verified goes to the vendor or its official partner; Community goes through third-party providers for less.

Verified
Input
$2.88
Output
$14.40
Cached input
$0.72

input / output per 1M

Straight from the vendor or its official partner. The original model.

Community

Not available in this catalog

Third-party providers. Cheaper, with no guarantee the model isn't quantized.

Specs and latency

Everything you need for a request, and how fast the model answers on real traffic.

ID
xai/grok-4
Endpoint
POST /v1/chat/completions
Modality
Text
Context
256K
Capabilities
  • JSON
  • Reasoning
  • Tools
  • Vision
Released
July 9, 2025
TTFB p50—
TTFB p99—
not enough data Real traffic through the gateway, last 7 days.

First request

The API is OpenAI-compatible: change base_url and the model name, keep the rest of your code.

1curl https://api.velisity.live/v1/chat/completions \2  -H "Authorization: Bearer $VELISITY_API_KEY" \3  -H "Content-Type: application/json" \4  -d '{5    "model": "xai/grok-4",6    "stream": true,7    "messages": [{ "role": "user", "content": "ping" }]8  }'

Similar price

Models of the same modality at a similar price. Compare to see the difference at your volume.

ModelPriceContextCompare
Grok 4$2.88 / $14.40256K
Claude Sonnet 4.5$2.88 / $14.40200KCompare →
Nova Premier 1.0$3.00 / $15.001MCompare →
Magnum v4 72B$3.00 / $6.0033KCompare →

Questions about Grok 4

  1. Verified: $2.88 input / $14.40 output per 1M tokens. Pay as you go, no subscription; the balance is kept in US dollars.

  2. Grok 4 has a 256K-token window. You pay for the tokens you actually send, not for the window size.

  3. In any OpenAI-compatible SDK set base_url to https://api.velisity.live/v1 and the model to "xai/grok-4". Get a key in the console; the rest of your code stays the same.

Your first request in a minute

Create a key, change the base_url — and your code already works with any model. You only pay for answers.