# Build Hour: Responses API

Source: https://www.youtube.com/watch?v=hNr5EebepYs
Recap page: https://rapidrecap.app/video/hNr5EebepYs
Generated: 2025-10-14T13:34:01.11+00:00

---
## Quick Overview

The OpenAI Responses API is designed as the flagship API for building AI agents, offering a simplified structure that combines the ease of Chat Completions with enhanced capabilities for multi-step reasoning and tool use, making it more efficient and cost-effective for complex agentic tasks.

**Key Points:**
- The Responses API is the new flagship API for building agents, succeeding the older Completions and Chat Completions APIs.
- The API facilitates an agentic loop, enabling the model to perform multiple steps/tool calls within a single request.
- It supports built-in tools like web search, file search, computer use, code interpreter, and image generation.
- The new design preserves the model's chain of thought (reasoning) from request to request, unlike the stateless Chat Completions API.
- Performance benchmarks show the Responses API is about 20% faster on multi-turn requests than Chat Completions and is generally cheaper due to reduced token usage.
- Migration from Chat Completions involves updating HTTP endpoints from /v1/chat/completions to /v1/responses and adjusting the message structure (using 'items' instead of 'messages').
- The build hour template, including the agent logic, will be made open source on GitHub.

![Screenshot at 00:04: The title slide showing 'OpenAI Build Hours' and the topic 'Responses API', setting the stage for the presentation on the new agent-focused API.](https://ss.rapidrecap.app/screens/hNr5EebepYs/00-00-04.png)

**Context:** This session, part of OpenAI's 'Build Hours' series, introduces and details the new Responses API, positioned as the successor to the older Completions and Chat Completions APIs, specifically optimized for building complex, stateful AI agents that require multi-step reasoning and tool execution. The presenters explain the architectural shift, highlighting how the new API structure simplifies agent development by providing built-in tools and state persistence, which contrasts with the per-request context management of the previous Chat Completions API.

## Detailed Analysis

The presentation announces the Responses API as the successor to the older Completions and Chat Completions APIs, designed specifically to support advanced AI agents. The core advantage is enabling an "agentic loop" where the model can execute multiple steps, including using built-in tools (like web search, file search, code interpreter, and image generation) and performing multi-turn reasoning, all within one request. This stateful approach contrasts with the stateless nature of Chat Completions, where context had to be manually managed across requests. The new API offers better performance (up to 20% faster on multi-turn requests) and cost efficiency because it emits discrete, strongly-typed events (like tool calls, reasoning steps, and final output) instead of streaming raw text deltas. A key feature is the ability to rehydrate a conversation's chain of thought by passing previous response items back into the context, which is crucial for complex reasoning. The presenters show a migration guide and a demo of the OpenAI Simulator, demonstrating how to configure a web search tool within the Agent Builder interface, confirming the new API simplifies the development of complex agentic applications.

### API Evolution

- Progression from /v1/completions (GPT-3) to /v1/chat/completions to the new /v1/responses API supporting GPT-4 and multimodal models.

### Key Benefits of Responses API

- Enables an agentic loop for multi-step tasks within one request
- Preserves reasoning/chain-of-thought state across requests
- Offers built-in tools (Web Search, File Search, Code Interpreter, Image Generation, etc.).

### Items -> Items Design Pattern

- A new design pattern allowing for a flexible record of what the model said and did, broken down into distinct, strongly-typed items (e.g., reasoning, tool_call, text).

### Performance & Efficiency

- Responses API is ~20% faster on multi-turn requests and more cost-efficient than Chat Completions because it emits fewer tokens.

### Migration Strategy

- Involves updating HTTP endpoints and shifting from 'messages' to 'items' in the request body, leveraging the provided migration pack for assistance.

### Tool Definition Example

- Demonstrates defining a custom 'web_search_tool' with server details, function names, and requiring approval for execution.

### Q&A Highlights

- Prompt caching works by matching the prefix of the input prompt tokens; developers can manage context state by passing the conversation history (items) back in subsequent requests.

![Screenshot at 00:04: Initial slide introducing the 'OpenAI Build Hours' webinar focused on the 'Responses API'.](https://ss.rapidrecap.app/screens/hNr5EebepYs/00-00-04.png)
![Screenshot at 00:09: Steve Coffey introducing himself as an engineer on the API team for the session.](https://ss.rapidrecap.app/screens/hNr5EebepYs/00-00-09.png)
![Screenshot at 00:29: A slide showing various Build Hours videos available on YouTube, indicating community engagement and resources.](https://ss.rapidrecap.app/screens/hNr5EebepYs/00-00-29.png)
![Screenshot at 00:51: Slide detailing the agenda for the session, covering 'Why Responses?', migration, demo, AgentKit preview, and Q&A.](https://ss.rapidrecap.app/screens/hNr5EebepYs/00-00-51.png)
![Screenshot at 02:36: Diagram illustrating the evolution of OpenAI APIs: /v1/completions -\> /v1/chat/completions -\> /v1/responses, matching model evolution.](https://ss.rapidrecap.app/screens/hNr5EebepYs/00-02-36.png)
![Screenshot at 04:13: Slide summarizing the key motivations for the Responses API: Built-in Tools, Items -\> Items structure, Purpose built for reasoning models, Multimodal workflows, and Redesigned streaming.](https://ss.rapidrecap.app/screens/hNr5EebepYs/00-04-13.png)
![Screenshot at 07:27: Terminal showing the execution of a shell command, likely setting up the environment or running a script.](https://ss.rapidrecap.app/screens/hNr5EebepYs/00-07-27.png)
![Screenshot at 12:05: Diagram illustrating the Agent Platform architecture, centered around Orchestration \(Responses API and Agents SDK\) connected to UX and Tools.](https://ss.rapidrecap.app/screens/hNr5EebepYs/00-12-05.png)
![Screenshot at 13:38: Code snippet showing the configuration of two characters, 'Sam' and 'Wendy', defining their initial messages and instructions.](https://ss.rapidrecap.app/screens/hNr5EebepYs/00-13-38.png)
![Screenshot at 15:18: GitHub repository page for the 'completion-response-migration-pack', detailing migration steps and heuristics for developers switching APIs.](https://ss.rapidrecap.app/screens/hNr5EebepYs/00-15-18.png)
