Detailed guide on OpenAI API compatibility with OpenResponses
Responses API Property | Chat Completions API Equivalent | Notes |
---|---|---|
input | messages | Structure your input as messages array |
input.content | messages.content | Content structure for messages |
input.content.text | messages.content.text | Text content in message |
input.content.image_url | messages.content.image_url | Image URL for multimodal inputs |
input.content.file_id | messages.content.file_id | File reference |
input.role | messages.role | User, assistant, or system role |
model | model | Model identifier |
instructions | messages (role: system or developer ) | Add as system/developer messages |
max_output_tokens | max_completion_tokens | Maximum tokens in response |
parallel_tool_calls | parallel_tool_calls | Enable parallel tool calls |
temperature | temperature | Controls randomness |
top_p | top_p | Controls diversity via nucleus sampling |
tools | tools | Available tools for the model |
tool_choice | tool_choice | Specifies which tool to use |
metadata | metadata | Custom metadata for the request. This feature is managed and not forward to model provider. |
stream | stream | Enable streaming response |
store | store | Persist conversation history. This feature is managed and not forward to model provider. Default value is null in Open-Responses. See Response Store Configuration for details. |
reasoning.effort | reasoning_effort | Controls reasoning depth |
text.format | response_format.type | Specifies response format |
text.format.type | response_format.type | Type of response format |
text.format.json_schema | response_format.json_schema | JSON schema for structured responses |
input
and messages
involves complex logic:
user
: Converted to user
message with appropriate content partsassistant
: Converted to assistant
messagesystem
: Converted to system
message and concatenated with instructionsdeveloper
: Converted to developer
message and concatenated with instructionstool
: Converted to tool
messageauto
or none
text.format
and response_format
includes:
ReasoningEffort
enum valueResponses API Response Property | Chat Completions API Response Equivalent | Notes |
---|---|---|
created_at | created | Timestamp of response creation |
id | id | Unique identifier for the response |
model | model | Model used for the response |
object | object (always chat.completion ) | Object type identifier |
output | choices[].message.content | Main content of the response |
output_text | choices[].message.content | Text content of the response |
status | choices[].finish_reason | Reason for completion |
usage | usage | Token usage statistics |
tool_calls | choices[].message.tool_calls | Tool calls in the response |
response.created
) are generated when streaming startsResponses API Event | Chat Completions API Equivalent | When Published | Implementation Details |
---|---|---|---|
response.created | Initial chunk creation | On request initiation | Open-Responses generates this when streaming starts |
response.in_progress | Streaming chunks (choices[].delta ) | As response streams | Sent for each content chunk |
response.completed | Final chunk with finish_reason: stop | Completion of response | Generated when final chunk is received |
response.failed | HTTP error response | On error occurrence | Open-Responses handles error mapping |
response.incomplete | Final chunk with finish_reason: length | Token limit exceeded | Detected via finish reason |
response.output_item.added | Streaming chunks (choices[].delta ) | As new items begin streaming | Generated at content boundaries |
response.output_item.done | Final chunk completion (finish_reason ) | Item streaming completion | Sent when item is complete |
response.content_part.added | N/A - Open-Responses-specific enhancement | As content parts start | Provides finer-grained progress |
response.content_part.done | N/A - Open-Responses-specific enhancement | Content streaming completed | Indicates part completion |
response.output_text.delta | Partial streaming (choices[].delta.content ) | Each incremental content piece | Direct mapping of content chunks |
response.output_text.done | Final chunk (choices[].message.content ) | Text content finalized | Generated when content finishes |
response.refusal.delta | Error handling (Open-Responses enhancement) | Incremental refusal text | Special handling for moderation |
response.refusal.done | Error handling (Open-Responses enhancement) | Refusal text finalized | Marks completion of refusal |
response.function_call_arguments.delta | Partial function call arguments streaming (choices[].delta ) | Partial function arguments | Mapped from tool call fragments |
response.function_call_arguments.done | Final function arguments chunk | Function call arguments finalized | Generated when tool call completes |
response.{tool_name}.in_progress | N/A - Open-Responses-specific enhancement | Tool execution started | Open-responses managed tool lifecycle event indicating tool processing has begun |
response.{tool_name}.executing | N/A - Open-Responses-specific enhancement | Tool is executing | Open-responses managed tool lifecycle event indicating active execution |
response.{tool_name}.completed | N/A - Open-Responses-specific enhancement | Tool execution finished | Open-responses managed tool lifecycle event indicating successful completion |
response.file_search_call.* | Managed as tool calls (Open-Responses enhancement) | File search lifecycle | Open-responses managed tool implementation |
response.web_search_call.* | Managed as tool calls (Open-Responses enhancement) | Web search lifecycle | Open-responses managed tool implementation |
Note: For tool-specific events, {tool_name}
is replaced with the actual name of the tool being executed, converted to lowercase with leading non-word characters replaced by underscores. These Open-responses managed tool events provide detailed visibility into the tool execution lifecycle beyond what the standard Chat Completions API offers.
response.{tool_name}.in_progress
: Emitted when a tool call is detected and processing beginsresponse.{tool_name}.executing
: Emitted when the tool is actively executingresponse.{tool_name}.completed
: Emitted when the tool execution completes successfullyprevious_response_id
: Conversation history tracking and chaining
truncation
Strategy:
auto
: Open-Responses implements automatic content truncation based on token limitsdisabled
: Platform ensures complete responses without truncationinclude
Parameter:
reasoning.generate_summary
:
input
as a well-formed array of messages with clear rolesuser
, assistant
, system
, developer
, tool
)instructions
and system messages in input
, be aware they will be concatenatedinput
take precedence in positioninginstructions
or system messages) for clarityresponse.{tool_name}.*
) to provide better UX during tool executionitem_id
and output_index
in tool events to correlate with the associated function callsexecuting
phase