Skip to main content
Conversations

Create a conversation

POST
/openai/v1/conversations

Creates a new conversation resource.

Header Parameters
x-ms-user-isolation-keystringoptional
Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.
Request BodyContent-Type: application/json
metadataOpenAI.Metadata | null
items(message | item_reference | output_message | file_search_call | computer_call | computer_call_output | web_search_call | function_call | function_call_output | tool_search_call | tool_search_output | reasoning | compaction | image_generation_call | code_interpreter_call | local_shell_call | local_shell_call_output | shell_call | shell_call_output | apply_patch_call | apply_patch_call_output | mcp_list_tools | mcp_approval_request | mcp_approval_response | mcp_call | custom_tool_call_output | custom_tool_call)[] | null
One of the following:
(message | item_reference | output_message | file_search_call | computer_call | computer_call_output | web_search_call | function_call | function_call_output | tool_search_call | tool_search_output | reasoning | compaction | image_generation_call | code_interpreter_call | local_shell_call | local_shell_call_output | shell_call | shell_call_output | apply_patch_call | apply_patch_call_output | mcp_list_tools | mcp_approval_request | mcp_approval_response | mcp_call | custom_tool_call_output | custom_tool_call)[]
null
Responses
idstringrequired
The unique ID of the conversation.
objectenumrequired
The object type, which is always `conversation`.
conversation
metadataOpenAI.Metadatarequired
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
created_atintegerrequired
The time at which the conversation was created, measured in seconds since the Unix epoch.