Skip to content
,

OpenAI API Deprecations 2026: Full Shutdown Timeline and Migration Guide

12โ€“18 minutes
Woman at a whiteboard holding a tablet with an OPENAI API card, hook Sora is gone migrate now

OpenAI retired more API models and endpoints in 2026 than in any year before. Sora, the Assistants API, DALL-E and the first gpt-image model are already gone, and GPT-4o, GPT-5, whisper-1 and the old TTS models shut down over the next few months.

This guide puts every 2026-2027 shutdown in one timeline. For each one you get the official replacement, a short Python before/after snippet, and a way to find old model names in your own code and logs.

TLDR

  • Already shut down in 2026: DALL-E 2 and 3 (12 May), the Assistants API (26 Aug), Sora 2 and the Videos API (24 Sep), gpt-image-1, GPT-4, o1 and o4-mini (23 Oct), gpt-image-1.5 and gpt-image-1-mini (1 Dec).
  • Next up: GPT-5, GPT-5 mini/nano and o3 on 11 Dec 2026, then tts-1 and gpt-4o-mini-tts on 6 Jan 2027, and GPT-4o and GPT-4.1 on 14 Jan 2027.
  • Main replacements: gpt-6.2-sol, gpt-6.1-terra and gpt-6-luna for text, gpt-image-2.6 Flare/Sunburst for images, gpt-transcribe for speech to text, gpt-realtime-2.1-mini for voice output.
  • No replacement: Sora and the Videos API have no one-to-one successor. Flex processing is being wound down, and background mode or the Batch API are the cheap async options.
  • Find old usage fast: grep your repo, read shutdown_date from GET /v1/models, and group the Usage API by model.

How OpenAI Deprecations Work

OpenAI’s official deprecations page gives every model one of three lifecycle states. Knowing the difference tells you how much time you have left.

  • Active: you can use the model and no retirement has been announced.
  • Deprecated: retirement is announced, but the model still works until its shutdown date.
  • Shutdown: the model no longer accepts requests through the standard API.

OpenAI emails customers who actively use a model when it is deprecated. It also lists minimum notice periods, unless safety or compliance needs a faster timeline.

  • Generally available models: at least 6 months of notice.
  • Specialized variants and image models: at least 3 months. This covers chat-latest, Codex and deep research variants.
  • Preview models: as little as 2 weeks. Anything with “preview” in the name is risky for production.

Note: Some teams can buy dedicated capacity to keep using a model after its shutdown date. OpenAI says to contact its sales team for this, so it is not a self-serve option.

Full 2026-2027 Shutdown Timeline

This table lists every model, endpoint and feature on the official page with a 2026 or 2027 shutdown date. I grouped dated snapshots with their alias to keep it readable. The data was checked on 3 December 2026.

