# OpenAI code-davinci-002 — deprecation status

> Yes — code-davinci-002 is retired. OpenAI deprecated it on March 20, 2023 and shut it down on March 23, 2023; API requests to it now fail. The recommended replacement is GPT-4o.

The Codex model behind the original GitHub Copilot, and the shortest notice OpenAI has ever given: deprecated on March 20, 2023 and shut down three days later. The backlash from researchers who lost access mid-study is a large part of why every provider now publishes deprecation schedules months ahead.

## Facts

| Field | Value |
| --- | --- |
| Provider | OpenAI |
| Model id | `code-davinci-002` |
| Status | Retired |
| Deprecated | March 20, 2023 |
| Shutdown | March 23, 2023 (1225 days ago) |
| Last verified | July 30, 2026 |

## Replacement

- **GPT-4o** (`gpt-4o`) · recommended — https://modeldeprecations.dev/openai/gpt-4o
  - For code work today, gpt-5.3-codex is the direct descendant of this line. gpt-4o is what OpenAI named at the time.
  - Parameters it accepts: https://modelparams.dev/models/openai/gpt-4o

```diff
- "model": "code-davinci-002"
+ "model": "gpt-4o"
```

## FAQ

### When did OpenAI code-davinci-002 shut down?

OpenAI code-davinci-002 shut down on March 23, 2023. API requests to it fail from that date onward.

### What replaces OpenAI code-davinci-002?

OpenAI recommends GPT-4o (`gpt-4o`) as the replacement for OpenAI code-davinci-002. For code work today, gpt-5.3-codex is the direct descendant of this line. gpt-4o is what OpenAI named at the time.

### Is OpenAI code-davinci-002 still available?

No. OpenAI code-davinci-002 is retired and no longer served — it was shut down on March 23, 2023. Calls to it return an error.

### How do I migrate from OpenAI code-davinci-002 to gpt-4o?

Swap the model id in your API call: replace "code-davinci-002" with "gpt-4o". For code work today, gpt-5.3-codex is the direct descendant of this line. gpt-4o is what OpenAI named at the time.

## Sources

- [OpenAI API deprecations](https://developers.openai.com/api/docs/deprecations) — accessed 2026-07-30

---

Canonical page: https://modeldeprecations.dev/openai/code-davinci-002
JSON: https://modeldeprecations.dev/api/v1/models/openai/code-davinci-002.json
