Skip to navigation

Grok 4.7

Grok 4.7 is a flagship model by xAI, available through the OpenAI-compatible API under the model id grok-4.7. Input costs $1.40 and output $4.20 per 1M tokens. It has a 500k-token context window.

xAI · Grok · Flagship

UnavailableDiscount −30%

xAI's newest Grok, with a 500K context window, vision input and tool calling.

Requests to this model fail right now: it has no working upstream. The rates below are what it will cost when it returns.

Grok 4.7 key facts
VendorxAI
Model IDgrok-4.7
Input price per 1M tokens$1.40 (regular $2.00)
Output price per 1M tokens$4.20 (regular $6.00)
Context window500k tokens
Max outputNot published
API formatsOpenAI
Prices checked

Model id

grok-4.7

Price per 1M tokens

Input
Regular rate $2.00now $1.40
Output
Regular rate $6.00now $4.20
Cached input
$0.5064% below input

30% below the market rate.

Output is 3× the input rate. $1 covers about 285 prompts of 1,000 input + 500 output tokens. 1 credit = $1 of usage. All rates

Start using Grok 4.7

Set ONEAIAPIKEY_API_KEY to a key from your console, then run any example. Streaming is on so long answers are not cut off by idle-connection timeouts.

curl https://api.oneaiapikey.com/v1/chat/completions \
  -H "Authorization: Bearer $ONEAIAPIKEY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-4.7",
    "stream": true,
    "messages": [{"role": "user", "content": "Compare these five articles on SQLite in production and summarise where they disagree."}]
  }'
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.oneaiapikey.com/v1",
    api_key=os.environ["ONEAIAPIKEY_API_KEY"],
)

stream = client.chat.completions.create(
    model="grok-4.7",
    messages=[{"role": "user", "content": "Compare these five articles on SQLite in production and summarise where they disagree."}],
    stream=True,  # recommended for long outputs
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.oneaiapikey.com/v1",
  apiKey: process.env.ONEAIAPIKEY_API_KEY,
});