Shutdown date Model / endpoint Status Official replacement
12 Feb 2026 codex-mini-latest Shut down gpt-5-codex-mini
17 Feb 2026 chatgpt-4o-latest Shut down gpt-5.1-chat-latest
26 Mar 2026 gpt-4-0314, gpt-4-0125-preview, gpt-4-turbo-preview Shut down gpt-5 (or gpt-4.1)
7 May 2026 gpt-4o-realtime-preview, gpt-4o-audio-preview and mini previews Shut down gpt-realtime-1.5, gpt-audio-1.5
12 May 2026 dall-e-2, dall-e-3 Shut down GPT Image models
12 May 2026 OpenAI-Beta: realtime=v1 header Shut down Realtime GA interface
23 Jul 2026 computer-use-preview, gpt-4o-search-preview, o3/o4-mini-deep-research, gpt-5-codex, gpt-5.1-codex family, gpt-5.2-codex, gpt-5-chat-latest, gpt-5.1-chat-latest Shut down gpt-5.6-sol or gpt-5.6-terra
10 Aug 2026 gpt-5.2-chat-latest, gpt-5.3-chat-latest Shut down gpt-5.6-sol
26 Aug 2026 Assistants API Shut down Responses API + Conversations API
24 Sep 2026 Videos API, sora-2, sora-2-pro (all snapshots) Shut down No one-to-one replacement
28 Sep 2026 gpt-3.5-turbo-instruct, babbage-002, davinci-002, gpt-3.5-turbo-1106 Shut down gpt-5.6-terra
1 Oct 2026 gpt-5.4-cyber Shut down Most capable cyber model you can access
23 Oct 2026 gpt-image-1 Shut down gpt-image-2.5 Sunburst or Flare
23 Oct 2026 gpt-3.5-turbo, gpt-4, gpt-4-turbo, gpt-4-1106-preview, gpt-4o-2024-05-13, gpt-4.1-nano, o1, o1-pro, o3-mini, o4-mini Shut down gpt-5.6-sol, gpt-5.6-terra or gpt-5.6-luna
30 Nov 2026 /v1/prompts, Evals API, Datasets, prompt optimizer, Agent Builder Shut down Prompts in code, Promptfoo, Agents SDK
1 Dec 2026 gpt-image-1-mini, gpt-image-1.5, chatgpt-image-latest Shut down gpt-image-2.6 Sunburst or Flare
11 Dec 2026 gpt-5, gpt-5-pro, o3, o3-pro Deprecated gpt-6.2-sol (pro mode for the pro models)
11 Dec 2026 gpt-5-mini / gpt-5-nano Deprecated gpt-6.1-terra / gpt-6-luna
15 Dec 2026 New self-serve fine-tuning jobs Restricted None (existing tuned models keep working)
6 Jan 2027 tts-1, tts-1-hd, gpt-4o-mini-tts Deprecated gpt-realtime-2.1-mini (Realtime API)
11 Jan 2027 EU data residency with fast or priority tier on GPT-5.2/5.4 Deprecated Standard tier, or GPT-6.2 models
14 Jan 2027 gpt-4o, gpt-4o-mini, gpt-4.1, gpt-4.1-mini snapshots Deprecated gpt-6-luna
20 Jan 2027 gpt-realtime, gpt-audio, gpt-realtime-mini, gpt-audio-mini, gpt-4o audio/realtime models Deprecated gpt-realtime-2.1 (-mini), gpt-audio-1.5
1 Feb 2027 gpt-5.5-cyber-preview Deprecated Most capable cyber model you can access
10 Feb 2027 gpt-image-2 Deprecated gpt-image-2.6 Sunburst or Flare
26 Feb 2027 whisper-1, gpt-4o-transcribe, gpt-4o-mini-transcribe, gpt-4o-transcribe-diarize Deprecated gpt-transcribe or gpt-live-transcribe
26 Feb 2027 /v1/audio/translations endpoint Deprecated /v1/realtime/translations
1 Apr 2027 gpt-5.1, gpt-5.3-codex / gpt-5.4-nano Deprecated gpt-6.2-sol / gpt-6-luna
1 Jun 2027 gpt-realtime-2, gpt-live-1 Deprecated gpt-realtime-2.1, gpt-live-1.1
Not set yet Flex processing (service_tier="flex") Winding down Background mode or Batch API
OpenAI deprecations page showing gpt-5, gpt-5-mini, gpt-5-nano and gpt-5-pro shutting down on Dec 11, 2026 with gpt-6.2-sol, gpt-6.1-terra and gpt-6-luna as replacements
Official OpenAI Deprecations page, “Upcoming deprecations” table (checked 3 Dec 2026).

Warning: The 11 December 2026 batch is the urgent one. If you still call gpt-5, gpt-5-mini or o3, you have about one week left as of this writing.

How to Find Deprecated Models in Your Code and Logs

Most broken apps fail because an old model name hides in a config file, an environment variable or a teammate’s script. Use these steps to find every one before its shutdown date.

  1. Search your code. Run a recursive grep for the old names across code, config and env files. The command below covers the main 2026-2027 shutdowns.
  2. Check the models endpoint. OpenAI’s best-practice advice is to call GET /v1/models and read each model’s optional shutdown_date field. The script below prints every model that has one.
  3. Group real usage by model. Call the Usage API with group_by set to model. This needs an Admin API key, not a normal project key.
  4. Check the Usage dashboard. Open the Usage Dashboard in the API platform, pick your organization and a date range, and filter by project. You can export the data with no limit on the date range.
  5. Log the model on every call. Save response.model in your app logs. Then a simple log search shows which services still send old names.

