/v1/responses Endpoint Introduction
LaoZhang API fully supports OpenAI’s latest Responses API, the next-generation agent-building interface introduced in March 2025. Responses API combines the simplicity of Chat Completions with the tool usage and state management capabilities of Assistants API, providing developers with a more flexible and powerful AI application development experience. Next-Gen API: Responses API is a superset of Chat Completions, providing all Chat Completions features plus advanced capabilities like built-in tools and state management. However, it only supports select new OpenAI models - see details below.Core Features
Built-in Tool Support
Rich tools including web search, file search, code interpreter, function callingState Management
Maintain conversation context and state via previous_response_idReasoning Persistence
O3/O4-mini reasoning tokens persist across requestsFull Compatibility
Supports all tool-capable GPT-4.1 and O3 series modelsSupported Models
Reasoning Models (Recommended)
- O3 Series:
o3,o3-pro,o4-mini - Features: Reasoning tokens persist across requests for smarter contextual understanding
Conversational Models
- GPT-4.1 Series:
gpt-4.1,gpt-4.1-mini - Features: Powerful tool calling and multimodal capabilities
/v1/responses endpoint. Legacy models like GPT-3.5 do not support this interface.
Basic Usage
Simple Conversation
cURL Python Node.jsActual Response Example
Complete response format:Request Parameters
Required Parameters
| Parameter | Type | Description |
|---|---|---|
model | string | Model name, e.g., gpt-4.1, o3 |
input | string | User input content |
Optional Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
instructions | string | null | System instructions defining assistant behavior |
previous_response_id | string | null | Previous response ID for context maintenance |
temperature | float | 1.0 | Controls output randomness (0-2) |
max_output_tokens | int | null | Maximum output tokens |
tools | array | [] | Available tools list |
tool_choice | string | ”auto” | Tool selection strategy |
parallel_tool_calls | boolean | true | Allow parallel tool calls |
store | boolean | true | Store conversation for training |
metadata | object | Custom metadata |
Built-in Tool Support
1. Function Calling
2. Code Interpreter
3. File Search
State Management
Maintaining Conversation Context
Multi-turn Tool Calling
Reasoning Model Features
O3/O4-mini Reasoning Persistence
Reasoning models have special advantages in Responses API:Comparison with Chat Completions
| Feature | Chat Completions | Responses API |
|---|---|---|
| Basic Conversation | ✅ Supported | ✅ Supported |
| Streaming | ✅ Supported | ✅ Supported |
| Function Calling | ✅ Supported | ✅ Enhanced |
| Built-in Tools | ❌ Not supported | ✅ Rich tools |
| State Management | ❌ Stateless | ✅ Stateful |
| Reasoning Persistence | ❌ Not supported | ✅ O3/O4 support |
| File Search | ❌ Not supported | ✅ Supported |
| Code Interpreter | ❌ Not supported | ✅ Supported |
Migration Example
Migrating from Chat Completions to Responses API: Chat Completions Responses APIAdvanced Features
Parallel Tool Calling
Output Format Control
Reasoning Effort Control (O3 Series)
Response Fields
Core Fields
| Field | Type | Description |
|---|---|---|
id | string | Response unique identifier |
object | string | Fixed as “response” |
created_at | integer | Creation timestamp |
status | string | Status: completed/failed/in_progress |
model | string | Actual model version used |
output | array | Output message array |
usage | object | Token usage statistics |
Output Message Format
Usage Statistics
Error Handling
Standard Error Format
Common Errors
| Error Code | Description | Solution |
|---|---|---|
model_not_supported | Model doesn’t support Responses API | Use supported newer models |
invalid_previous_response_id | Invalid previous response ID | Check response ID is correct |
tool_not_available | Tool unavailable | Check tool configuration |
max_tokens_exceeded | Token limit exceeded | Reduce input or set max_output_tokens |
Best Practices
1. State Management Strategy
2. Tool Calling Optimization
3. Reasoning Model Optimization
Future Development
Upcoming Features
- Full Assistants API feature integration (H1 2026)
- More built-in tools: Web search, computer use, etc.
- Model Context Protocol (MCP) support
- Enhanced multimodal capabilities
Migration Timeline
- Now: Can start using Responses API
- H1 2026: Feature parity with Assistants API
- 2026: Assistants API deprecation announcement
- 2027: Complete migration to Responses API
Need more help? Visit LaoZhang API or check OpenAI Responses API Official Documentation.