Skip to content
中文

Delete a conversation item

Call Create conversation first, then replace conv_123 with the returned conv_ ID. Replace item_123 with an item ID from Create conversation items or List conversation items.

DELETE/openai/v1/conversations/{conversation_id}/items/{item_id}● Supported

Official OpenAI docs ↗

Request parameters

  • conversation_idstringrequired

    path:

  • item_idstringrequired

    path:

Returns

200 conversation

Deletes a single item of a conversation and returns the conversation object (not the deleted item).

Errors follow the OpenAI format — see error codes

Request

curl
# Call Create conversation first, then replace conv_123 with the returned conv_ ID. Replace item_123 with an item ID from Create conversation items or List conversation items.
curl -X DELETE https://api.deepraxis.com/openai/v1/conversations/conv_123/items/item_123 \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
Python
# Call Create conversation first, then replace conv_123 with the returned conv_ ID. Replace item_123 with an item ID from Create conversation items or List conversation items.
from openai import OpenAI

client = OpenAI(
    base_url="https://api.deepraxis.com/openai/v1",
    api_key="$PRAXIS_API_KEY",
)

conversation = client.conversations.items.delete(
    "item_123",
    conversation_id="conv_123",
)
TypeScript
// Call Create conversation first, then replace conv_123 with the returned conv_ ID. Replace item_123 with an item ID from Create conversation items or List conversation items.
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.deepraxis.com/openai/v1",
  apiKey: "$PRAXIS_API_KEY",
});

const conversation = await client.conversations.items.delete("item_123", {
  conversation_id: "conv_123",
});

Response 200

{
  "id": "conv_2e54e8338c7c4604ba8dd5b7",
  "object": "conversation",
  "created_at": 1790266964,
  "metadata": {
    "probe": "ticket-4483"
  }
}

Response

HTTP 200

The conversation, with the item removed

application/json

Name Type Description
id string Id of the conversation, such as conv_...; use it as conversation_id in conversation calls and as conversation in createResponse.
object string Object type; always conversation.
created_at integer Unix time in seconds at which the conversation was created.
metadata object Up to 16 string key/value pairs; keys at most 64 characters and values at most 512.