The Responses API¶
Forward-Looking
This page covers OpenAI's new Responses API — the future direction of the platform. The workshop exercises use the Chat Completions API because it works across all providers (OpenAI, Azure, GitHub Models). This page helps you understand where things are headed.
Why a New API?¶
The Responses API (client.responses.create()) is OpenAI's new primary API, designed to simplify patterns that were complex with Chat Completions:
- Built-in tools — web search, file search, code interpreter (no external setup)
- Simpler conversation passing — pass
previous_response_idinstead of the whole message list - Flat tool definitions — no nested
functionwrapper - Chain-of-thought passing — include reasoning tokens from previous calls
- Output compaction — automatically summarize long conversations
Side-by-Side Comparison¶
Basic Chat¶
Tool Definitions¶
Tool Results¶
Conversation Continuity¶
Key Differences¶
| Feature | Chat Completions | Responses API |
|---|---|---|
| Endpoint | /chat/completions |
/responses |
| Input format | messages list |
input (string or items) |
| System prompt | system role message |
instructions parameter |
| History | Pass full messages |
previous_response_id |
| Tool defs | Nested under function |
Flat at top level |
| Tool results | tool role |
function_call_output type |
| Output text | choices[0].message.content |
output_text |
| Built-in tools | No | web_search, file_search, code_interpreter |
| Provider support | OpenAI, Azure, GitHub Models | OpenAI only (currently) |
| Status | Supported indefinitely | New primary API |
Why the Workshop Uses Chat Completions¶
- Cross-provider compatibility — Azure OpenAI and GitHub Models use Chat Completions. The Responses API may not be available on all providers.
- Universal patterns — The concepts (messages, tools, loops) transfer directly to any provider or framework.
- Stability — Chat Completions is mature and "supported indefinitely" per OpenAI.
Translation Guide¶
If you want to convert any workshop exercise to the Responses API:
- Replace
client.chat.completions.create()→client.responses.create() - Move the
systemmessage →instructionsparameter - Replace
messages→input - Replace
response.choices[0].message→ checkresponse.outputitems - Replace
.content→.output_textfor final text - Replace
toolrole messages →function_call_outputitems - For multi-turn: store
response.idand pass asprevious_response_id
Key Takeaways¶
- The Responses API is OpenAI's forward direction — simpler, with built-in tools
- Chat Completions isn't going away — it's "supported indefinitely"
- The core concepts are the same: messages, tools, loops
- Cross-provider workshops like this one benefit from Chat Completions' universal support
- Understanding Chat Completions makes it easy to adopt the Responses API later