Skip to content
Primary navigation

Delete chat completion

$ openai chat:completions delete
DELETE/chat/completions/{completion_id}

Delete a stored chat completion. Only Chat Completions that have been created with the store parameter set to true can be deleted.

ParametersExpand Collapse
--completion-id: string

The ID of the chat completion to delete.

ReturnsExpand Collapse
chat_completion_deleted: object { id, deleted, object }
id: string

The ID of the chat completion that was deleted.

deleted: boolean

Whether the chat completion was deleted.

object: "chat.completion.deleted"

The type of object being deleted.

Delete chat completion

openai chat:completions delete \
  --api-key 'My API Key' \
  --completion-id completion_id
{
  "object": "chat.completion.deleted",
  "id": "chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2",
  "deleted": true
}
Returns Examples
{
  "object": "chat.completion.deleted",
  "id": "chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2",
  "deleted": true
}