Grok/Grok 4.7

-75%vs official

xAI Grok 4.7 targets coding, agentic tasks and knowledge work: a larger base model and longer reinforcement learning bring better self-verification and long-context management. Text and image input, about 500K tokens of context, always-on reasoning at three levels, function calling, structured output.

24-hour availability —Input $0.50/1MOutput $1.50/1MData privacy
View docs

Input

Output

Send a message on the left. The reply appears here.

Availability 24 hours

Hourly success rate of all completed requests to this site.

Loading…

Pricing

This model is priced by the usage dimensions listed here. Compare all pricing.

Prices are shown in USD. Charges depend on the model and your actual usage.

SpecBilling itemOur priceCurrent pricefal.aiOfficial priceSavings
Input ≤ 200K tokensInput$0.5/1M tokens$2/1M tokens$2/1M tokens75% cheaper than official75% cheaper than fal.ai
Cache read$0.125/1M tokens$0.5/1M tokens$0.5/1M tokens75% cheaper than official75% cheaper than fal.ai
Output$1.5/1M tokens$6/1M tokens$6/1M tokens75% cheaper than official75% cheaper than fal.ai
Input > 200K tokensInput$1/1M tokens$4/1M tokens$4/1M tokens75% cheaper than official75% cheaper than fal.ai
Cache read$0.25/1M tokens$1/1M tokens$1/1M tokens75% cheaper than official75% cheaper than fal.ai
Output$3/1M tokens$12/1M tokens$12/1M tokens75% cheaper than official75% cheaper than fal.ai

Reference prices checked on 2026-12-02: fal.ai · Official pricing

README

Grok 4.7

grok-4.7 is xAI's successor to Grok 4.6, with a larger base model for stronger self-verification. It reads text and images, holds about 500,000 tokens of context with a May 2026 knowledge cutoff, and always reasons at low, medium or high, with tool calls and JSON output.

Why Choose This?

Relate screenshots to logs
Combine screen captures, a failing request, a log excerpt, and related code in one investigation. Ask Grok to record which material supports each hypothesis and name a check that could distinguish it from the next plausible explanation.
Keep dependent material together
xAI lists a 500,000-token context window. When reviewing a specification or migration plan, retain the relevant chapters and revision history. Give them identifiers so affected callers, proposed changes, and acceptance checks can be traced back to the right source.
Hand work off through structured fields
The official model supports structured output and function calling. Where the interface exposes these capabilities, define the schema and allowed actions. Let your program validate the response and permission rules before handing an approved action to an existing system.

Parameters

ParameterRequiredDescription
modelstringRequiredModel ID to call. Use grok-4.7.
messagesarrayRequiredConversation history as a list of role and content messages.
system_instructionstringOptionalInstructions that set the assistant behavior.
temperaturenumberOptionalSampling temperature. Lower is more focused, higher is more varied. Default: 0.7.
top_pnumberOptionalNucleus sampling threshold. Default: 1.
max_tokensintegerOptionalMaximum number of tokens to generate.
streambooleanOptionalStream the reply as server-sent events. Default: false.
reasoning_effortenumOptionalReasoning Effort Options: low, medium, high. Default: medium.
response_formatobjectOptionalFormat of the returned result, such as a URL or base64 data.
toolsarrayOptionalTools
tool_choicestringOptionalTool Choice

How to Use

  1. Try it here first — Sign in and run the model in the playground above to check the output before you write code.
  2. Create an API key — Open Console → API Keys and create a key. The same key works for every model.
  3. Write your messages — Put the task and its context in the messages array; add a system prompt to set the assistant behavior.
  4. Set optional parameters — Adjust the optional parameters listed above to control the output.
  5. Send the request — Call POST /v1/chat/completions with the model ID grok-4.7.
  6. Read the reply — The reply and its token usage come back in the response and are logged in the console.

Writing Effective Prompts

Clear instructions get better answers. Tell the model who it is, what you need and how the answer should look.

