Grok 4.7
- Input / 1M tokens
- $2.00
- Output / 1M tokens
- $6.00
- Providers
- 2
- Uptime, 24 h
- 100%
API models · Side by side
Grok 4.7 and Claude Sonnet 5.5 both work with text and images. Grok has the lower base output price; Sonnet has twice the context allowance. For a coding assistant or document tool, the length of each request can change which costs less.
Consider Grok for shorter requests where output cost matters. Sonnet gives a large document collection more room and avoids the long-prompt price increase shown for Grok. If you need web or X search, compare the actual tool integration as well as the model.
Enter your own usage. We apply each model's current rates, including long-prompt pricing, for a 30-day month.
A token is roughly three-quarters of an English word. Cached input, reasoning tokens, tools and media are not included.
Compare context, supported inputs and usage costs. Highlighted rows show a difference.
| Feature | Grok 4.7 | Claude Sonnet 5.5 |
|---|---|---|
| Input formats | file, image, text | file, image, text |
| Output formats | text | text |
| Context / position limit | 500,000 | 1,000,000 |
| Endpoint output limit (tokens) | 450,000 | 128,000 |
| Developer features | Reasoning output, logprobs, Output limit, Reasoning controls, Thinking effort, Response format, Seed, Stop sequences, Structured output, Temperature, Tool selection, Tool calling, top k, top logprobs, Sampling controls | Reasoning output, Completion limit, Output limit, Reasoning controls, Thinking effort, Response format, Stop sequences, Structured output, Tool selection, Tool calling, Response length |
| Cached input / 1M tokens | $0.50 | $0.10 |
| Cache write / 1M tokens | Unknown | $2.50 |
| USD input / 1M tokens | $2.00 | $2.00 |
| USD output / 1M tokens | $6.00 | $10.00 |
| Available API providers | 2 | 5 |
| Best provider uptime, last 24 h | 100% | 100% |
| Model identifier | x-ai/grok-4.7 | anthropic/claude-sonnet-5.5 |
Prices are in USD per million tokens. Input is what you send; output is what the model generates. Chat subscriptions and API usage are billed separately.
Tools, images and additional reasoning can add charges. The examples below cover input and output tokens only.
Compare local modelsEach example uses the same token budget for both models. These are calculations, not measured workloads. Cache discounts, media, tools and extra reasoning are excluded.
| Workload | Grok 4.7 | Claude Sonnet 5.5 |
|---|---|---|
| 1,000 short requestsPer request: 2,000 input + 500 output tokens | $7.00 | $9.00 |
| 100 document summariesPer request: 20,000 input + 1,000 output tokens | $4.60 | $5.00 |
| 10 long-document requestsPer request: 300,000 input + 2,000 output tokens | $12.24 | $6.20 |
Estimate = requests × (input tokens × input price + output tokens × output price) ÷ 1,000,000. Long-prompt rates are applied where the pricing data provides them. Real requests can use different amounts of output.
At the base rates, both charge $2 per million input tokens. Grok charges $6 per million output tokens against Sonnet’s $10. For 1,000 requests with 2,000 input tokens and a 500-token answer each, that comes to $7 and $9. The saving grows with reply length, provided the request stays in the base pricing tier.
Grok’s higher prompt tier starts at 200,000 input tokens in the pricing used here. A 300,000-token prompt with a 2,000-token reply costs about $1.22 on Grok and $0.62 on Sonnet. These examples exclude caching and extra tools. Use the calculator for the size of each individual request; a month’s combined input does not trigger a long-prompt tier by itself.
Grok allows 500,000 context tokens; Sonnet allows 1,000,000. This matters when a repository, conversation and supporting documents must travel together. For smaller tasks, loading everything can waste money and bury the relevant material. Select the files the task needs, and leave room for the response rather than filling the whole allowance with input.
Grok’s developer API supports web search, X search and code execution. Selecting Grok in another application does not automatically switch those tools on. Decide whether the assistant needs current web material or only the documents you supply, then confirm which tools your chosen service exposes and charges for. This is especially relevant to a research assistant that must return traceable answers.
A useful coding comparison starts with the same issue, repository and allowed tools. Can the assistant make the change without breaking another requirement? Does it explain the edit clearly enough to review? Keep failed attempts in the cost calculation. The token-rate difference is easy to calculate; the value of an accepted patch needs evidence from the work you actually do.
No. This comparison uses the standard Grok 4.7 endpoint. The Fast service has different access arrangements and pricing.
A hosting endpoint can set a reply limit even when the model developer describes no separate text-output cap. The table shows the limits supplied by the compared endpoints; the total context allowance still applies.