Skip to content
FreeAIDevTools
ComparisonAI costs guides

Grok 4 vs GPT-5 in 2026: Both Are Being Retired. Use These Instead

FreeAIDevToolsLast verified 6 min read

Prices are list prices per million tokens from our model dataset, checked 29 Oct 2026. For your own volumes, use the cost calculator.

Quick answer

Neither. xAI retired Grok 4 on 15 May 2026, and OpenAI removes GPT-5 from its API on 11 Dec 2026. Move Grok 4 workloads to Grok 4.7 and GPT-5 workloads to GPT-6.1 Terra (step up to GPT-6.1 Sol if your evals need more reasoning); Grok 4.7 and GPT-6.1 Terra both cost less per input and output token than the model they replace.

On this page
  1. What happened to Grok 4 and GPT-5
  2. The original head-to-head
  3. What replaced them
  4. Verdict by use case
  5. Migrating without surprises

What happened to Grok 4 and GPT-5

This page used to be a straight comparison. It isn't one anymore, because one side of it no longer exists and the other has a shutdown date.

  • Grok 4 is gone. xAI retired grok-4-0709 on 15 May 2026 at 12:00 PM PT, along with Grok 3 and the Grok 4 Fast and 4.1 Fast models. Calls to the old slug don't fail. They are quietly served by grok-4.3 at low reasoning effort and billed at Grok 4.3 rates (xAI retirement notice).
  • GPT-5 is on notice. OpenAI told developers on 11 Jun 2026 that gpt-5 (snapshot gpt-5-2025-08-07) leaves the API on 11 Dec 2026. GPT-5 Mini, GPT-5 Nano, o3 and o3-pro go the same day (OpenAI deprecations).

So if you searched "Grok 4 vs GPT-5" because you're picking a model for something new, don't pick either. If you already run one of them, the useful question is what to move to. That's most of this page.

The original head-to-head

For the record, here is how the two compared while both were live. GPT-5 was the cheaper model by a wide margin and had the bigger context window. Grok 4 cost more on both input and output.

SpecGrok 4 (retired)GPT-5 (until 11 Dec 2026)
Context window256K400K
Input, per 1M tokens$3.00$1.25
Cached input, per 1M$0.30$0.125
Output, per 1M tokens$15.00$10.00
1M in + 500K out$10.50$6.25
VisionYesYes
Reasoning (our rubric)ExcellentExcellent

On that reference job GPT-5 came out 40% cheaper. Grok 4's real argument was never price. It was xAI's built-in search, including search over X posts, which made it handy for questions about things that happened this week. That argument carries over to the newer Grok models, so it shows up again below.

What replaced them

Both companies have shipped several generations since. These are the current models I'd look at if you're coming from either one. The last column is the same reference job as above, so you can compare straight across.

ModelContextInput /1MCached /1MOutput /1M1M in + 500K out
Grok 4.7 (xAI)500K$2.00$0.50$6.00$5.00
Grok 4.5 (xAI)500K$2.00$0.30$6.00$5.00
Grok 4.20 (xAI)1M$1.25$0.20$2.50$2.50
GPT-6.1 Sol (OpenAI)1.05M$2.00$0.10$10.00$7.00
GPT-6.1 Terra (OpenAI)1.05M$1.00$0.05$5.00$3.50
GPT-5.6 Sol (OpenAI)1.05M$4.00$0.40$20.00$14.00
GPT-5.5 (OpenAI)1.05M$5.00$0.50$30.00$20.00

A few things in that table are worth spelling out.

  • All three xAI models are cheaper than Grok 4 was. Grok 4.7 costs $5.00 on the reference job against Grok 4's $10.50, and it has 500K of context instead of 256K. xAI calls it the recommended model for code and chat (xAI models).
  • GPT-6.1 Terra undercuts GPT-5 on both sides. $1.00 in and $5.00 out, against GPT-5's $1.25 and $10.00. That's 44% less on the reference job, with 1.05M of context (OpenAI model page).
  • OpenAI's named replacement is not the cheapest one. The deprecation table points gpt-5 users to gpt-5.6-sol. GPT-5.6 Sol currently runs $4.00 in and $20.00 out, and that is a promotional price OpenAI says is available until 30 Nov 2026. GPT-6.1 Sol, which came later, is $2.00 in and $10.00 out and sits in our top reasoning tier (OpenAI model page).
  • Grok 4.20 is the budget long-context pick. 1M of context at $1.25 in and $2.50 out. Grok 4.3, where retired Grok slugs now land, is listed by xAI at the same rates.
  • GPT-5.5 is the expensive outlier. At $5.00 in and $30.00 out it costs more than GPT-5 and Grok 4 did. I would only stay on it if you've already validated it and the evals say nothing else matches.

