Roar AI
Get started
All models
xAI · Chat

Grok 4.7 API

Grok 4.7 costs $4 per million input tokens and $12 per million output tokens on Roar AI. xAI’s current flagship, a coding upgrade on Grok 4.6.

Input$4per 1M tokens
Output$12per 1M tokens
Context window500Ktokens

These are API prices for building with Grok 4.7, billed by what you use. They are not the price of a Grok plan.

Grok 4.7 API pricing

Input$4 per 1M tokens
Output$12 per 1M tokens
Cached input$0.50 per 1M tokens

Example: 1,000 requests with 3,000 input and 1,000 output tokens each cost $24. Every rate is published and stays the same from one request to the next. See every model, or estimate a monthly bill with the token calculator.

Rates as of 1 December 2026.

Specs

Made byxAI
ReleasedSeptember 2026
TypeChat
Context window500K tokens
ReadsText, images
Thinks before answeringYes, adjustable
WeightsClosed
Processed inGlobal
Model idgrok-4.7

Is Grok 4.7 worth the price?

For teams already on Grok, yes: it is a straight upgrade on Grok 4.6. xAI’s own coding results improved across the board.

Compare it with care against other labs. Independent testing put it well behind GPT-6 Astra and Claude on Terminal-Bench, and it writes more than twice the tokens of Grok 4.6 per task, so a low rate can still mean a high bill. Measure the cost of a real task before you commit.

Grok 4.7 and the models to compare it with, priced per 1M tokens
ModelInputOutputChoose it for
Grok 4.7$4$12Coding and knowledge work.
GPT-6.2 Sol$2$10Dependable coding and agent work.
Claude Sonnet 5.5$2$10Everyday coding with fewer tokens.
DeepSeek V4.1 Flash$0.195$0.78Low-cost coding on an open model.

Prices per 1M tokens.

About Grok 4.7

Grok 4.7 replaced Grok 4.6 on 21 September 2026, aimed at coding and at finishing longer knowledge-work jobs. xAI reports gains across its own coding tests, including 71.0% on DeepSWE, up from 65.2%.

Independent testing is less generous. On Terminal-Bench 4.0 xAI reports 38.0% with its own harness; Artificial Analysis measured about 26%, against about 60% for GPT-6 Astra. It places Grok 4.7 at 35 on its Intelligence Index v5.

It reads text and images in a window of 500K tokens, and thinks at four effort levels from low to xhigh.

What is Grok 4.7 good for?

  • Coding agents and app prototypes.
  • Longer office and knowledge-work tasks.
  • Teams already built on Grok 4.6, who can switch by changing the model name.

Grok 4.7 limitations

  • Uses a lot of tokens: Artificial Analysis counted more than twice Grok 4.6’s output per task, which can erase the saving of a low rate.
  • Slow to start at its highest effort: about 48 seconds before the first word of the answer, by Artificial Analysis’s measure.
  • Its two highest effort levels scored about the same in independent testing, so xhigh rarely earns its extra time.
  • Prompts of 200K tokens or more are charged at a higher rate, and xAI says it is not meant for high-stakes work without a person checking.

How to use the Grok 4.7 API

Use the OpenAI SDK you already have: point it at Roar AI and set the model name. Read the docs.

from openai import OpenAI

client = OpenAI(base_url="https://api.roar-ai.com/v1", api_key="roar_live_…")

reply = client.chat.completions.create(
    model="grok-4.7",
    messages=[{"role": "user", "content": "Summarise this contract in plain English."}],
)

Grok 4.7 FAQ

How much does Grok 4.7 cost?

Input is $4 per 1M tokens; output is $12 per 1M tokens. For example, 1,000 requests with 3,000 input and 1,000 output tokens each cost $24.

Can I use Grok 4.7 alongside other models?

Yes. Every model on Roar AI is on the same API key and the same monthly invoice, so switching from Grok 4.7 to another model only means changing the model name in your code.

Is Grok 4.7 open source?

No. xAI does not publish the weights, so it is only available through an API like this one.

What is the context window of Grok 4.7?

Grok 4.7 can read up to 500K tokens in one request.

Can Grok 4.7 read images and PDFs?

It reads images directly. You can still send it a PDF: Roar AI turns each page into text first, at no extra charge.

Start using Grok 4.7

Create a free account, get an API key and call Grok 4.7 with the OpenAI SDK.