Grok API

Grok API without an xAI account: pay per token, start from $5.

xAI's Grok models behind the same OpenAI-compatible key you use for GPT, Claude and Gemini. One flat price per 1M charged tokens, cached input counts at 15%, and the 500k-token context is included.

Live Grok prices

Read straight from the catalog. xAI lists Grok at $2 per 1M input and $6 per 1M output tokens; on a typical coding workload our flat price comes to roughly a fifth of that.

ModelPrice / 1M charged tokensEndpointsStatus
grok-4.7$0.33/v1/chat/completions, /v1/responsesLIVE
grok-4.6$0.33/v1/chat/completionsLIVE
grok-4.5$0.33/v1/chat/completions, /v1/responsesLIVE

Which Grok to use

Call Grok in 30 seconds

Create a key, add $5 or more, and point any OpenAI client at https://api.model.sale/v1. Cursor, Cline, Continue and the OpenAI SDKs work as they are.

curl https://api.model.sale/v1/chat/completions \\
  -H "Authorization: Bearer $MODEL_SALE_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{"model":"grok-4.7","messages":[{"role":"user","content":"Hello"}]}'
from openai import OpenAI
client = OpenAI(base_url="https://api.model.sale/v1", api_key="YOUR_KEY")
r = client.chat.completions.create(model="grok-4.7", messages=[{"role": "user", "content": "Hello"}])
print(r.choices[0].message.content)

Grok in Codex CLI

Grok 4.7 and 4.6 also speak the OpenAI Responses API, which Codex uses. Add Model.sale as a provider once (see the Codex guide) and start Codex on Grok:

codex -c model_provider=model_sale -m grok-4.7

Common questions

Do I need an xAI account or a foreign card? No. You top up Model.sale by card, PayPal or crypto and call Grok with our key.

Is the model ever replaced? No. If Grok is unavailable the request fails with a clear error instead of silently switching to another model.

Which endpoints are supported? Chat Completions (/v1/chat/completions) for every Grok, and the Responses API (/v1/responses) for Grok 4.7 and 4.6, both with streaming. The model page lists the current endpoints.

Your first request in under a minute.

Create a key, top up from $5 and swap the base URL. No subscription, no hidden fees.

Get your API keyRead the docs