Skip to content

Delete an assistant

Get an API key to send requests.

POSThttps://gptunnel.ru/v1/assistant/delete

Deletes an assistant created by the API key owner. The assistant disappears from the catalog and stops responding in chat.

Request headers

ParameterTypeDescription
Authorization*stringAPI key

Request body

ParameterTypeDescription
id*stringAssistant ID from the /v1/assistant/create or /v1/assistant/list response

After deletion, the assistant also disappears from the assistant list. A second delete request with the same id returns HTTP 404.

Set GPTUNNEL_API_KEY to your API key and GPTUNNEL_ASSISTANT_ID to the id of your own test assistant that you want to delete.

import json
import os
from urllib.request import Request, urlopen
body = {
"id": os.environ['GPTUNNEL_ASSISTANT_ID']
}
request = Request(
'https://gptunnel.ru/v1/assistant/delete',
headers={
'Authorization': os.environ['GPTUNNEL_API_KEY'],
'Content-Type': 'application/json',
},
data=json.dumps(body).encode('utf-8'),
)
with urlopen(request, timeout=60) as response:
print(json.load(response))
{
"object": "assistant.deleted",
"id": "68c9b2d1e4b0a2d3c4f5e6b8",
"deleted": true
}