AI / Core OpenAI Codex Application Fundamentals Interview Questions
What is the OpenAI Responses API and how does it differ from the Chat Completions API?
The Responses API (/v1/responses), launched in March 2025, is OpenAI's recommended API primitive for new projects. It is a superset of the Chat Completions API, providing everything Chat Completions offers plus built-in agentic capabilities.
| Feature | Chat Completions | Responses API |
|---|---|---|
| Endpoint | /v1/chat/completions | /v1/responses |
| Status | Fully supported; not deprecated | Recommended for all new projects |
| Built-in tools | None (manual function calling only) | Web search, file search, computer use, code interpreter, remote MCPs |
| State management | Manual - must pass full history each turn | store: true persists state; previous_response_id chains turns |
| Output format | choices[].message.content | output array of typed Items |
| Reasoning models | Limited tool support | Full reasoning + tool support (e.g. GPT-5 series) |
| Prompt caching | Available | 40-80% improved cache utilisation vs Chat Completions |
| Performance | Baseline | 3% improvement on SWE-bench with same prompt (internal evals) |
# Responses API - Python from openai import OpenAI client = OpenAI() result = client.responses.create( model="gpt-5.5", input="Find the null pointer exception: ...your code here...", reasoning={"effort": "high"}, ) print(result.output_text) # Chaining turns with previous_response_id: followup = client.responses.create( model="gpt-5.5", input="Now fix it.", previous_response_id=result.id, )
The Responses API uses Items (a typed union of model actions) instead of Messages. Key advantages include stateful multi-turn interactions, better cache utilisation, and first-class support for reasoning models and built-in tools.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