Grep command for old model names

grep -rnE "gpt-4o|gpt-4.1|gpt-5|o3|o4-mini|tts-1|whisper-1|dall-e|gpt-image-1|gpt-image-2|sora-2|beta.threads|beta.assistants|flex" --include="*.py" --include="*.env" --include="*.yaml" --include="*.json" .

The pattern is wide on purpose, so expect false matches such as gpt-5.6 or the word “flex” in comments. It also flags beta.threads and beta.assistants calls, which mean Assistants API code that already fails.

Python: list models with a shutdown date

import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])

for model in client.models.list():
    shutdown = getattr(model, "shutdown_date", None)
    if shutdown:
        print(f"{model.id}: shuts down {shutdown}")

The models list only shows models your key can see. Run it with the same project key your production app uses.

Python: usage grouped by model (Admin key)

import os, time
import requests

headers = {"Authorization": f"Bearer {os.environ['OPENAI_ADMIN_KEY']}"}
params = {
    "start_time": int(time.time()) - 30 * 86400,  # last 30 days
    "bucket_width": "1d",
    "group_by": ["model", "project_id"],
    "limit": 30,
}
r = requests.get("https://api.openai.com/v1/organization/usage/completions",
                 headers=headers, params=params)
r.raise_for_status()
for bucket in r.json()["data"]:
    for row in bucket["results"]:
        print(row.get("model"), row.get("project_id"), row.get("input_tokens"))

Tip: In Codex, OpenAI suggests running the OpenAI Docs skill with $openai-docs and asking it to move your project to the recommended replacement. Review the diff before you merge it. My Codex guide covers setup.

Migrate Text Models (GPT-4o, GPT-4.1, GPT-5, o3)

For text models, the fix is usually a one-line model swap. OpenAI’s replacements point to the GPT-6 family.

  • gpt-5, o3, gpt-5.1, gpt-5.3-codex: move to gpt-6.2-sol.
  • gpt-5-pro, o3-pro: move to gpt-6.2-sol with reasoning.mode: pro in the Responses API.
  • gpt-5-mini: move to gpt-6.1-terra.
  • gpt-5-nano, gpt-4o, gpt-4o-mini, gpt-4.1, gpt-4.1-mini, gpt-5.4-nano: move to gpt-6-luna.

Before and after

# BEFORE: stops working on 11 Dec 2026
from openai import OpenAI
client = OpenAI()

resp = client.responses.create(
    model="gpt-5",
    input="Summarise this support ticket in two lines.",
)
print(resp.output_text)
# AFTER: official replacement
from openai import OpenAI
client = OpenAI()

resp = client.responses.create(
    model="gpt-6.2-sol",
    input="Summarise this support ticket in two lines.",
)
print(resp.output_text)

# For gpt-5-pro / o3-pro jobs, use pro reasoning mode instead:
pro = client.responses.create(
    model="gpt-6.2-sol",
    reasoning={"mode": "pro"},
    input="Review this contract clause for risks.",
)

Don’t stop at the model name. New models can change output length, tone, latency and cost. OpenAI’s own advice is to run real requests against both models and compare them before you switch traffic.

If you still use Chat Completions, this is a good moment to move to the Responses API. My Responses API tutorial walks through it, and the GPT-6.2 migration guide covers model behaviour changes.

Migrate the Assistants API

OpenAI sunset the Assistants API on 26 August 2026, so any client.beta.threads or client.beta.assistants call now fails. The official path is the Responses API plus the Conversations API.

