Example
http
curl https://api.openai.com/v1/conversations/conv_123/items \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"items": [
{
"type": "message",
"role": "user",
"content": [
{"type": "input_text", "text": "Hello!"}
]
},
{
"type": "message",
"role": "user",
"content": [
{"type": "input_text", "text": "How are you?"}
]
}
]
}'Response
json
{
"object": "list",
"data": [
{
"type": "message",
"id": "msg_abc",
"status": "completed",
"role": "user",
"content": [
{"type": "input_text", "text": "Hello!"}
]
},
{
"type": "message",
"id": "msg_def",
"status": "completed",
"role": "user",
"content": [
{"type": "input_text", "text": "How are you?"}
]
}
],
"first_id": "msg_abc",
"last_id": "msg_def",
"has_more": false
}Delete an item
delete /conversations/\{conversation_id\}/items/\{item_id\}
Delete an item from a conversation with the given IDs.