xAI: Grok 4.7

xAI/grok-4.7

xAI Grok 4.7 API pricing

Grok 4.7 costs $0.800 per million input tokens and $2.40 per million output tokens on Oxyy. These are the pay-as-you-go prices after the current 60% discount (Launch Promo; standard price $2.00 input and $6.00 output), and cached input tokens are billed at $0.200 per million. It accepts text, images and files and returns text, with a 500K-token context window and up to 450K output tokens per response. A cheaper xAI option is Grok 4.20 (0309) Non-Reasoning at $0.500 / $1.00 per 1M tokens; for every model and rate, see Grok API pricing.

Grok 4.7 is SpaceXAI's flagship model for coding, agentic tasks, and knowledge work, succeeding Grok 4.6. It is particularly strong at long-running software engineering tasks, verifying its own work, and...

ModalitiesTextImageFileText
Price$0.800 / $2.40 per 1M tokens in / outAll Grok API pricing
Context500K
ReleasedSep 21, 2026

Providers

Where this model runs, and what each route costs. Requests are sent to a healthy provider automatically; if one errors, the gateway retries against another serving the same model.

ProviderInput /MOutput /MCache read /MLatencyThroughput
xAI$0.800$2.40$0.20034.78s129 tps

Supported parameters (13)

include_reasoninglogprobsmax_tokensreasoningreasoning_effortresponse_formatseedstructured_outputstemperaturetool_choicetoolstop_logprobstop_p

A parameter not listed here may be removed before the request reaches the model. When it is, the request still succeeds and the response names it, with the reason, in provider_specific_fields.dropped_params.

Pricing

What this model costs on Oxyy, pay as you go. "Charged" is the rate a request is billed at; the standard price is shown beside it for reference.

Input price
$0.800
per 1M input tokens · standard price $2.00
Output price
$2.40
per 1M output tokens · standard price $6.00
RateStandard priceChargedUnit
Input$2.00$0.800per 1M input tokens
Output$6.00$2.40per 1M output tokens
Cached input$0.500$0.200per 1M cached input tokens

Discount. Charged rates include the current "Launch Promo" discount of 60% on every rate.

UTC

Specifications

Model ID
grok-4.7
Developer
xAI
Type
Text
Input
Text, images and files
Output
Text
Context window
500,000 tokens
Max output
450,000 tokens
Released
Sep 21, 2026
Tokenizer
Grok
Image input
Up to 20 MB each
File input
Up to 100 MB each
Endpoint
/v1/chat/completions

Quickstart

Call grok-4.7 with a POST to /v1/chat/completions on https://api.oxyy.ai, using your Oxyy API key from the OXYY_API_KEY environment variable. The same key works for every model in the catalog.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.oxyy.ai/v1",
    api_key=os.environ["OXYY_API_KEY"],
)

response = client.chat.completions.create(
    model="grok-4.7",
    messages=[
        {"role": "user", "content": "Explain unified AI APIs in one sentence."},
    ],
)
print(response.choices[0].message.content)

Performance

Throughput is how fast the model writes (tokens per second — higher is better). Latency is total round-trip time (lower is better). TTFT is time-to-first-token — how long before you see anything appear (lower is better). Throughput and TTFT are measured on streaming requests, which are the only ones with a first-token moment to time.

Throughput
129tok/s
P50, streaming requests
Latency
34.78s
P50, end to end
UTC

Throughput

P99143 tok/s
P95142 tok/s
P50129 tok/s

Latency

P5034.8s
P7560.7s
P9581.5s
P9985.6s

Time to first token

P501021ms
P951041ms

Cache hit rate

33.87%
Share of input tokens served from the prompt cache over the window.

Availability

The share of requests to this model that completed successfully over the last 30 days. Requests the caller cancelled, and requests still in flight, are not counted. When an upstream provider errors, the gateway retries against another provider serving the same model, so a single provider incident does not necessarily show up here.

Requests (30 days)
3
A success rate is shown from 100 completed requests
Days with traffic
1
of the last 30 days

Activity

Token volume and request traffic to this model over time. Daily totals, UTC.

Prompt32.9K
Reasoning2.3K
Completion (excl. reasoning)14.3K

Prompt tokens measure input size. Reasoning tokens show internal thinking before a response. They are part of the output, so the completion bars show the rest of it and each day’s bar is its total.

Frequently asked questions

What is Grok 4.7?
Grok 4.7 is SpaceXAI's flagship model for coding, agentic tasks, and knowledge work, succeeding Grok 4.6. It is particularly strong at long-running software engineering tasks, verifying its own work, and...
How much does Grok 4.7 cost?
Grok 4.7 costs $0.800 per million input tokens and $2.40 per million output tokens on Oxyy. These are the pay-as-you-go prices after the current 60% discount (Launch Promo; standard price $2.00 input and $6.00 output), and cached input tokens are billed at $0.200 per million. You pay per request, with no subscription.
What is the context length of Grok 4.7?
Grok 4.7 has a context window of 500,000 tokens, and can return up to 450,000 tokens in one response.
What inputs and outputs does Grok 4.7 support?
Grok 4.7 accepts text, images and files as input and returns text.
Which API endpoint does Grok 4.7 use?
Send a POST request to https://api.oxyy.ai/v1/chat/completions with "model": "grok-4.7", authenticated with your Oxyy API key. It is also served on /v1/responses (Responses API).
When was Grok 4.7 released?
Grok 4.7 was released on Sep 21, 2026.
What other models does xAI have?
xAI also offers Grok 4.20 (0309) Non-Reasoning, Grok 4.20 (0309) Reasoning, Grok 4.20 (0309) Multi-Agent and Grok 4.3 through Oxyy.

Alternatives to Grok 4.7

Models of the same kind from other vendors, closest in price first. Prices are pay-as-you-go on Oxyy, through the same API key.

Explore more models

More models from xAI