Grok 4.7 API pricing

xAI's newest Grok release. Available at listed at platform rate (no published official USD price).

In short: Grok 4.7 costs $1 per 1M input tokens and $3 per 1M output tokens. No official USD list price is published for this model, so it bills at platform rate — the reason to use it is access and consolidated billing rather than a discount. At 50M input and 10M output a month that is about $80. Rates verified 2026-09-26.
RouteInput / 1MOutput / 1M
Platform rate$1$3

USD, standard tier, verified 2026-09-26.

Check live rates on the platform →Free to sign up · $1 minimum top-up · No prepayment

Specifications

VendorxAI
Context window—
Max output—
CategoryUS frontier

What Grok 4.7 costs at your volume

Usage levelInput / output per monthMonthly cost
Light — prototyping, a few thousand calls5M / 1M$8.00
Working — one developer, daily use50M / 10M$80.00
Heavy — team or agent loops in production500M / 100M$800.00

Calculated at $1 input / $3 output per 1M tokens, assuming a 5:1 input-to-output ratio. Your ratio decides the real number — run your own figures through the cost calculator.

When Grok 4.7 is the right call

At $1 per million input tokens this sits in the mid-range band. It is a good fit for the everyday mix — agent loops, chat assistants, code editing, and anything interactive where latency and quality both matter.

It is usually the wrong call for either extreme: trivial bulk jobs that a cheaper model handles identically, or the hardest reasoning tasks where a flagship earns its premium.

Where Grok 4.7 sits in the index

One model, three rankings — because the model that is cheapest per input token is frequently not the cheapest per task. Output tokens cost a median of 4.0× what input costs across these 216 models, so a workload that generates more than it reads flips the order. Percentile is the share of models that cost more than this one.

Grok 4.7 against all 216 models in the rate index. Rates checked 2026-09-26.
Ranked byPositionPercentileRate
Input rate146 of 21632%$1.00
Output rate139 of 21636%$3.00
Agent mix 1:3, blended140 of 21635%$2.5

On an agent mix the lowest blended rate in the same index is Gemma2 9B It at $0.01 per 1M tokens — about 250.0× less than this model at the same ratio. That gap is what the re-ranked index exists to show: sorting by input price alone can put a model 68 places out.

Inside xAI's 27 listed models, Grok 4.7 is 18 of 27 on the same agent mix, between Grok 4 1 Fast Non Reasoning at $0.2125 and Grok 2 Vision 1212 at $10.00 per 1M blended tokens. Most real decisions are made inside one vendor's range rather than across the whole index — see the full xAI range.

Similarly priced alternatives

Similarly pricedVendorIn / out per 1Mvs this
Qwen3.8 MaxAlibaba$1 / $3same
Claude Haiku 4.5Anthropic$0.5 / $2.5−$1.00
o3OpenAI$1 / $4+$1.00

Blended comparison (input + output per 1M). Price is one axis — the models above are not interchangeable, they are the ones worth testing side by side at this budget.

Calling Grok 4.7

The identifier you send is grok-4.7 — copy it exactly, because a mismatch returns a model error rather than a connection error, which sends most people to debug the wrong thing. Everything else is a base URL argument; official SDKs work unchanged.

from openai import OpenAI

client = OpenAI(base_url="https://aicomp.ai/v1", api_key="sk-...")

resp = client.chat.completions.create(
    model="grok-4.7",
    messages=[
        {"role": "system", "content": "Answer in one short paragraph."},
        {"role": "user", "content": "Explain what changed in this release."},
    ],
    max_tokens=300,
)

# prompt_tokens / completion_tokens 是真实账单的唯一依据 —— 记下来,别猜
print(resp.usage.prompt_tokens, resp.usage.completion_tokens)

Log the usage object on every call, not just while you are optimising. Rates follow vendor promotions and can move without notice, so a per-call record is the only thing that tells you later whether a price change actually hit you — and in which direction.

import json

# 把每次调用的 usage 落盘,一周后你就有了自己的 in:out 比例。
# 拿这个比例去 /calculator/ 比价,比对着价目表猜准得多 ——
# output 单价是 input 的好几倍,猜错方向就是往贵了算。
with open("usage.jsonl", "a") as fh:
    fh.write(json.dumps({
        "model": model,
        "in": resp.usage.prompt_tokens,
        "out": resp.usage.completion_tokens,
    }) + "\n")

Setting it up

Pointing an existing integration at this model is a base URL change, not a rewrite. Pick your tool:

FAQ

How much does Grok 4.7 cost per million tokens?

$1 per million input tokens and $3 per million output tokens. No official USD list price is published for this model, so it is billed at platform rate.

Is Grok 4.7 cheaper than buying direct?

There is no published official USD price to compare against for this model — it is billed at platform rate, and the reason to route it through a gateway is access and consolidated billing rather than a discount.

What does Grok 4.7 cost per month in practice?

At a 5:1 input-to-output ratio it is about $8.00 a month for light use (5M input tokens) and roughly $800.00 for heavy use (500M input). Agent workloads sit at the high end because every turn resends the context — see what actually drives Claude Code cost.

Which models cost about the same as Grok 4.7?

The comparison table further up this page lists the three closest in blended price. If you are choosing on cost alone, start there and test the top two on your own prompts — price per token is only half the equation, the other half is how many tokens a model needs to finish the task.

How do I start using Grok 4.7?

You need an API key, then point your client at the gateway base URL. It is a one-line change in most SDKs — see the SDK setup guide, or the Claude Code and Cursor guides for those tools.

What is the Grok 4.7 API price per 1M tokens?

$1 per 1M input and $3 per 1M output. The two directions are quoted separately because a request is billed twice — once for what you send, once for what comes back — and the rates differ.

How much more does Grok 4.7 charge for output than input?

Output tokens cost 3.0x what input tokens do here — $1 per 1M in against $3 per 1M out. The median output-to-input multiple across our full price index is 4.0x, so this model sits below that line. It matters more than it looks: a coding agent writes far more than it reads, so on this model the output rate — not the input rate people usually compare — decides the bill. See why output pricing dominates.

How much does Grok 4.7 cost for a coding agent?

About $800.00 a month at 500M input and 100M output tokens — the shape a coding assistant really produces, because every turn resends the whole context and the model writes more than it reads. The biggest lever is usually not the model but how much context you resend each turn — see what actually drives agent cost.

Does Grok 4.7 have an official list price?

No — xAI does not publish a USD list price for this model, so there is nothing to compare against and it bills at platform rate: $1 in / $3 out per 1M. The reason to route it through a gateway is access and one consolidated bill across vendors, not a discount.

Get Grok 4.7 access