OpenAI Responses API Explained: The New Way to Build AI Agents

The OpenAI Responses API is the agent-native endpoint: one call, typed output items, stored state, and built-in tools. Tools, pricing, and how it differs.

By Galactic News Editorial · Published 2026-11-20T22:33:27+00:00 · Updated 2026-11-20T22:33:27+00:00

OpenAI Responses API explained for developers building AI agents

OpenAI Responses API Explained: The New Way to Build AI Agents

The OpenAI Responses API is the company's agent-oriented API. One endpoint, POST /v1/responses, returns a stored response object that can carry text, images, function calls, and results from built-in tools. It launched on March 11, 2025. OpenAI calls it the new API primitive, and it is where new agent features ship first.

If you build AI agents, this is the API to learn. Chat Completions still works for simple text generation. Responses is for anything that needs tools, memory across turns, or multi-step reasoning.

OpenAI Responses API Explained

A Responses request needs two things: a model and an input. Input accepts a plain string or a list of typed items, including text, images, files, and audio. The response object contains an id, an output list, an output_text convenience field, usage data, and metadata about any tools that ran.

The output list is the key difference from Chat Completions. Where Chat Completions returns one message, Responses returns typed items in the order they happened: message, reasoning, function_call, web_search_call, file_search_call, code_interpreter_call, and image_generation_call. Each step the model took is visible as its own item.

Responses are stored server-side by default. To continue a conversation, pass the previous response id as previous_response_id. The model keeps its reasoning state across turns, which improves accuracy on multi-step tasks. You can also build your own state by passing the full item list back in.

How It Differs From Chat Completions

CapabilityChat CompletionsResponses API
EndpointPOST /v1/chat/completionsPOST /v1/responses
Output shapeOne messageTyped output item list
Built-in toolsLimitedWeb search, file search, code interpreter, computer use, image generation, remote MCP
Multi-turn stateYou manage itStored responses, pass previous_response_id
Reasoning itemsNot exposedReasoning summaries available
Agentic loopManualBuilt in: multiple tools per request

Migration has three parts: send requests to /v1/responses, read output from the typed output array, and choose how to carry state between turns. The SDKs expose an output_text helper that Chat Completions lacks.

Built-In Tools

Responses ships hosted tools. You list them in the tools array. The model decides when to call them, and OpenAI runs them server-side.

Your own functions work the same way. List them as function tools, and the model returns function_call items. Your code runs the function and returns a function_call_output item. One request can mix hosted tools and your own functions freely.

Pricing: What Each Tool Costs

Model tokens bill at standard API rates. Hosted tools add their own fees on top. These rates come from OpenAI's pricing page.

ToolPrice
Web search$10 per 1,000 calls, plus search content tokens at model rates
File search$2.50 per 1,000 calls; storage $0.10 per GB per day, first 1 GB free
Code interpreter / hosted shell$0.03 to $1.92 per 20-minute session, by container size
Computer useNo separate fee; screenshots bill as image input

Watch for multi-call behavior. One /v1/responses request can trigger two or three billable web searches. Budget for that when you estimate costs.

A Minimal First Request

  1. Install the SDK. Run pip install --upgrade openai. You need Python 3.9 or newer.
  2. Send a plain request. Call client.responses.create with a model and an input string. Read response.output_text.
  3. Add a tool. Pass tools with a web_search entry and ask a time-sensitive question. Inspect the web_search_call item in response.output.
  4. Chain a turn. Pass the first response id as previous_response_id in the next call. The model continues with context intact.
  5. Add your own function. Define a function tool, handle the function_call item in your code, and return the result as function_call_output.

Steer tool choice with tool_choice: auto by default, required to force a call, or allowed_tools to restrict the model to a named subset.

Bottom Line

Responses is OpenAI's agent primitive: one endpoint, typed output items, stored state, and hosted tools in a single call. Use Chat Completions for simple text. Use Responses the moment your app needs search, files, code, or multi-step tool use. Start with a plain request, add one tool, and watch the output items before you build the full loop.