Assistants concept Replacement
Thread Conversation (client.conversations.create)
Run Response (client.responses.create)
Assistant instructions instructions on each response, kept in your code
Polling run status Not needed for normal calls; use background=True for long jobs
# BEFORE: Assistants API (shut down 26 Aug 2026)
thread = client.beta.threads.create(
    messages=[{"role": "user", "content": "What are the 5 Ds of dodgeball?"}],
)
run = client.beta.threads.runs.create(thread_id=thread.id, assistant_id="asst_123")
# ...then poll run.status until "completed"
# AFTER: Conversations + Responses
from openai import OpenAI
client = OpenAI()

conversation = client.conversations.create(
    items=[{"role": "user", "content": "What are the 5 Ds of dodgeball?"}],
    metadata={"user_id": "user_42"},
)

response = client.responses.create(
    model="gpt-6.2-sol",
    instructions="You are a friendly sports coach.",
    input=[{"role": "user", "content": "Explain the first D."}],
    conversation=conversation.id,
)
print(response.output_text)

Note: Reusable prompt objects (/v1/prompts) also shut down on 30 November 2026. Keep your instructions as plain strings in code or config, not as dashboard prompt IDs.

Agent Builder closed on the same day. OpenAI points to the Agents SDK, which I cover in the OpenAI Agents SDK guide.

Migrate DALL-E and gpt-image Models

Image models changed four times this year. DALL-E 2 and 3 ended on 12 May, gpt-image-1 on 23 October, and gpt-image-1.5 and gpt-image-1-mini on 1 December. gpt-image-2 follows on 10 February 2027.

The current image guide uses gpt-image-2.5-sunburst and gpt-image-2.5-flare. The newer gpt-image-2.6-flare and gpt-image-2.6-sunburst are marked “Latest” and are the replacement for gpt-image-2. For new code, I would go straight to 2.6.

  • Sunburst: pick it when editing precision matters most.
  • Flare: pick it for fast, everyday generation.
# BEFORE: dall-e-3 (shut down 12 May 2026)
result = client.images.generate(
    model="dall-e-3",
    prompt="A watercolor otter reading a book",
    size="1024x1024",
)
print(result.data[0].url)
# AFTER: GPT Image returns base64, so save the bytes yourself
import base64
from openai import OpenAI
client = OpenAI()

result = client.images.generate(
    model="gpt-image-2.6-flare",
    prompt="A watercolor otter reading a book",
)
image_bytes = base64.b64decode(result.data[0].b64_json)
with open("otter.png", "wb") as f:
    f.write(image_bytes)

The biggest gotcha is the output format. Old DALL-E code often read data[0].url, while the GPT Image examples read data[0].b64_json. My OpenAI Image API tutorial covers sizes, edits and prices for the current models.

Migrate TTS, Whisper and Realtime Models

Audio has the trickiest migrations, because two of them change the API, not just the model name.

Text to speech: tts-1 and gpt-4o-mini-tts (6 Jan 2027)

The official replacement is gpt-realtime-2.1-mini through the Realtime API. OpenAI’s TTS guide says plainly that this model is not supported on /v1/audio/speech, so you cannot just swap the model string.

# BEFORE: works until 6 Jan 2027
from openai import OpenAI
client = OpenAI()

with client.audio.speech.with_streaming_response.create(
    model="gpt-4o-mini-tts",
    voice="coral",
    input="Your order has shipped.",
) as response:
    response.stream_to_file("speech.mp3")
# AFTER (sketch): Realtime API over WebSocket
# pip install websocket-client
import os, json, base64
import websocket

url = "wss://api.openai.com/v1/realtime?model=gpt-realtime-2.1-mini"
headers = ["Authorization: Bearer " + os.environ["OPENAI_API_KEY"]]
audio = bytearray()

def on_open(ws):
    ws.send(json.dumps({"type": "session.update", "session": {
        "type": "realtime", "output_modalities": ["audio"],
        "instructions": "Read the user's text aloud exactly as written."}}))
    ws.send(json.dumps({"type": "conversation.item.create", "item": {
        "type": "message", "role": "user",
        "content": [{"type": "input_text", "text": "Your order has shipped."}]}}))
    ws.send(json.dumps({"type": "response.create"}))

