APIMODELSAPIMODELS

Grok API key and pricing

TL;DR Grok 4.6 and Grok 4.5 are on apimodels.app through the OpenAI-compatible base URL https://api.apimodels.app/v1: $1.50 / $4.50 and $1.275 / $4.25 per 1M tokens, below xAI’s $2 / $6 list. One API key, no separate xAI account needed.

The Grok API gives programmatic access to xAI’s Grok models. You can get a key in two ways: open an account on xAI’s developer console and add credit there, or use an API gateway such as apimodels.app, where one key calls Grok alongside Claude, GPT, Gemini, DeepSeek and the image, video and audio models on the site.

Below: the two ways to get a key, what Grok 4.6 and 4.5 cost on each, which Grok models are available, and how Grok differs from Groq, a different company that people often mix up with it.

How to get a Grok API key

From xAI: create an account on the xAI developer console, add credit, then create an API key. Requests go to xAI’s own base URL, and the key only works for xAI models.

From apimodels.app: sign up, top up with Stripe, PayPal or Alipay, and create a key in the console. Point any OpenAI SDK at https://api.apimodels.app/v1 and set the model to grok-4.6 or grok-4.5. The same key and balance work for every other model on the site.

Grok API price: xAI and apimodels.app

Per 1M tokens, xAI list prices for prompts under 200K tokens, checked on 4 November 2026 on docs.x.ai. On apimodels.app Grok 4.6 is 25% below xAI on input, cached input and output; Grok 4.5 is about 36% below on input and 29% below on output, with cached input at the same $0.30. Billing is per actual token and failed calls are free.

ModelxAI list (input / cached / output)apimodels.app (input / cached / output)
grok-4.6$2.00 / $0.50 / $6.00$1.50 / $0.375 / $4.50
grok-4.5$2.00 / $0.30 / $6.00$1.275 / $0.30 / $4.25

Which Grok models you can call

Language models: grok-4.6 and grok-4.5, both with a 500K-token context on xAI. xAI’s newest model, grok-4.7, is not yet available on apimodels.app.

The same key also covers xAI’s other APIs on the site: Grok Imagine for images and video, and Grok Voice 3.0 for real-time speech-to-speech. Each has its own page with prices and limits, linked below.

Over the last 30 days of external traffic, grok-4.6 served 1,579 calls with 17 failures, one of them a content-moderation refusal, and grok-4.5 served 315 calls with 8 failures, four of them moderation refusals. Not every call succeeds; failed ones are not charged.

Grok and Groq are not the same thing

Grok is xAI’s family of models. Groq is a separate company that runs other providers’ open models on its own inference chips. A Groq API key does not call Grok, and a Grok key does not call Groq. apimodels.app offers Grok; it does not offer Groq.

Quick start

cURL

curl https://api.apimodels.app/v1/chat/completions \
  -H "Authorization: Bearer $APIMODELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-4.6",
    "messages": [{"role": "user", "content": "Summarise the main argument of this paragraph in one line."}]
  }'

Python

from openai import OpenAI

client = OpenAI(api_key="YOUR_APIMODELS_KEY", base_url="https://api.apimodels.app/v1")

r = client.chat.completions.create(
    model="grok-4.6",
    messages=[{"role": "user", "content": "Give me three names for a coffee shop."}],
)
print(r.choices[0].message.content)

FAQ

How do I get a Grok API key?

Either create an account on xAI’s developer console, add credit and generate a key there, or sign up on apimodels.app, top up and create a key in the console. The apimodels.app key calls Grok through the OpenAI-compatible base URL https://api.apimodels.app/v1 and also works for the other models on the site.

How much does the Grok API cost?

xAI lists Grok 4.6 and 4.5 at $2 input and $6 output per 1M tokens for prompts under 200K tokens. On apimodels.app Grok 4.6 is $1.50 / $4.50 with cached input at $0.375, and Grok 4.5 is $1.275 / $4.25 with cached input at $0.30. Billing is per token and failed calls are free.

Is Grok the same as Groq?

No. Grok is xAI’s model family; Groq is a different company that serves other models on its own chips. Their API keys are not interchangeable. apimodels.app provides Grok and does not provide Groq.

Can I use the Grok API from mainland China?

apimodels.app is served through Cloudflare, and most networks in mainland China can reach it directly; test with a small top-up first. Payment by Alipay is supported.

Is Grok 4.7 available?

Not yet on apimodels.app. xAI lists grok-4.7 as its newest model; here you can call grok-4.6 and grok-4.5 today.

Related

Featured on
APIMODELS on Product HuntAPIMODELS featured on ToolifyAPIMODELS featured on There's An AI For That