Skip to content

Delete chat completion

DELETE https://api.fastapi.ai/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.

Returns


A deletion confirmation object.

Example

Request

bash
curl -X DELETE https://api.fastapi.ai/v1/chat/completions/chat_abc123 \
  -H "Authorization: Bearer $FAST_API_KEY" \
  -H "Content-Type: application/json"

Response

bash
{
  "object": "chat.completion.deleted",
  "id": "chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2",
  "deleted": true
}

那年我双手插兜, 让bug稳如老狗