Grok 4

Grok 4.7

by xAI · Current; available through the xAI API, Grok Build, Cursor, and selected model gateways.

Grok 4.7 is xAI’s current model for coding, long-context reasoning, agentic workflows, and professional knowledge work. It accepts text and images, produces text, and supports configurable reasoning, function calling, web and X search, code execution, structured outputs, streaming, and automatic prompt caching. Its 500,000-token context window is paired with higher pricing for prompts above 200,000 tokens.

Text Reasoning Coding
Grok 4.7 is xAI’s flagship general-purpose model for coding, long-context reasoning, and tool-driven work. It accepts text and images, returns text, and supports configurable reasoning effort from low to xhigh. Developers can use function calling, web search, X search, code execution, structured outputs, streaming, and automatic prompt caching through xAI’s APIs. Its 500,000-token context window makes it suitable for large codebases, lengthy documents, and multi-step workflows, although long prompts cost more and the model does not have a documented maximum output-token limit.
Outputs

What Grok 4.7 can produce

Text
Inputs

What it can understand

Text Images Multimodal input
Capabilities

Supported features

Tool use Web search Streaming Structured output Prompt caching
Model profile

Performance characteristics

9/10 Reasoning
9/10 Coding
8/10 Speed
8/10 Cost efficiency
Specifications

Technical details

Model family Grok 4
Model type Reasoning
Context window 500K tokens
Knowledge cutoff May 2026
Release date 2026-09-21
Status Current; available through the xAI API, Grok Build, Cursor, and selected model gateways.
Knowledge cutoff notes

xAI's current model catalog lists May 2026 as the knowledge cutoff. Web search and X search can provide newer information during use but do not change the underlying cutoff.

Model notes

Canonical API identifier is grok-4.7. The model accepts text and image input and produces text-only output. It supports low, medium, high, and xhigh reasoning effort, with high documented as the default. Supported tools include function calling, web search, X search, and code execution. Structured outputs are supported, but a separate legacy JSON-mode capability was not independently verified. Prompt caching is automatic and can be improved with a stable conversation identifier or prompt cache key. The public model detail page states that Batch API is not supported. Responses API calls always include encrypted reasoning content. A faster Grok 4.7 variant is offered in Cursor and Grok Build but is not a separate public xAI API model. Editorial scores are comparative estimates rather than provider-published ratings.

Cost

Model pricing

Input $2.00 per 1 million input tokens below 200,000 prompt tokens; $0.50 per 1 million cached input tokens; $4.00 per 1 million input tokens above 200,000 prompt tokens; $1.00 per 1 million cached input tokens above 200,000 prompt tokens.
Output $6.00 per 1 million output tokens below 200,000 prompt tokens; $12.00 per 1 million output tokens above 200,000 prompt tokens.
Model guide

Grok 4.7: xAI’s Long-Context Reasoning Model for Coding and Agents

Grok 4.7 is xAI’s current frontier model for software engineering, agentic workflows, research, and professional knowledge work. It combines a 500,000-token context window with configurable reasoning, image understanding, tool calling, web and X search, code execution, structured outputs, and automatic prompt caching. It produces text only, and its API pricing increases for prompts above 200,000 tokens.

What is Grok 4.7?

Grok 4.7 is xAI’s current frontier model for coding, agentic tasks, research, and professional knowledge work. Its canonical xAI API identifier is grok-4.7. The model is intended for tasks that benefit from extended reasoning, large working contexts, image understanding, and access to external tools.

In practical terms, Grok 4.7 can analyze a long document or codebase, reason through a multi-step problem, call an application-defined function, search the web or public X information, and return a text response or structured result. It is available through xAI’s Responses API and Chat Completions API, as well as through Grok Build, Cursor, and selected third-party model gateways.

The specifications described here come from xAI’s supplied model documentation and catalog. Ratings such as “high” for coding or speed are editorial assessments rather than scores published by xAI.

Where Grok 4.7 fits in xAI’s lineup

Grok 4.7 is identified in the supplied research as the current assistant and model generation in xAI’s ecosystem. It is the main model choice for demanding API work where reasoning depth, context capacity, and tool use matter more than the lowest possible price or latency.

