Remove file from Custom GPT
Removes a file from a Custom GPT. The file itself is not deleted.
DELETE
https://api.deutschlandgpt.de/v2/custom-gpts/{id}/files/{fileId}Example request
curl https://api.deutschlandgpt.de/v2/custom-gpts/{id}/files/{fileId} \
-X DELETE \
-H "Authorization: Bearer $DGPT_API_KEY"curl https://api.deutschlandgpt.de/v2/custom-gpts/{id}/files/{fileId} \
-X DELETE \
-H "Authorization: Bearer $DGPT_API_KEY"import os, requests
response = requests.delete(
"https://api.deutschlandgpt.de/v2/custom-gpts/{id}/files/{fileId}",
headers={"Authorization": f"Bearer {os.environ['DGPT_API_KEY']}"},
)
print(response.json())import os, requests
response = requests.delete(
"https://api.deutschlandgpt.de/v2/custom-gpts/{id}/files/{fileId}",
headers={"Authorization": f"Bearer {os.environ['DGPT_API_KEY']}"},
)
print(response.json())const response = await fetch('https://api.deutschlandgpt.de/v2/custom-gpts/{id}/files/{fileId}', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.DGPT_API_KEY}`,
},
});
console.log(await response.json());const response = await fetch('https://api.deutschlandgpt.de/v2/custom-gpts/{id}/files/{fileId}', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.DGPT_API_KEY}`,
},
});
console.log(await response.json());Parameters
idstring<uuid>requiredCustom GPT ID
fileIdstringrequiredID of the file to remove
Response
204No response body.
File removed
Response codes
204
File removed
401
Unauthorized
402
Insufficient credits or spending limit exceeded
Error404
Custom GPT or file not found
Was this page helpful?