def on_message(ws, message):
    event = json.loads(message)
    if event["type"] == "response.output_audio.delta":
        audio.extend(base64.b64decode(event["delta"]))
    elif event["type"] in ("response.done", "error"):
        ws.close()

websocket.WebSocketApp(url, header=headers, on_open=on_open,
                       on_message=on_message).run_forever()
open("speech.pcm", "wb").write(audio)  # raw PCM16 audio

This is a minimal sketch built from the event names in OpenAI’s Realtime guides. Check the current Realtime docs for voices and audio formats before you ship it. My OpenAI text-to-speech guide covers the Speech API you can keep using until January.

Speech to text: whisper-1 and gpt-4o-transcribe (26 Feb 2027)

This one is easy. The transcription endpoint stays the same and only the model changes to gpt-transcribe.

# BEFORE
text = client.audio.transcriptions.create(model="whisper-1", file=open("call.wav", "rb"))

# AFTER
text = client.audio.transcriptions.create(model="gpt-transcribe", file=open("call.wav", "rb"))
print(text.text)

The /v1/audio/translations endpoint also shuts down on 26 February 2027, and its replacement is /v1/realtime/translations. See my speech-to-text API guide for details.

Realtime and audio models (20 Jan 2027)

  • gpt-realtime, gpt-4o-realtime: move to gpt-realtime-2.1.
  • gpt-realtime-mini, gpt-4o-mini-realtime: move to gpt-realtime-2.1-mini.
  • gpt-audio, gpt-audio-mini, gpt-4o-audio: move to gpt-audio-1.5.
  • gpt-realtime-2 and gpt-live-1 (1 Jun 2027): move to gpt-realtime-2.1 and gpt-live-1.1.

Sora, Flex, Fine-Tuning and Other Features

Sora 2 and the Videos API (shut down 24 Sep 2026)

OpenAI announced on 24 March 2026 that the Videos API and all Sora 2 models would close. The model page now says they are “no longer available”, and there is no one-to-one replacement API.

If your app made videos with sora-2 or sora-2-pro, you need a video model from another provider. Remove the old calls, because they now fail every time.

Flex processing (winding down, no date yet)

The Flex guide says you can keep using Flex on supported models “as we wind down the beta”. Flex is not available on GPT-6.2 Astra or Sol, and OpenAI says the retirement date will be posted once confirmed.

For cheap async work, OpenAI’s background mode now offers completion windows. The 2h window is 30% below Standard and the 8h window is 40% below Standard.

# BEFORE: Flex
resp = client.with_options(timeout=900.0).responses.create(
    model="gpt-5", input="Classify these 500 reviews...", service_tier="flex",
)

# AFTER: background mode with an 8-hour window
job = client.responses.create(
    model="gpt-6.2-sol",
    input="Classify these 500 reviews...",
    background=True,
    background_options={"completion_window": "8h"},
)
print(job.id, job.status)  # later: client.responses.retrieve(job.id)

For independent requests you can send up front, the Batch API is still the other cheap route. See my guides to background completion windows and the Batch API.

Self-serve fine-tuning (15 Dec 2026)

OpenAI moved the cutoff for new self-serve fine-tuning jobs from 6 January 2027 up to 15 December 2026. Existing fine-tuned models keep serving until their base model retires.

  • 7 May 2026: organizations that never ran a fine-tuning job lost the ability to start one.
  • 2 Jul 2026: organizations with no fine-tuned inference in 60 days lost training access.
  • 15 Dec 2026: no organization can create new self-serve jobs.

Evals, Datasets and the prompt optimizer (30 Nov 2026)

These dashboard tools shut down with /v1/prompts. OpenAI names Promptfoo as a replacement for evals. Keep your test sets in your own repo from now on, so a tool shutdown cannot take them with it.

Cost Check: Old Model vs Replacement

A forced migration can raise or cut your bill. These are standard short-context prices per 1 million tokens from OpenAI’s pricing page, checked on 3 December 2026.

