OpenAI

Create a conversation

Create a new conversation

POST /openai/v1/conversations● Supported

Official OpenAI docs ↗

Request body

  • itemsarray可选

    Verified to take effect.

  • metadataobject可选

    Verified to take effect.

Returns

200 conversation

Creates a conversation, optionally with initial items (up to 20 at a time) and metadata. Conversations are partitioned by tenant; only the creating tenant can reference it.

Errors follow the OpenAI format — see error codes

Response

HTTP 200

The created conversation

application/json

NameTypeDescription
idstringId of the conversation, such as `conv_...`; use it as `conversation_id` in conversation calls and as `conversation` in createResponse.
objectstringObject type; always `conversation`.
created_atintegerUnix time in seconds at which the conversation was created.
metadataobjectUp to 16 string key/value pairs; keys at most 64 characters and values at most 512.