A faster Grok 4.7 variant is available in some products, including Cursor and Grok Build, but xAI does not expose that variant as a separate public API model identity. Consequently, developers using the public xAI API should treat grok-4.7 as the documented model rather than assuming that the faster product variant is independently selectable.

Grok 4.7 should also be distinguished from the consumer Grok service. The consumer product can provide features such as voice, image generation, and video generation, but the model described on this page has text-only output. Its documented model-level capabilities should not be expanded to include every capability available somewhere in the wider Grok product.

Input, output, and core specifications

Grok 4.7 accepts text and image input and produces text output. Images can therefore be analyzed alongside written instructions, but the model does not natively generate images, audio, or video.

SpecificationDocumented detail
Model IDgrok-4.7
ProviderxAI
Model typeReasoning model
Context window500,000 tokens
InputText and images
OutputText only
Reasoning effortLow, medium, high, and xhigh
Default reasoning settingHigh, according to the supplied API documentation
StreamingSupported
Maximum output tokensNot documented in the supplied research

A 500,000-token context window is useful for keeping substantial material available during one request or conversation. Possible examples include a large repository, a collection of technical documents, a lengthy contract, or a research package that would otherwise need to be divided into many smaller prompts. The context limit is not the same as an output limit: xAI’s supplied information does not verify a fixed maximum number of tokens that Grok 4.7 can generate in one response.

Reasoning and coding capabilities

Grok 4.7 exposes four reasoning-effort levels: low, medium, high, and xhigh. Reasoning effort is a control over how much deliberation the model applies before producing an answer. Lower settings can be appropriate for simpler or latency-sensitive tasks, while higher settings are intended for difficult analysis, planning, debugging, and multi-step execution. The supplied documentation identifies high as the default setting.

The model is particularly oriented toward software engineering. It can help explain unfamiliar code, propose changes across multiple files, diagnose errors, write tests, refactor implementations, and participate in coding agents that use tools. Its large context window is relevant when a task depends on relationships spread across many files or documents rather than on a short code fragment.

These capabilities do not guarantee correct code. Generated patches still need testing, dependency checks, security review, and execution in an appropriate environment. Grok 4.7 is better suited to workflows that can validate its output than to unattended deployment of unreviewed changes.

Tools, search, and structured results

Grok 4.7 supports function calling, which allows an application to describe operations that the model may request, such as looking up an account, querying a database, or starting a workflow. The application remains responsible for deciding whether to execute each requested operation and for returning the result to the model.

The model also supports xAI’s documented server-side tools:

  • Web search: retrieves current web information when the relevant tool is explicitly enabled.
  • X search: provides access to current public information from X when enabled.
  • Code execution: supports workflows that require computation or programmatic analysis.

Search is not an automatic replacement for verification. Grok 4.7’s underlying knowledge cutoff is listed as May 2026 in the supplied model catalog, while web and X search can provide newer information during a request. Current-information answers therefore depend on enabling the appropriate tools and evaluating the quality of the retrieved sources.

Structured outputs are supported, allowing developers to request results that conform to a specified structure rather than relying on prose parsing. The research confirms structured outputs but does not independently verify a separate legacy JSON-mode capability. Applications that need reliable machine-readable responses should use the documented structured-output mechanism.

Pricing and prompt caching

Grok 4.7 uses token-based API pricing. For requests below the 200,000-prompt-token threshold, the documented rates are:

  • Input: $2 per million tokens
  • Cached input: $0.50 per million tokens
  • Output: $6 per million tokens

When a request exceeds 200,000 prompt tokens, the higher rates are:

  • Input: $4 per million tokens
  • Cached input: $1 per million tokens
  • Output: $12 per million tokens

The threshold applies to prompt length, not merely to the amount of text returned. A very large context can therefore increase both input and output rates for the request. The model’s large context window is useful, but it should not be treated as cost-free storage for every available document.

Automatic prompt caching can reduce the cost of repeated input. Developers can improve cache-hit consistency by using a stable conversation identifier or prompt cache key, particularly when a workflow repeatedly sends the same instructions, reference material, or system context. Cache behavior and pricing should still be checked against xAI’s current documentation before production deployment.

