Skip to main content
Conversations

Delete conversation

Delete a conversation. Message items are not deleted.

DELETE
/conversations/{conversation_id}
Python
import os
from openai import OpenAI

client = OpenAI(
  api_key=os.getenv("DASHSCOPE_API_KEY"),
  base_url="https://dashscope-intl.aliyuncs.com/api/v2/apps/protocols/compatible-mode/v1",
)

result = client.conversations.delete("conv_xxx")
print(result)
{
  "deleted": true,
  "id": "conv_xxx",
  "object": "conversation.deleted"
}

Authorizations

string
header
required

Qwen Cloud API Key. Create one in the console.

Path Parameters

string
required

The conversation ID.

conv_xxx

Response

200-application/json
boolean

Whether the deletion succeeded.

string

The deleted conversation's ID.

conv_xxx
enum<string>

Always conversation.deleted.

conversation.deleted