const stream = await client.chat.completions.create({
  model: "grok-4.7",
  messages: [{ role: "user", content: "Compare these five articles on SQLite in production and summarise where they disagree." }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

More: quickstart · API reference · try it in Chat first

Benchmarks reported by the vendor

Scores for Grok 4.7 as its maker published them, with the setting they state. We have not re-run them. Versions and settings differ between vendors, so compare only identical benchmark names; compare models side by side.

Tokens per day, by model

Last 7 days, UTC days

Hover, tap or drag across any day, or focus the chart and use the arrow keys, to see how every model did that day.

Real tokens served through this gateway, updated every 30 minutes. Ranked by usage, not quality.

Full ranking insights

Grok line-up

Grok 4.7 or Grok 4.6 or Kimi K3?

Of the 3 Grok models on this site, Grok 4.7 is the top of the line-up and Grok 4.6 the step down. Kimi K3 from Moonshot AI is the closest-priced flagship-tier model from another vendor. Each comparison lists the published rates and limits, then what favours each side.

Grok 4.7vsGrok 4.6

Per 1M tokensGrok 4.7Grok 4.6
Input$1.4030% less$2
Output$4.2030% less$6
Cached input$0.50the same$0.50
Context500kthe same500k

Pick Grok 4.7 when

  • cost per request decides it: Grok 4.7 charges input 30% less and output 30% less than Grok 4.6.
  • the task needs a higher tier: this catalogue places Grok 4.7 in the flagship tier and Grok 4.6 in the balanced tier.
  • the work is tool calling and long context, which this catalogue lists for Grok 4.7 and not for Grok 4.6.

Pick Grok 4.6 instead when

  • your workload looks like fast answers and chat, labels the catalogue gives Grok 4.6 only.

Grok 4.7vsKimi K3

Per 1M tokensGrok 4.7Kimi K3
Input$1.404× as much$0.353
Output$4.2026% less$5.67
Cached input$0.5067% more$0.30
Context500k52% smaller1.05M

Pick Grok 4.7 when

  • cost per request decides it: Grok 4.7 charges output 26% less than Kimi K3.
  • you rely on Structured output, which Kimi K3 does not list.
  • the work is research, tool calling and long context, which this catalogue lists for Grok 4.7 and not for Kimi K3.

Pick Kimi K3 instead when

  • the job runs well enough on the lower rates: input at 75% less.
  • inputs outgrow the 500k-token window of Grok 4.7; Kimi K3 accepts 1.05M.
  • Grok 4.7 does not list JSON mode and your code depends on it.
  • Grok 4.7 bills long prompts at a higher rate (2× above 200k tokens).
  • your workload looks like agentic coding, large repositories and tool use, labels the catalogue gives Kimi K3 only.

Use cases

What Grok 4.7 is listed for, and what it costs

The catalogue lists Grok 4.7 for research, tool calling and long context. Each row prices one typical request at the published rates, with the arithmetic shown. The market-rate figure shows the same request at the lowest public price elsewhere. Token counts are examples; your prompts will differ.

Model your own traffic

  1. Research

    A research question with search results attached: 25,000 tokens in, a 1,500-token summary out.

    Break broad questions into focused sub-questions for better answers.

    “Compare these five articles on SQLite in production and summarise where they disagree.”

    Same request on Grok 4.6 $0.059 and Kimi K3 $0.01733.

    $0.0413

    per summary, about 242 per $10

    $0.059 at the market rate

    0.025 × $1.40 + 0.0015 × $4.20

  2. Tool calling

    A request carrying 15 tool definitions: 5,000 tokens in, a 300-token tool call out.

    Define tools with precise JSON schemas; it picks and fills them reliably.

    “Find open invoices older than 30 days and draft a reminder to each customer.”

    Same request on Grok 4.6 $0.0118 and Kimi K3 $0.003466.

    $0.00826

    per tool call, about 1,210 per $10

    $0.0118 at the market rate

    0.005 × $1.40 + 0.0003 × $4.20

  3. Long context

    A whole codebase or report in one prompt: 400,000 tokens in, a 2,000-token answer out.

    Combine large inputs with cached-input pricing to keep repeat reads cheap.

    “Using the whole repository, list every place that reads the session cookie.”

    Same request on Grok 4.6 $1.624 and Kimi K3 $0.15254.

    $1.1368

    per request, about 8 per $10

    $1.624 at the market rate

    0.4 × $2.80 + 0.002 × $8.40

    Rates ×2: the prompt is over 200k tokens.

Overview

When Grok 4.7 fits

Grok 4.7 is a flagship model from xAI, available here under the exact model id “grok-4.7”. It heads the Grok line-up here, above Grok 4.6 and Grok 4.7 Fast. xAI released it on 21 Sept 2026, and it has been on One AI API Key since 8 Oct 2026.

xAI documents tools, vision, reasoning, structured output and prompt caching for it, and it reads images as well as text.

It costs $1.40 per million input tokens and $4.20 per million output tokens, so output is 3× the input rate. That is 30% below the market rate of $2 input and $6 output per million tokens, the lowest public price we found at other API gateways. On the use cases below, output makes up 15% of the bill for research, 15% for tool calling and 1% for long context, so trimming the context you send saves more than capping the answer.

Cached input bills at $0.50 per million tokens, 64% below the standard input rate, which pays off when the same system prompt or documents go out on every request.

Above 200k prompt tokens, every token of the request bills at 2× these rates: one 300k-token prompt with a 2k-token answer costs $0.8568, while 200k tokens with the same answer cost $0.2884. Splitting large inputs below the threshold keeps the base rates.

It is served through the OpenAI-compatible format at https://api.oneaiapikey.com/v1, so any SDK or tool that lets you set a custom base URL, for example Codex CLI, Cursor and Cline, can use it. It is not offered on the Anthropic Messages endpoint; pick an Anthropic-format model for Claude Code.

Use Grok 4.7 with any balance.

Grok 4.7 is a paid model: any balance above $0 pays for it, the $10.00 sign-up credit included. When it runs out, add credit to your wallet. Every request is billed at the rates above, with a receipt in your usage log.

Grok 4.7 is developed by xAI. Model names and trademarks belong to their owners. One AI API Key is an independent API gateway and is not affiliated with, endorsed by or sponsored by xAI.

New accounts$10 credit on sign-up
Claim $10 credit →