Old model Old input / output Replacement New input / output
gpt-5 $1.25 / $10.00 gpt-6.2-sol $2.00 / $10.00
gpt-5-mini $0.25 / $2.00 gpt-6.1-terra $1.00 / $5.00
gpt-5-nano $0.05 / $0.40 gpt-6-luna $0.10 / $0.50
gpt-4o $2.50 / $10.00 gpt-6-luna $0.10 / $0.50
gpt-4.1 $2.00 / $8.00 gpt-6-luna $0.10 / $0.50
gpt-4.1-mini $0.40 / $1.60 gpt-6-luna $0.10 / $0.50

Worked example

Say a support bot uses 20M input and 4M output tokens a month.

  • On gpt-4o: 20 x $2.50 + 4 x $10.00 = $90.00 a month.
  • On gpt-6-luna: 20 x $0.10 + 4 x $0.50 = $4.00 a month.
  • On gpt-5-mini moving to gpt-6.1-terra: $13.00 becomes $40.00, so that move costs more.

The lesson is to check each pair, not to assume newer means cheaper. For full price lists, see my OpenAI API pricing guide.

Quick answer: Swap the model name for text and transcription. Rewrite the calls for Assistants, image output (base64), TTS (Realtime) and Sora (another provider). Test on real prompts before 11 December 2026.

Troubleshooting: Deprecated Model Errors

These are the errors you are most likely to see after a shutdown, with the fastest fix for each.

Error or symptom Likely cause Fix
404 with code model_not_found: “The model … does not exist or you do not have access to it” The model is shut down, misspelled, or not enabled for your project Check the timeline above, then switch to the listed replacement
NotFoundError in the Python SDK The SDK’s name for a 404 response Same as above; also check the endpoint path
Calls to client.beta.threads fail Assistants API sunset on 26 Aug 2026 Move to Conversations + Responses
Image code crashes on data[0].url being empty GPT Image returns base64 output Decode b64_json and save the bytes
gpt-realtime-2.1-mini rejected on /v1/audio/speech That model only works through the Realtime API Use a Realtime session, or keep gpt-4o-mini-tts until 6 Jan 2027
service_tier="flex" fails or returns 429 on new models Flex is not offered on GPT-6.2 Astra or Sol Remove service_tier, or use background mode
Fine-tuning job creation refused Self-serve fine-tuning is restricted Keep using existing tuned models; contact OpenAI sales for options
Works locally, fails in production An old model name in a production env var Grep env files and secrets; log response.model

For general error codes like 401, 429 and 500, see my OpenAI API errors guide.

Frequently Asked Questions

Is the Sora API still available?

No. OpenAI shut down the Videos API and all Sora 2 models, including sora-2-pro, on 24 September 2026. OpenAI lists no one-to-one replacement API.

When does GPT-4o stop working in the API?

The remaining GPT-4o and GPT-4o mini snapshots shut down on 14 January 2027. The official replacement is gpt-6-luna. The older gpt-4o-2024-05-13 snapshot already ended on 23 October 2026.

What replaces the Assistants API?

The Responses API with the Conversations API. Threads become conversations, runs become responses, and assistant instructions move into your code.

Can I keep using tts-1 after January 2027?

No. tts-1, tts-1-hd and gpt-4o-mini-tts shut down on 6 January 2027. The replacement, gpt-realtime-2.1-mini, runs through the Realtime API rather than the Speech endpoint.

How do I know which deprecated models my app uses?

Grep your code and env files for old names, then read the shutdown_date field from the List models endpoint. For real traffic, group Usage API data by model and review the Usage Dashboard.

Will OpenAI warn me before a model shuts down?

Yes. OpenAI emails customers who actively use a model and lists it on the deprecations page. Notice is at least 6 months for GA models, 3 months for specialized and image models, and as little as 2 weeks for previews.

Is Flex processing being removed?

It is being wound down, but no retirement date was set as of 3 December 2026. It is not available on GPT-6.2 models, so background mode or the Batch API are the cheaper async options.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Woman at a whiteboard holding a tablet with an OPENAI API card, hook Sora is gone migrate now