The supplied research states that the dedicated model detail page does not support the Batch API. This makes Grok 4.7 less suitable for workloads designed around documented batch processing, even though it supports streaming for interactive API calls.

Main strengths and limitations

Where Grok 4.7 is strong

  • Long-context work: The 500,000-token window can accommodate large codebases, document collections, and extended task context.
  • Configurable reasoning: Four effort levels let developers trade response depth against latency and resource use.
  • Software engineering: Coding, debugging, code analysis, and agentic development are central use cases.
  • Tool-driven workflows: Function calling, search, and code execution support multi-step applications.
  • Image-aware analysis: The model can interpret images while responding in text.
  • Current-information workflows: Web and X search can supplement the model’s underlying knowledge.

Important limitations

  • Text-only output: It does not natively produce images, audio, or video.
  • Long-context price increase: Requests above 200,000 prompt tokens use higher input and output rates.
  • No documented batch support: The supplied model detail page states that the Batch API is not supported.
  • Undocumented output ceiling: A maximum output-token limit was not verified in the supplied research.
  • Tools require configuration: Web search, X search, code execution, and application functions must be enabled and integrated as appropriate.
  • Accuracy still requires review: Search access and reasoning do not eliminate incorrect, incomplete, or poorly contextualized answers.

When to choose Grok 4.7

Choose Grok 4.7 when the task combines substantial context with reasoning and actions. It is a good fit for a coding agent that needs to inspect many files, a research assistant that can search the web or X, a document workflow that must extract structured fields, or a business process that calls external functions during a conversation.

It is also a sensible choice when the same workflow needs adjustable reasoning effort. A simple classification or short transformation may not require xhigh reasoning, while a difficult debugging or planning task may benefit from a higher setting. This flexibility can help balance quality, speed, and cost within one model family.

Another model or service may be more appropriate when the primary requirement is native image, audio, or video generation, when a documented batch-processing workflow is essential, or when the application prioritizes the lowest latency and simplest short-prompt economics over a large context window. A faster Grok 4.7 variant may be available inside products such as Cursor or Grok Build, but it is not documented as a separate public xAI API model.

Practical assessment

Grok 4.7 is best understood as a text-generating reasoning model with image input, a very large context window, and an unusually broad set of supported tools. Its value is highest in workflows where the model must understand a large amount of material, reason through a complex task, and interact with external information or software.

The main trade-off is that these capabilities do not make it universally optimal. Long prompts become more expensive above 200,000 tokens, batch support is not documented, output is text-only, and production systems still need safeguards around tool execution and factual accuracy. For developers who can manage those constraints, Grok 4.7 offers a strong combination of long-context analysis, configurable reasoning, coding support, and agentic integration through xAI’s API.


Answers to Frequently Asked Questions

Does Grok 4.7 generate images, audio, or video?
No. Grok 4.7 accepts text and image inputs but produces text-only output. It does not natively generate images, audio, or video.
How much does the Grok 4.7 API cost?
For requests with fewer than 200,000 prompt tokens, pricing is $2 per million input tokens, $0.50 per million cached input tokens, and $6 per million output tokens. Above 200,000 prompt tokens, the rates increase to $4 per million input tokens, $1 per million cached input tokens, and $12 per million output tokens.
What can Grok 4.7 be used for?
Grok 4.7 can be used for software development, debugging, code explanation, refactoring, test generation, research, document analysis, structured data extraction, and tool-driven agents. It supports function calling, web search, X search, and code execution when those tools are enabled.
What is Grok 4.7?
Grok 4.7 is xAI’s reasoning model for coding, agentic tasks, research, and professional knowledge work. Its public API identifier is `grok-4.7`, and it supports long-context analysis, image understanding, tool use, and structured outputs.
How large is Grok 4.7’s context window?
Grok 4.7 has a documented context window of 500,000 tokens. This allows it to work with large codebases, document collections, contracts, or research materials in a single request or conversation.


Sources 8
Provider

About xAI