Short answer: “Claude 4” is not one specific model, so this comparison names Claude Opus 4.1 as the Claude 4 variant. For new direct API use, though, the original matchup is no longer available as it once was: xAI retired grok-4-0709 on May 15, 2026 and now redirects that model slug to Grok 4.3; Anthropic lists Opus 4.1 as retired on its own platforms, with exceptions for certain partner-managed cloud offerings. So there is no current, like-for-like direct API choice between the original models. For an existing deployment, check the behavior and terms of the specific cloud provider. For a new deployment, compare active model versions and test them on your workload.
Which models does “Grok 4 vs Claude 4” mean?
The name Claude 4 can refer to different models. To make the original comparison concrete, this article uses Grok 4 and Claude Opus 4.1—not every Claude 4 variant.
The historical API identifiers were grok-4-0709 for Grok 4 and, as reported in a version-specific comparison, claude-opus-4-1-20250805 for Claude Opus 4.1. Model IDs and availability are version- and platform-specific; the old identifiers should not be treated as an assurance that the original models are still served.
API availability changes the verdict
| Model | What the provider documentation says | What that means for an API decision |
|---|---|---|
Grok 4 (grok-4-0709) |
xAI retired this model on May 15, 2026. Requests to the old slug are redirected to Grok 4.3 and billed at Grok 4.3 rates. | Continuing to send requests to the old slug no longer means you are evaluating or receiving the original Grok 4. Choose an explicit active model and evaluate that version instead. |
| Claude Opus 4.1 | Anthropic’s pricing documentation marks Opus 4.1 as retired except on Claude Models on Google Cloud (Google-managed) and Amazon Bedrock. Those partner platforms set their own lifecycle schedules. | It is not a generally available option on Anthropic-operated platforms. If you use a partner platform, confirm its model ID, availability, and price with that provider. |
Practical verdict: For a new direct API integration, don’t choose between Grok 4 and Opus 4.1 as if both were active, unchanged options. If you have an existing deployment, verify which model is actually serving requests and what your platform bills. The provider retirement notices are more decision-relevant than older head-to-head reviews.
What do the prices mean now?
The old rates should not be read as current prices for a direct comparison:
- Grok 4: After the retirement date, xAI says requests using the retired
grok-4-0709slug are served as Grok 4.3 and billed at $1.25 per million input tokens and $2.50 per million output tokens. That is the redirected model’s price, not a current price quote for original Grok 4. - Claude Opus 4.1: Anthropic’s pricing table lists $15 per million input tokens and $75 per million output tokens, while marking Opus 4.1 retired except on the specified partner-managed platforms. Those listed amounts are not a universal current quote for partner-hosted usage.
For either legacy model on a partner platform, check that platform’s live price and model lifecycle documentation. Don’t mix consumer subscriptions, third-party aggregator rates, or historical API prices into a direct-provider comparison.
What did older comparisons say about capability?
Published comparisons gave differing, version-specific recommendations. One account favored Claude Opus 4.1 for coding precision and agentic work, and Grok 4 for live retrieval and tool-connected tasks. Another comparison tested Grok 4 against the different model Claude Opus 4.7 and favored Claude for coding and reasoning while favoring Grok for current-information access.
These are publisher reports, not a controlled comparison of the same versions under a shared evaluation. They do not establish a general winner for “Grok 4 vs Claude 4,” and they cannot resolve how a retired model behaves on a particular partner platform. Avoid applying results for Opus 4.7—or for Grok 4.5 and Opus 4.8—to Grok 4 and Opus 4.1.
For API features, distinguish model capability from configured tools. xAI documents API tools such as web search and X search; requests must configure tools, and X search can add usage charges. A model name alone is not a promise that every request retrieves current information. Anthropic also documents web search as an API tool; check its documentation for the exact model and platform you plan to use.
A separate comparison: Grok 4.7 and Claude Opus 5.5
This is a different model pair—not a substitute label for Grok 4 versus Claude 4. The previously discussed API specifications for Grok 4.7 and Claude Opus 5.5 are:
| API consideration | Grok 4.7 | Claude Opus 5.5 |
|---|---|---|
| Model ID | grok-4.7 |
claude-opus-5-5 |
| Listed context window | 500,000 tokens | 1,000,000 tokens |
| Base input price | $2 per million tokens | $4 per million tokens |
| Base output price | $6 per million tokens | $20 per million tokens |
| Relevant documented API tools | Web search, X search, code execution, and function calling | Web search is available as an API tool |
These are provider-listed specifications, not a quality ranking. Anthropic documents Opus 5.5’s one-million-token context window and says long-context requests are billed at standard pricing. Tool invocations, prompt caching, batch processing, and account-specific terms can affect total spend. Also check the providers’ current model catalogs before deployment: a comparison of 4.7 and 5.5 should not be mistaken for a claim that these are the newest models available.
Cost example for the separate model pair
For a workload totaling 1 million input tokens and 200,000 output tokens across multiple requests, the listed base token charges would be:
- Grok 4.7: (1 × $2) + (0.2 × $6) = $3.20
- Claude Opus 5.5: (1 × $4) + (0.2 × $20) = $8.00
These are aggregate uncached token totals across a workload—not a single request. The Grok 4.7 documentation lists a 500,000-token context window, so the example does not imply that one request can contain one million input tokens. This calculation excludes search and other tool fees, caching, and any other applicable terms; it compares token charges, not quality-adjusted cost.
How to choose for production
- Fix the exact model and platform first. Check the API model ID and lifecycle status. An old slug may fail or, as with retired Grok 4, route to a different model.
- Test representative tasks. Use the same prompts, tool configuration, and success criteria where possible. Include routine tasks and important edge cases.
- Measure outcomes and operating cost. Track task success, error rates, latency, input/output tokens, retries, and tool charges. Compare cost per successful task, not token price alone.
- Re-check availability and pricing before rollout. Partner-managed services can have different lifecycle schedules and prices from the model provider’s own API.
- Consider routing only if your results justify it. If different active models perform better on different tasks, test a routing policy and measure its actual cost and quality. Using two models does not automatically improve results or reduce spend.
Bottom line
For the literal Grok 4 vs Claude 4 question, this comparison uses Grok 4 vs Claude Opus 4.1. As of the provider retirement notices, neither is a straightforward active direct-API choice: Grok 4 requests redirect to Grok 4.3, while Opus 4.1 is retired on Anthropic-operated platforms except for specified partner-managed availability. For new production work, compare explicitly named active models. For existing workloads, verify the model actually serving requests, platform-specific terms, and performance on your own tasks.
Sources
Grok Model Retirement on May 15, 2026 — xAI Docs
Model Deprecations — Claude Platform Docs
Pricing — Claude Platform Docs
Claude Opus 5.5 — Claude Platform Docs
Context Windows — Claude Platform Docs
Grok Models & Pricing — xAI Docs
Grok 4.7 Developer Guide — xAI Docs
Web Search Tool — Claude Platform Docs
