Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/migrate-to-the-responses-api-openai-workflow-guide.mdA 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.textA 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.textA 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-.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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-.textA 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-.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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-.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. 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