Delete chat completion

DELETEhttps:/api.openai.com/v1/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.

Path parameters

  • completion_id
    string
    Required
    The ID of the chat completion to delete.

Response

A deletion confirmation object.

Example request
1
curl -X DELETE https://api.openai.com/v1/chat/completions/chat_abc123 \
2
-H "Authorization: Bearer $OPENAI_API_KEY" \
3
-H "Content-Type: application/json"
Example response
1
{
2
"object": "chat.completion.deleted",
3
"id": "chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2",
4
"deleted": true
5
}
Built with