Grok 4.7 Released, One Million Tokens of Input Cost Only $2

SpaceXAI has launched Grok 4.7, focusing on long-running programming tasks, agents, and professional knowledge work. The new model enhances long-task training, self-verification, and long-context processing capabilities. API pricing remains $2 per million input tokens and $6 per million output tokens.
Grok 4.7 Officially Released: This Time, It’s Not Competing on Chat—it’s Focused on Code and Long-Running Tasks
On September 22, SpaceXAI officially released Grok 4.7, with a very clear positioning: a flagship model for programming, agents, and professional knowledge work.
This is not a major “chat capability upgrade” aimed at ordinary users, but a more engineering-oriented iteration. SpaceXAI focused its training on complex tasks that require continuous execution for hours, including large codebase analysis, software development, document generation, data research, and multi-step work in professional roles.
Pricing is the figure developers are most likely to remember from this release: $2 per million input tokens and $6 per million output tokens. This is the same pricing as Grok 4.6, but the company says Grok 4.7 is more capable on complex tasks and offers greater execution efficiency than comparable models.
In other words, SpaceXAI chose not to package the new model as a more expensive “flagship-only version.” Instead, it has kept Grok 4.7 within a price range that developers can call frequently.

The Focus Is Not “Can It Write Code?” but Whether It Can Finish the Task
The programming capabilities of previous generations of large models often looked impressive in demonstrations: give the model a requirement, have it generate several hundred lines of code, and then provide a seemingly reasonable explanation. But once the task entered a real engineering environment, problems quickly emerged—insufficient context, inconsistent modifications, contradictions in the logic, or the model beginning to “confidently make things up” after completing the first step.
Grok 4.7 is designed specifically to address these issues.
Compared with Grok 4.6, the main upgrades in the new model focus on three areas:
- A larger base model: SpaceXAI says Grok 4.7 uses a larger foundation model than its predecessor, providing greater capacity for code understanding, professional knowledge, and long-context tasks.
- Longer reinforcement-learning training: The training data and task design focus more heavily on complex work that requires hours of continuous execution, rather than one-off questions or single-turn code completion.
- Stronger self-verification capabilities: The model more proactively checks its intermediate results and final outputs, reducing situations in which “the first step was wrong and everything afterward was built on top of that error.”
These three changes point toward the same goal: transforming the model from a “code generator” into something more like an engineering agent capable of sustained collaboration.
In real-world development, a useful model cannot merely write functions. It also needs to understand project structure, identify dependencies, modify multiple files, run tests, analyze error logs, and then roll back or refactor based on test results. The longer the task, the more easily early mistakes are amplified. Therefore, maintaining a consistent objective over an extended period and performing self-checks at critical points are more important than producing impressive code in a single generation.
Grok 4.7’s training direction is clearly closer to this type of workflow.
CursorBench 4.0: Long-Task Capabilities Are Becoming the New Battleground
SpaceXAI highlighted CursorBench 4.0 in its release announcement. This benchmark focuses more on programming tasks that run for extended periods. It measures not only whether a model can produce a correct piece of code, but also its stability across multiple rounds of modification, tool calls, and continuous debugging.
The company says Grok 4.7 ranks among the leading models in its class on CursorBench 4.0 in terms of price and performance. Some publicly available materials also indicate that Grok 4.7 has surpassed certain similarly positioned models in long-horizon programming evaluations, trailing only a small number of top competitors. However, these third-party comparisons involve different versions, execution configurations, and reasoning tiers. Development teams should not choose a production model based on a single leaderboard.
What is more noteworthy is that Grok 4.7’s API pricing has not increased alongside its capabilities.
For AI programming tools, price is not simply a procurement metric. A real-world coding task typically generates a large amount of context: repository structure, dependency files, error logs, test output, historical modification records, and intermediate results generated by the model itself. If the model needs to be called a dozen or even dozens of times, the per-token price directly affects product margins and the frequency with which users can use the tool.
Therefore, what developers truly care about is often not “how much does each million tokens cost,” but how much an entire task ultimately costs, how many rounds of rework are required, and how long delivery takes.
Grok 4.7’s advantage lies in its attempt to reduce all three variables simultaneously:
- The input price remains at $2 per million tokens;
- The output price is $6 per million tokens;
- Longer training and self-verification reduce ineffective calls and repeated rework.
If it can reliably deliver these capabilities on real-world codebases, Grok 4.7 is more likely to become part of the daily development loop rather than merely occupy a position on evaluation leaderboards.
Long Context Is No Longer Just About “Fitting in More Text”
Publicly available information shows that Grok 4.7 offers a standard 256K context window and can support up to approximately 500K tokens of context. Beyond simply expanding the window, the more important question is whether the model can make effective use of all that content.
A context window is like a conference room: making the room larger does not mean the participants will remember everything everyone has said. For coding tasks, the model needs to locate the truly relevant files, call chains, and constraints among hundreds of thousands of tokens of information, while avoiding distraction from irrelevant content.
Grok 4.7 has been optimized for long-context management, with target scenarios including:
- Handing part of a large codebase directly to the model for analysis;
- Reading lengthy technical documents, requirement specifications, and API standards;
- Comparing multiple contracts, reports, or internal knowledge-base materials;
- Retaining task objectives and state during extended agent execution;
- Continuing to advance a task based on conversation history, tool results, and test logs.
However, developers should note that a 500K context does not mean that “an entire company’s knowledge base can be stuffed into a single prompt.” Large contexts bring higher latency, increased costs, and more retrieval noise. A more reasonable approach is still to combine code indexing, retrieval augmentation, file summarization, and phased execution to send the most relevant information to the model.
Grok 4.7’s long-context capabilities are suitable for solving problems in which “the model needs to see more context to get the answer right,” but they cannot replace context management on the engineering side.
Expanding from Programming to Professional Knowledge Work
Grok 4.7 is not limited to code editors. SpaceXAI says the new model has also been optimized for documents, presentations, and general knowledge work, achieving improvements over Grok 4.6 on the GDPval and AA Briefcase tests.
These two tests cover everyday tasks performed by professionals such as lawyers, nurses, and financial analysts. They evaluate whether the model can organize materials, analyze information, draft documents, and provide decision support.
These tasks are clearly different from traditional knowledge-based question answering. Users are not asking the model for a single fact; they want it to produce a usable work product based on a collection of materials, such as:
- Organizing dozens of pages of material into a decision brief;
- Generating an analysis report and risk alerts based on financial data;
- Drafting proposed contract revisions according to legal provisions and business context;
- Breaking product requirements down into development tasks, acceptance criteria, and test cases;
- Organizing research findings into a presentation structure and providing the core point for each slide.
SpaceXAI says Grok 4.7’s results on GDPval and AA Briefcase are already approaching those of other frontier models. This claim is more credible than saying it “comprehensively surpasses all competitors,” and is also more consistent with the current state of model competition: the gap among leading models is shifting from general question-answering capabilities toward stability, cost, and tool-collaboration capabilities within specific workflows.
Native Training with the Grok Bot Harness Signals Greater Emphasis on Agent Execution
Another noteworthy change is that SpaceXAI natively trained Grok 4.7 for the Grok Bot harness.
Simply put, a harness can be understood as the “workbench” in which a model performs tasks. It typically includes tool calling, file reading and writing, terminal operations, browser interaction, task-state management, and result transmission. No matter how intelligent the model itself is, it will still struggle to complete complex tasks if it cannot use the workbench correctly.
Training for a specific harness means that SpaceXAI is no longer treating Grok 4.7 merely as a model that accepts text input and returns text output. Instead, it is training the model within a more complete agent environment. This affects how the model decomposes tasks, when it calls tools, how it handles errors, and when it should stop execution and ask the user for confirmation.
For developers, the value of this type of training is typically reflected in several details:
- Can it inspect the project structure first and then decide which files to modify?
- Can it adjust its approach based on errors returned by tools instead of repeating the same operation?
- Can it request confirmation before performing high-risk actions?
- Can it distinguish between “the task is complete” and “it has merely generated a result that looks reasonable”?
- Can it maintain a clear execution state during long-running tasks?
This is also why SpaceXAI emphasizes that Grok 4.7 can continue working on difficult tasks for longer periods. The issue is not whether the model can think for a few more seconds, but whether it can maintain its direction throughout multi-step execution.
Safety Capabilities: Fewer False Refusals, but More Caution with High-Risk Prompts
On the safety front, SpaceXAI has adopted a new safety framework for Grok 4.7 and says that the model has achieved the company’s highest performance to date in its internal testing on refusal behavior and resistance to jailbreak attacks.
The focus of this update is not simply to “refuse everything,” but to find a balance in dual-use domains.
For example, in cybersecurity tasks, users may need the model to analyze malware samples, fix vulnerabilities, write detection rules, or simulate attack paths. These tasks can have legitimate defensive value, but the same knowledge may also be used to compromise real systems. Therefore, the model should neither refuse all security-related questions indiscriminately nor provide unrestricted attack instructions that can be directly abused.
Grok 4.7 achieved a score of 62.4% on the LATCHBio biosafety benchmark. For cybersecurity, SpaceXAI says that the model allowed only 3.3% of high-risk dual-use prompts to pass in the HackerBench v0.3 test, while reducing the blocking of legitimate security work.
These figures still need to be interpreted in conjunction with the test sets, scoring methods, and actual product policies; they cannot be directly equated with the model being “absolutely safe.” However, from a product-positioning perspective, SpaceXAI clearly hopes that Grok 4.7 can be used in more professional development and security-research environments rather than serving solely as a chat service for ordinary users.
The API Is Now Available: How Developers Can Integrate It
Grok 4.7 is currently available through Cursor, Grok Build, and the Grok API. Development teams that need to switch between multiple models can also use OpenAI Hub to access an OpenAI-compatible API, placing Grok, GPT, Claude, Gemini, DeepSeek, and other models within the same calling logic for testing.
Below is a basic example using an OpenAI SDK-compatible style. The specific model name and gateway address should be based on what is displayed in the OpenAI Hub console:
from openai import OpenAI
client = OpenAI(
api_key="YOUR_OPENAI_HUB_API_KEY",
base_url="https://api.openai-hub.com/v1"
)
response = client.chat.completions.create(
model="grok-4.7",
messages=[
{
"role": "system",
"content": "You are a senior software engineer. Analyze the problem first, then provide an actionable solution."
},
{
"role": "user",
"content": "Please review this code, identify potential concurrency issues, and provide recommendations for modification."
}
],
temperature=0.2
)
print(response.choices[0].message.content)
For code agents, it is not advisable to place the entire repository into the request from the outset. A more reliable approach is to execute the task in phases: first have the model understand the directory structure, then retrieve the relevant files, carry out modifications and testing, and finally ask the model to summarize the changes and conduct an independent review.
A typical task pipeline might be:
- Read the project entry points and dependency configuration;
- Locate the relevant modules based on the error or requirement;
- Extract the necessary functions, types, and test files;
- Have the model propose a modification plan;
- Apply the changes and run the tests;
- Return the test output to the model;
- Have the model check for potential regressions.
Although this approach requires more engineering orchestration, it is generally cheaper than sending a large amount of context all at once and makes risk easier to control.
Our Assessment: Grok 4.7’s Value Lies in Being “Capable Enough and Affordable to Use”
The most noteworthy aspect of Grok 4.7 is not that SpaceXAI has once again claimed it is “the most powerful,” but that it has shifted the focus of competition toward metrics developers actually calculate: task completion rate, stability during long-running execution, output speed, and the cost of each task.
Its positioning is also relatively clear. Grok 4.7 is not a model focused solely on conversational style or knowledge-based question answering. Instead, it is attempting to become an executor within codebases, documents, tool calls, and professional workflows.
At $2 per million input tokens and $6 per million output tokens, it has the potential to enter high-frequency usage scenarios. In tasks such as code review, log analysis, requirement decomposition, automated testing, and internal knowledge-base question answering, development teams typically do not call the model just once; they need sustained, multi-round interaction. Keeping prices unchanged is itself a competitive product strategy.
However, it is not without risks.
First, the official test data still comes primarily from SpaceXAI, and third-party conclusions may differ under different configurations. Second, long contexts and long-running agent execution can amplify errors. Once the model makes an incorrect judgment early on, subsequent calls may simply execute that error more thoroughly. Third, Grok 4.7’s performance in professional knowledge work will ultimately depend on whether it can integrate with enterprise permissions, data isolation, auditing, and tool-calling systems.
Therefore, developers should treat Grok 4.7 as a new leading candidate worth incorporating into their evaluation matrix rather than immediately replacing all existing models with it after launch.
Testing can begin with three categories of tasks:
- Long-running code repair and automated testing;
- Structured processing of lengthy documents, technical materials, and requirement specifications;
- Internal agent tasks requiring multiple rounds of tool calls.
If it can complete these tasks with less rework, then the price of “$2 per million tokens” will have real significance. Competition among large models has shifted from “whose leaderboard score is highest” to “who can complete a task reliably at lower cost.” Grok 4.7 is clearly betting on the latter direction.
References
- ITHome: SpaceXAI Releases Grok 4.7, Focused on Coding and Knowledge Processing — Covers Grok 4.7’s official positioning, training methods, benchmark results, safety capabilities, and product integration information.
- Zhihu: Analysis of Programming, Agent, and Cost Considerations for Grok 4.6 and Subsequent Models — Provides supplementary background information on the context window, API pricing, and the cost of long-running tasks.