1. Set the role and goal

Open with who the model should act as and what the task is. Put rules that never change in the system prompt.

You are a senior Python reviewer. Review the function below for bugs and readability.

2. Give the context

Paste what the answer depends on: documents, code, data or earlier decisions. Separate each part with a heading or tag.

3. Specify the output

Name the format, length and tone: a table, JSON with given keys, five bullet points, a 200-word summary.

4. Show an example

One or two input and output examples fix the style faster than a long description.

5. Iterate

When an answer misses, add the missing constraint to the prompt instead of starting over.

Prompt
WeakWrite about our product.
StrongYou are a B2B copywriter. Write three 40-word LinkedIn posts announcing our invoicing API for small accounting firms. Tone: confident, plain English, no emojis. End each post with a question.

Pricing

Billing itemPriceOfficial price
Input · 0_200k$0.50 per 1M tokens$2.00 / 1M tokens
Cache read · 0_200k$0.125 per 1M tokens$0.50 / 1M tokens
Output · 0_200k$1.50 per 1M tokens$6.00 / 1M tokens
Input · 200k_plus$1.00 per 1M tokens$4.00 / 1M tokens
Cache read · 200k_plus$0.25 per 1M tokens$1.00 / 1M tokens
Output · 200k_plus$3.00 per 1M tokens$12.00 / 1M tokens

That is 75% below the official list price.

Prices are shown in USD. Charges depend on the model and your actual usage. Compare all pricing

Best Use Cases

  • Investigate a visual regressionGive Grok screenshots of the expected and observed interface together with component states and the intended rules. Ask it to locate each visible difference and link it to a check that an engineer can run.
  • Review API release riskProvide both revisions of an API contract and a diagram showing its callers. Ask for affected clients, version requirements, and compatibility tests to add. Keep a separate list of callers whose behavior cannot be inferred from the available material.
  • Assemble an incident timelineGive Grok a bounded set of logs with timestamps and request identifiers, plus a screenshot of the failure. Ask it to separate observations from explanations and propose an order for testing the two or three most plausible causes.
  • Turn a technical review into a backlogSupply meeting notes, team ownership, and phased milestones. Request source references for decisions and tasks with a clear owner and verification step. Keep unresolved questions in a distinct field so they can be routed before work starts.

Pro Tips

  • Keep evidence locatable — Number the log regions, screenshots, and excerpts, then use those identifiers in the result. Manually audit a few high-impact conclusions before building the output format into an automated workflow or handing it to another team.
  • Compare effort on a fixed test set — xAI lists low, medium, high, and xhigh, with high as the official default. Keep source material and scoring fixed, then compare which levels return verifiable findings within the response time the workflow can tolerate.
  • Scope the material to the investigation — Select log ranges and document pages by relevance. Retain context that could change the decision, then use the reported usage to validate the cost of long requests and set a budget for the review.

FAQ

What is Grok 4.7?

grok-4.7 is xAI's successor to Grok 4.6, with a larger base model for stronger self-verification. It reads text and images, holds about 500,000 tokens of context with a May 2026 knowledge cutoff, and always reasons at low, medium or high, with tool calls and JSON output.

How do I call the Grok 4.7 API?

Send POST /v1/chat/completions with the model ID grok-4.7 and your API key. Ready-to-run samples are in the API section above.

How is billing calculated?

Charges are based on the selected model, its billing method, and your actual usage.

Where do I get an API key?

Create one in Console → API Keys. The same key works for every model on the gateway.

Can I use the output commercially?

Yes. You can use what you generate in commercial projects, subject to the model provider’s terms.

About Grok 4.7 on DreamTo

grok-4.7 is xAI's successor to Grok 4.6, with a larger base model for stronger self-verification. It reads text and images, holds about 500,000 tokens of context with a May 2026 knowledge cutoff, and always reasons at low, medium or high, with tool calls and JSON output.