openai · OpenAI Platform Docs
Migrate to the Responses API | OpenAI API
Provides a step-by-step guide for transitioning from legacy API endpoints to the new Responses API, including necessary code changes and structural updates.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Migrate to the Responses API | OpenAI API
Provides a step-by-step guide for transitioning from legacy API endpoints to the new Responses API, including necessary code changes and structural updates.
When To Use
Use when you need to refactor existing OpenAI API implementations to use the Responses API architecture.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/migrate-to-the-responses-api-openai-workflow-guide.md | A guide detailing the migration process from Chat Completions to the new Responses API, including differences between Messages and Items. | Questions about a guide detailing the migration process from Chat Completions to the new Responses API, including differences between... |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-pytho.text | A Python code example demonstrating the transition from the Chat Completions API to the new Responses API using the OpenAI client. | Exact payloads, commands, or snippets shown in A Python code example demonstrating the transition from the Chat Completions API to the new Responses API using the O... |
examples/migrate-to-the-responses-api-openai-openai-responses-api-python-migratio.text | A Python code example demonstrating how to use the new client.responses.create method to generate content. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the new client.responses.create method to generate content. |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-json-.text | A JSON representation of a chat completion object used to demonstrate the structure for migrating to the Responses API. | Exact payloads, commands, or snippets shown in A JSON representation of a chat completion object used to demonstrate the structure for migrating to the Responses API. |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-json--2.text | A JSON representation of the new Responses API object structure including response IDs, model information, and output types. | Exact payloads, commands, or snippets shown in A JSON representation of the new Responses API object structure including response IDs, model information, and output... |
examples/migrate-to-the-responses-api-openai-openai-chat-completions-to-responses.text | A curl command demonstrating the transition from the chat completions endpoint to the new responses API endpoint. | Exact payloads, commands, or snippets shown in A curl command demonstrating the transition from the chat completions endpoint to the new responses API endpoint. |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-javas.text | A code comparison demonstrating the transition from the chat completions endpoint to the new responses API using JavaScript. | Exact payloads, commands, or snippets shown in A code comparison demonstrating the transition from the chat completions endpoint to the new responses API using Java... |
examples/migrate-to-the-responses-api-openai-openai-responses-api-python-migratio-2.text | A Python code comparison demonstrating the transition from the chat completions endpoint to the new responses API endpoint. | Exact payloads, commands, or snippets shown in A Python code comparison demonstrating the transition from the chat completions endpoint to the new responses API end... |
examples/migrate-to-the-responses-api-openai-openai-chat-completions-to-responses-2.text | A JavaScript code comparison demonstrating the transition from the Chat Completions API to the new Responses API. | Exact payloads, commands, or snippets shown in A JavaScript code comparison demonstrating the transition from the Chat Completions API to the new Responses API. |
examples/migrate-to-the-responses-api-openai-openai-chat-completions-python-migra.text | A Python code snippet demonstrating the legacy Chat Completions API syntax used for comparison during migration to the Responses API. | Exact payloads, commands, or snippets shown in A Python code snippet demonstrating the legacy Chat Completions API syntax used for comparison during migration to th... |
examples/migrate-to-the-responses-api-openai-openai-api-chat-completions-curl-req.text | A curl command demonstrating a request to the legacy chat completions endpoint using a JSON payload. | Exact payloads, commands, or snippets shown in A curl command demonstrating a request to the legacy chat completions endpoint using a JSON payload. |
examples/migrate-to-the-responses-api-openai-openai-responses-api-nodejs-migratio.text | A Node.js code example demonstrating how to use the new client.responses.create method to replace legacy API calls. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to use the new client.responses.create method to replace legacy API calls. |
examples/migrate-to-the-responses-api-openai-openai-responses-api-python-migratio-3.text | A Python code example demonstrating how to use the new client.responses.create method to replace legacy API calls. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the new client.responses.create method to replace legacy API calls. |
examples/migrate-to-the-responses-api-openai-openai-responses-api-curl-migration-.text | A curl command demonstrating the request structure for migrating to the OpenAI Responses API. | Exact payloads, commands, or snippets shown in A curl command demonstrating the request structure for migrating to the OpenAI Responses API. |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-chat-.text | A code example demonstrating the transition from the Chat Completions API to the Responses API using JavaScript. | Exact payloads, commands, or snippets shown in A code example demonstrating the transition from the Chat Completions API to the Responses API using JavaScript. |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-chat--2.text | A text-based code example demonstrating the transition from the Chat Completions API to the Responses API using Python-style syntax. | Exact payloads, commands, or snippets shown in A text-based code example demonstrating the transition from the Chat Completions API to the Responses API using Pytho... |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-pytho-2.text | A Python code example demonstrating how to transition from legacy chat completions to the new Responses API by managing conversation context. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to transition from legacy chat completions to the new Responses API by managi... |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-javas-2.text | A JavaScript code example demonstrating how to migrate existing chat completion logic to the new Responses API by managing context and appending outputs. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to migrate existing chat completion logic to the new Responses API by man... |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-javas-3.text | A JavaScript code example demonstrating how to migrate from legacy API calls to the new Responses API using the OpenAI client. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to migrate from legacy API calls to the new Responses API using the OpenA... |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-pytho-3.text | A Python code example demonstrating how to migrate from legacy API calls to the new Responses API using the client.responses.create method. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to migrate from legacy API calls to the new Responses API using the client.re... |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-guide.text | A text-based guide outlining the steps and structural changes required to migrate from existing OpenAI API patterns to the Responses API. | Exact payloads, commands, or snippets shown in A text-based guide outlining the steps and structural changes required to migrate from existing OpenAI API patterns t... |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-guide-2.text | A text-based guide outlining the steps and structural changes required to migrate from existing OpenAI API patterns to the Responses API. | Exact payloads, commands, or snippets shown in A text-based guide outlining the steps and structural changes required to migrate from existing OpenAI API patterns t... |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-curl-.text | A curl command demonstrating the transition from chat completions to the Responses API using a JSON payload. | Exact payloads, commands, or snippets shown in A curl command demonstrating the transition from chat completions to the Responses API using a JSON payload. |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-pytho-4.text | A Python code example demonstrating the transition from the Chat Completions API to the new Responses API using the OpenAI client. | Exact payloads, commands, or snippets shown in A Python code example demonstrating the transition from the Chat Completions API to the new Responses API using the O... |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-chat--3.text | A code comparison demonstrating the transition from the chat completions endpoint to the new responses API using a JSON schema response format. | Exact payloads, commands, or snippets shown in A code comparison demonstrating the transition from the chat completions endpoint to the new responses API using a JS... |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-curl--2.text | A curl command demonstrating the request structure for migrating to the OpenAI Responses API using a JSON schema. | Exact payloads, commands, or snippets shown in A curl command demonstrating the request structure for migrating to the OpenAI Responses API using a JSON schema. |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-pytho-5.text | A Python code example demonstrating how to transition from legacy API calls to the new Responses API using the client.responses.create method. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to transition from legacy API calls to the new Responses API using the client... |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-jsons.text | A JavaScript code example demonstrating how to use the new Responses API with a JSON schema for structured output. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the new Responses API with a JSON schema for structured output. |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-javas-4.text | A JavaScript code example demonstrating the transition from the Chat Completions API to the new Responses API. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating the transition from the Chat Completions API to the new Responses API. |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-pytho-6.text | A Python code example demonstrating the transition from the Chat Completions API to the new Responses API. | Exact payloads, commands, or snippets shown in A Python code example demonstrating the transition from the Chat Completions API to the new Responses API. |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-curl.text | A curl command demonstrating the transition from legacy API calls to the new Responses API endpoint. | Exact payloads, commands, or snippets shown in A curl command demonstrating the transition from legacy API calls to the new Responses API endpoint. |
examples/migrate-to-the-responses-api-openai-openai-responses-api-migration-nodej.text | A Node.js code example demonstrating how to use the new Responses API to create a completion with model and tool parameters. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to use the new Responses API to create a completion with model and tool para... |
examples/migrate-to-the-responses-api-openai-openai-responses-api-python-migratio-4.text | A Python code snippet demonstrating how to use the client.responses.create method to migrate from legacy API calls to the new Responses API. | Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to use the client.responses.create method to migrate from legacy API calls to... |
examples/migrate-to-the-responses-api-openai-openai-responses-api-curl-migration--2.text | A curl command demonstrating a request to the new Responses API endpoint with model and tool parameters. | Exact payloads, commands, or snippets shown in A curl command demonstrating a request to the new Responses API endpoint with model and tool parameters. |
What This Skill Covers
- The Responses API is our new API primitive, an evolution of Chat Completions which brings added simplicity and powerful agentic primitives to your integrations.
- Main sections:
About the Responses API,Responses benefits,Examples,Messages vs. Items,Additional differences.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.openai.com/api/docs/guides/migrate-to-responses
