Delete files OPEN-AI with API call

Id like to make an API call to delete all files in OpenAI

The documentation mentions this

Source: https://platform.openai.com/docs/api-reference/files/retrieve

I have tried to pass it through the body and through the query but they both return a 404 response, here is my setup for both attempts:



Scherm­afbeelding 2024-06-12 om 13.42.48

Id like to use the body response so I can array all IDs to delete everything.

Welcome to the Make community!

You inserted an Absolute (full) URL.

If you read the description below it, it says

Enter a path relative … for example…

samliew – request private consultation

Join the Make Fans Discord server to chat with other makers!

3 Likes

ohh damn it literally says to do that just below, haha thanks I will crawl back under the rock (one of those days)

2 Likes

No worries, glad I could help!

1. If anyone has a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

  • others can save time when catching up with the latest activity here, and
  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

4. Do join the unofficial Make Discord server for live chat and video assistance

samliew – request private consultation

Join the Make Fans Discord server to chat with other makers!

1 Like

Yes will do! unfortunately its throwing another error so i cant mark it solved yet.

You didn’t follow the URL format exactly. The OpenAI documentation says you have to insert the file ID as part of the URL.

There is no Body involved. Leave it blank.

You can also complete this brand new course/tutorial in the Make Academy on how to use external APIs — API calls with HTTP modules

  • API and Endpoints
  • Header and body
  • Multipart/form-data
  • OAuth 2.0

samliew – request private consultation

Join the Make Fans Discord server to chat with other makers!

4 Likes

I see, this does work thanks!

So I just need to call the url with different IDs to remove all of them, I cant put more IDs in a single call then I guess?

1 Like

Yes that is correct. You can only do what the external API allows you to do.

samliew – request private consultation

Join the unofficial Make Discord server to chat with us!

2 Likes

I’m still having some issues with the delete API.

Any suggestion?

Welcome to the Make community!

Could you please create a separate topic for this?

While it’s tempting to continue an existing thread, a more effective approach would be to start a new topic. It helps other community users to respond to your query, and keeps our space organised for everyone. If you start a new conversation you are also more likely to get help from other users. You can refer others back to a related topic by including that link in your question. Thank you for understanding and keeping our community neat and tidy.

The “New Topic” link can be found in the top-right of the header:

Join the Make Fans Discord server to chat with other makers!

1 Like