use-cases/api-integration-migrations.md +124 −0 added
1# Upgrade your API integration | Codex use cases
2
3Codex use cases
4
5
6
7
8
9Codex use case
10
11# Upgrade your API integration
12
13Upgrade your app to the latest OpenAI API models.
14
15Difficulty **Intermediate**
16
17Time horizon **1h**
18
19Use Codex to update your existing OpenAI API integration to the latest recommended models and API features, while checking for regressions before you ship.
20
21## Best for
22
23 - Teams upgrading from older models or API surfaces
24 - Repos that need behavior-preserving migrations with explicit validation
25
26# Contents
27
28[← All use cases](https://developers.openai.com/codex/use-cases)
29
30Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/api-integration-migrations/?export=pdf)
31
32Use Codex to update your existing OpenAI API integration to the latest recommended models and API features, while checking for regressions before you ship.
33
34Intermediate
35
361h
37
38Related links
39
40[Latest model guide](https://developers.openai.com/api/docs/guides/latest-model) [Prompt guidance](https://developers.openai.com/api/docs/guides/prompt-guidance) [OpenAI Docs MCP](/learn/docs-mcp) [Evals guide](https://developers.openai.com/api/docs/guides/evals)
41
42## Best for
43
44 - Teams upgrading from older models or API surfaces
45 - Repos that need behavior-preserving migrations with explicit validation
46
47## Skills & Plugins
48
49- [OpenAI Docs](https://github.com/openai/skills/tree/main/skills/.curated/openai-docs)
50
51 Pull the current model, migration, and API guidance before Codex makes edits to your implementation.
52
53| Skill | Why use it |
54| --- | --- |
55| [OpenAI Docs](https://github.com/openai/skills/tree/main/skills/.curated/openai-docs) | Pull the current model, migration, and API guidance before Codex makes edits to your implementation. |
56
57## Starter prompt
58
59Use $openai-docs to upgrade this OpenAI integration to the latest recommended model and API features.
60Specifically, look for the latest model and prompt guidance for this specific model.
61 Requirements:
62- Start by inventorying the current models, endpoints, and tool assumptions in the repo.
63- Identify the smallest migration plan that gets us onto the latest supported path.
64 - Preserve behavior unless a change is required by the new API or model.
65 - Update prompts using the latest model prompt guidance.
66- Call out any prompt, tool, or response-shape changes we need to review manually.
67
68[Open in the Codex app](codex://new?prompt=Use+%24openai-docs+to+upgrade+this+OpenAI+integration+to+the+latest+recommended+model+and+API+features.%0A%0ASpecifically%2C+look+for+the+latest+model+and+prompt+guidance+for+this+specific+model.%0A%0ARequirements%3A%0A-+Start+by+inventorying+the+current+models%2C+endpoints%2C+and+tool+assumptions+in+the+repo.%0A-+Identify+the+smallest+migration+plan+that+gets+us+onto+the+latest+supported+path.%0A-+Preserve+behavior+unless+a+change+is+required+by+the+new+API+or+model.%0A-+Update+prompts+using+the+latest+model+prompt+guidance.+%0A-+Call+out+any+prompt%2C+tool%2C+or+response-shape+changes+we+need+to+review+manually. "Open in the Codex app")
69
70Use $openai-docs to upgrade this OpenAI integration to the latest recommended model and API features.
71Specifically, look for the latest model and prompt guidance for this specific model.
72 Requirements:
73- Start by inventorying the current models, endpoints, and tool assumptions in the repo.
74- Identify the smallest migration plan that gets us onto the latest supported path.
75 - Preserve behavior unless a change is required by the new API or model.
76 - Update prompts using the latest model prompt guidance.
77- Call out any prompt, tool, or response-shape changes we need to review manually.
78
79## Introduction
80
81As we release new models and API features, we recommend upgrading your integration to benefit from the latest improvements.
82Changing from one model to another is often not as simple as just updating the model name.
83
84There might be changes to the API–for example, for the GPT-5.4 model, we added a new `phase` parameter to the assistant message that is important to include in your integration–but most importantly, model behavior can be different and require changes to your existing prompts.
85
86When migrating to a new model, you should make sure to not only make the necessary code changes, but also evaluate the impact on your workflows.
87
88## Leverage the OpenAI Docs skill
89
90All the specifics about the new API features and model behavior are documented in our docs, in the [latest model](https://developers.openai.com/api/docs/guides/latest-model) and [prompt guidance](https://developers.openai.com/api/docs/guides/prompt-guidance) guides.
91
92The OpenAI Docs skill also includes [specific guidance](https://github.com/openai/codex/blob/6323f0104d17d211029faab149231ba787f7da37/codex-rs/skills/src/assets/samples/openai-docs/references/upgrading-to-gpt-5p4.md) as reference, codifying how to upgrade to the latest model–currently [GPT-5.4](https://developers.openai.com/api/docs/models/gpt-5.4).
93
94Codex now automatically comes with the OpenAI Docs skill, so make sure to mention it in your prompt to access all the latest documentation and guidance when building with the OpenAI API.
95
96## Build a robust evals pipeline
97
98Codex can automatically update your prompts based on the latest prompt guidance, but you should have a way to automate verifying your integration is working as expected.
99
100Make sure to build an evals pipeline that you can run every time you make changes to your integration, to verify there is no regression in behavior.
101
102This [cookbook guide](https://developers.openai.com/cookbook/examples/evaluation/building_resilient_prompts_using_an_evaluation_flywheel) covers in detail how to do this using our [Evals API](https://developers.openai.com/api/docs/guides/evals).
103
104## Related use cases
105
106[
107
108### Add Mac telemetry
109
110Use Codex and the Build macOS Apps plugin to add a few high-signal `Logger` events around...
111
112macOS Code](https://developers.openai.com/codex/use-cases/macos-telemetry-logs)[
113
114### Create a CLI Codex can use
115
116Ask Codex to create a composable CLI it can run from any folder, combine with repo scripts...
117
118Engineering Code](https://developers.openai.com/codex/use-cases/agent-friendly-clis)[
119
120### Create browser-based games
121
122Use Codex to turn a game brief into first a well-defined plan, and then a real browser-based...
123
124Engineering Code](https://developers.openai.com/codex/use-cases/browser-games)