Back to Models
x-ai logo
grok-4.7

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...

9/21/2026
500,000 tokens
Input: ¥276.2/M
Output: ¥828.6/M

Specifications

Modalities

Input
text
image
file
Output
text

Supported Parameters

include_reasoning
logprobs
max_tokens
reasoning
reasoning_effort
response_format
seed
structured_outputs
temperature
tool_choice
tools
top_logprobs
top_p

Max Output Tokens

450,000

Reasoning Configuration

Default
Thinking on (effort: high)
Selectable effort levels
xhigh
high
medium
low
Turning thinking off
Not possible (always thinks)

How to control thinking, and what it costs

Data policy

Prompt retention
Unknown — we could not confirm
Training
Not used for training

"Unknown" does not mean "safe". It means we could not confirm it.

Whether a provider trains on prompts is a declared value from our terms with them. Retention is determined from the upstream listing for every host this model can reach. Neither is guessed.

Code Examples

curl https://api.fastmetal.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "grok-4.7",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

How Grok 4.7 actually answers

Real responses to our standard prompts, recorded on FastMetal.

Count the number of 'r's in 'strawberry'

Count the number of 'r's in 'strawberry'. Explain your reasoning step by step.

The word "strawberry" consists of the letters S-T-R-A-W-B-E-R-R-Y. - The 3rd letter is R. - The 8th letter is R. - The 9th letter is R. This gives a total of 3 R's.
4.7s response299 output tokens

Debug This Error

I'm getting the following error in my Node.js application: TypeError: Cannot read properties of undefined (reading 'map') at UserList (/app/components/UserList.js:12:25) at renderWithHooks (/app/node_modules/rea…

The error happens because `users` is `undefined` when `UserList` renders, so calling `.map` on it fails. That usually means the parent rendered `<UserList />` (or `<UserList users={undefined} />`) before data was loaded, or the prop name doesn’t match. **Fix it in the component** so it tolerates a missing list: ```jsx function UserList({ users = [] }) { return ( <ul> {users.map(user => <li key={user.id}>{user.name}</li>)} </ul> ); } ``` Or guard the call: ```jsx function UserList({ users }) { return ( <ul> {(users ?? []).map(user => <li key={user.id}>{user.name}</li>)} </ul> ); } ``` **Also check the parent** so you pass an array once data exists: `…
12.8s response393 output tokens

Code Review

Please review the following Python function and suggest improvements for readability, performance, and best practices: def get_data(url, retries=3): import requests import time for i in range(retries):…

## Review The function works for the happy path, but it hides failures, retries the wrong errors, and is harder to read and debug than it needs to be. ### Issues 1. **Imports inside the function** — move them to module level unless you have a strong reason (circular imports, optional dependency). 2. **Bare `except`** — swallows `KeyboardInterrupt`, `SystemExit`, and programming bugs. Catch specific exceptions. 3. **Retries non-retryable failures** — 4xx (except maybe 429) will not succeed on retry. Network errors and 5xx are the usual candidates. 4. **Sleeps after the last attempt** — wastes up to 2 seconds before returning `[]`. 5. **Unused loop variable** and vague names (`r`, `i`). 6.…
22.3s response1525 output tokens

Compare these answers side by side with other models →

Frequently asked questions

How much does the Grok 4.7 API cost?
On FastMetal, Grok 4.7 is billed per token in yen: ¥276.2 per 1M input tokens and ¥828.6 per 1M output tokens, before tax. Usage is drawn from a prepaid balance; there is no subscription or monthly fee.
Can I call Grok 4.7 with the OpenAI SDK?
Yes. Point base_url at https://api.fastmetal.ai/v1 and pass "grok-4.7" as the model; existing OpenAI-style code works unchanged, including streaming, tool calls and structured output.
What is the context window of Grok 4.7?
500,000 tokens, shared between the prompt and the response.
What do I need to try Grok 4.7?
Create an account and add credit; the model is then available both in the browser chat and over the API. There is no contract or minimum spend.

Try Grok 4.7 right now

Grok 4.7 is available on FastMetal through one API key. Start in the browser, or call it from the OpenAI SDK.