Responses
OpenAI Responses API examples for structured output, tool use, multimodal input, deep research, reasoning, and storage controls.
| Example | Description |
|---|---|
| OpenAI Agent Flex Tier | Run o4-mini on the flex service tier with the OpenAIResponses model. |
| OpenAI Basic | Run a gpt-5.6-luna agent through the Responses API in sync, async, and streaming modes. |
| DB | Persist Responses API sessions in Postgres and answer a history-dependent follow-up. |
| OpenAI Deep Research Agent | Build a cited web research agent with OpenAI Responses, with a current alternative to the retired Deep Research recipe. |
| OpenAI Image Agent | Describe an image from a URL and fetch related news via web search with OpenAIResponses. |
| OpenAI Image Agent Bytes | Pass image bytes to a Responses API agent that pairs vision with web search. |
| OpenAI Image Agent With Memory | Reference an earlier image in follow-up questions after adding a database for session history. |
| Image Generation Agent | Generate and save an image with OpenAITools and GPT Image 2. |
| Knowledge | Answer questions from a PDF stored in PgVector knowledge with OpenAIResponses. |
| Memory | Store user memories and session summaries in Postgres while chatting through the Responses API. |
| OpenAI PDF Input Local | Query a PDF with an explicit File Search index, bounded indexing checks, and cleanup of owned resources. |
| OpenAI PDF Input URL | Query a PDF with an explicit File Search index, bounded indexing checks, and cleanup of owned resources. |
| OpenAI Reasoning O3 Mini | Stream retrieved stock quotes from o3-mini with YFinance tools via the Responses API. |
| OpenAI Structured Output | Generate a MovieScript Pydantic model via JSON mode, strict, and guided structured output. |
| OpenAI Structured Output With Tools | Combine web search tools with a Pydantic output schema on gpt-5-mini. |
| Tool Use | Answer a news question with WebSearchTools through the Responses API. |
| OpenAI Tool Use GPT 5 | Fetch stock quotes through the Responses API with cached YFinance tool results. |
| OpenAI Tool Use O3 | Fetch stock quotes through the Responses API with cached YFinance tool results. |
| OpenAI WebSearch Builtin Tool | Combine the built-in web_search_preview tool with FileTools to search and save results to disk. |
| ZDR Reasoning Agent | Disable Responses application-state storage with store=False while retaining multi-turn context in InMemoryDb. |
| Background Mode | Run GPT-5.4 in background mode with automatic polling and a 600-second default maximum wait. |
| OpenAI File Input Direct | Attach files by URL, local path, or raw bytes to a Responses API agent. |
| Responses Image Agent File | Attach a local image by filepath to a Responses API agent, overriding the MIME type if needed. |
| OpenAI Reasoning Effort | Set xhigh reasoning effort and request an automatic reasoning summary from OpenAI Responses. |
| Responses Verbosity Control | Set desired response detail through OpenAI Responses while comparing retrieved stock quotes. |