One catch for long prompts. xAI bills every token in a request at double rate once the prompt reaches 200K tokens (xAI models). OpenAI charges GPT-6.1 Sol and Terra 2x on input and 1.5x on output above 272K input tokens (OpenAI model page). The table shows the normal rates.

Verdict by use case

Here is where I'd land for the common cases, as of 29 Oct 2026.

You ran GPT-5 as a general workhorse

Move to GPT-6.1 Terra first and run your evals. It is cheaper than GPT-5 on every rate and has a bigger window. If quality drops on your hardest prompts, step up to GPT-6.1 Sol, which costs $7.00 on the reference job against GPT-5's $6.25.

You ran Grok 4 for coding or chat

Use Grok 4.7. Same vendor, 52% cheaper than Grok 4 on the reference job. Grok 4.5 has the same input and output price with cheaper cached input ($0.30 vs $0.50), which matters if most of your prompt is a fixed system prompt that prompt caching can reuse.

You need fresh information from the web or X

Stay with xAI. Web Search and X Search are server-side tools you switch on per request (xAI tools). OpenAI's GPT-6.1 models support a web search tool in the Responses API too, but only xAI searches X itself. On xAI, tool calls are billed on top of tokens.

You process long documents in bulk

Grok 4.20 is the cheapest xAI model with a 1M window: $2.50 on the reference job. OpenAI's budget GPT-6 Luna is cheaper still if a budget-tier model is enough for the job. Keep prompts under 200K tokens where you can, or the double rate kicks in.

You want the strongest reasoning either vendor sells at a sane price

GPT-6.1 Sol. OpenAI describes it as near GPT-6 Astra performance at a lower cost, and it supports the full Responses API toolset, including computer use and MCP (OpenAI model page).

Compare every current model side by side
Price, context, vision and reasoning tier for 57 live models, including all of the above.
Open the comparison

Migrating without surprises

The model swap itself is one line. These are the parts that bite.

  1. Set the model ID explicitly. If your code still says grok-4-0709, it has been running on Grok 4.3 since May with no error to tell you. Your outputs and your bill changed. Pin the model you actually want.
  2. Move before 11 Dec 2026, not on it. OpenAI's notice says the old snapshots are removed from the API that day. Give yourself a couple of weeks to run both side by side.
  3. Rerun your evals. A newer model is not automatically better on your prompts. Check output format, refusals and length, since those drift most between generations.
  4. Recount tokens. Different models split the same text into different token counts, so the per-million price is only half the story. Paste a real prompt into the token counter and compare.
  5. Price your real traffic. Put your monthly input and output volume into the LLM cost calculator before you commit. The reference job above is a guide, not your bill. Batch and cache-write rates for the GPT models are listed with the current OpenAI prices.

Frequently asked

Is Grok 4 still available in the xAI API?

No. xAI retired grok-4-0709 on 15 May 2026 at 12:00 PM PT. Requests that still use that model ID are served by grok-4.3 at low reasoning effort and billed at Grok 4.3 rates, so they don't error, but the model and the price both changed.

When does GPT-5 shut down?

OpenAI announced on 11 Jun 2026 that gpt-5 (snapshot gpt-5-2025-08-07) will be removed from the API on 11 Dec 2026. GPT-5 Mini, GPT-5 Nano, o3 and o3-pro are removed the same day. OpenAI's named replacement for gpt-5 is gpt-5.6-sol.

What should I use instead of GPT-5?

Start with GPT-6.1 Terra. It is cheaper than GPT-5 on both input and output and has a 1.05M token context window. If quality drops on your hardest prompts, try GPT-6.1 Sol, which sits in our top reasoning tier. Run your own evals before switching.

What should I use instead of Grok 4?

Grok 4.7, which xAI recommends for code and chat. It has a 500K context window and costs less per input and output token than Grok 4 did. For bulk long-document work, Grok 4.20 offers a 1M window at a lower price.

Which was cheaper, Grok 4 or GPT-5?

GPT-5. It listed at $1.25 per million input tokens and $10 per million output tokens, against Grok 4's $3 and $15. GPT-5 also had the larger context window, 400K tokens against 256K.

FreeAIDevTools
Independent LLM pricing and free-tier tracker

An independent site run by an AI engineer. Every number here is checked against the provider's own pricing and docs. How we verify.

The Inference Report · Every Tuesday

Know when AI prices change.

One short email every Tuesday: new models, price moves and free tiers that were cut or added. Five minutes, no fluff.

No spam. Unsubscribe anytime.