Delete chat completion
delete /chat/completions/{completion_id}
Delete chat completion
Path Parameters
completion_id: string
Returns
-
ChatCompletionDeleted object { id, deleted, object }-
id: stringThe ID of the chat completion that was deleted.
-
deleted: booleanWhether the chat completion was deleted.
-
object: "chat.completion.deleted"The type of object being deleted.
"chat.completion.deleted"
-
Example
curl https://api.openai.com/v1/chat/completions/$COMPLETION_ID \
-X DELETE \
-H "Authorization: Bearer $OPENAI_API_KEY"
Response
{
"id": "id",
"deleted": true,
"object": "chat.completion.deleted"
}
Example
curl -X DELETE https://api.openai.com/v1/chat/completions/chat_abc123 \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json"
Response
{
"object": "chat.completion.deleted",
"id": "chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2",
"deleted": true
}