code-davinci-002
code-davinci-002 (OpenAI)
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.
The facts
| Provider | OpenAI |
|---|---|
| Model id | code-davinci-002 |
| Released | — |
| Deprecated | March 20, 2023 |
| Shutdown | March 23, 2023 · 1225 days ago |
| Status | Retired |
| Last verified | July 30, 2026 |
What to use instead
For code work today, gpt-5.3-codex is the direct descendant of this line. gpt-4o is what OpenAI named at the time.
What parameters gpt-4o accepts on modelparams.dev
Change the id
In most cases the migration is one string. Check the parameter differences before you ship — newer models drop older sampling knobs more often than they add them.
- "model": "code-davinci-002"
+ "model": "gpt-4o"
Frequently asked questions
- 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 · developers.openai.com · accessed July 30, 2026
Found something wrong? The data is one YAML file — edit it on GitHub.
This page, for machines
Drop the badge in a README so it turns red the day this model is retired:
[](https://modeldeprecations.dev/openai/code-davinci-002)