SuperGrok.info

The Grok API is for developers who want Grok inside software. You send JSON to the xAI endpoint, choose a model, include messages and receive a response your program can process. It is separate from SuperGrok chat plans and bills by usage.

Keep API keys server-side, measure token usage early and verify official prices before production. If you only want to chat with Grok as a person, use the consumer pricing guide instead.

When the API is the right route

Choose the API for software

Use it when Grok sits inside a product, internal workflow, batch job, agent, evaluation harness or backend service. Chat plans do not make API traffic free.

Map the request path first

Write down where prompts are created, where context comes from, where responses are stored, who sees logs and the fallback when a request fails.

Model IDContextInput per 1MOutput per 1MBest for
grok-4.5500,000USD 2.00USD 6.00Current flagship for general chat, coding and reasoning
grok-4.31,000,000USD 1.25USD 2.50Lower-cost general model with a larger 1M context window
grok-4.20-0309-reasoning1,000,000USD 1.25USD 2.50Harder reasoning, document work and deliberate tool use
grok-4.20-0309-non-reasoning1,000,000USD 1.25USD 2.50High-volume text tasks that do not need explicit reasoning mode
grok-4.20-multi-agent-03091,000,000USD 1.25USD 2.50Hard multi-step work that benefits from parallel agent-style processing
grok-build-0.1256,000USD 1.00USD 2.00Coding-agent and build workflows at lower input cost

Model data last checked 2026-07-22. Verify current pricing at docs.x.ai.

Official xAI API documentation pricing table
Official xAI API docs pricing, captured 2026-07-01. Newer models such as Grok 4.5 may not appear in this snapshot, so check the live docs for current rates.
First request
curl https://api.x.ai/v1/chat/completions \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-4.5",
    "messages": [
      { "role": "user", "content": "Say hello in one short sentence." }
    ]
  }'

Frequently asked questions

Make a working request

Use the quickstart, then estimate monthly cost before building more.

supergrok.info is an independent guide and resource site. It is not xAI, Grok, X, or an official login, billing, API, app, or support channel. For passwords, subscriptions, API keys, billing, app downloads, account access, incidents and support, use official xAI and Grok links. Grok and xAI are trademarks of their respective owners. This site uses those names only to describe and reference the product.