How to delete a file in the new vectorstore API

I’m uncertain about the correct method for deleting a file in the new Assistant API vectorstore. From what I’ve gathered, files can be automatically removed by specifying an expiration term in the vectorStore policy.

In addition to this method, would calling the create_and_poll method with a new list of files, excluding the one I want to delete, also suffice? My primary goal is to optimize costs, and I would appreciate guidance on how to avoid being billed for unused storage space.

I am also unsure if storage space is billed for files that are created but not added to a vectorStore.

Not sure If I understand your issue properly but there’s a method provided in API Reference on Deleting File from Vector Stores.

It’s not billed on File Uploaded, but for the Vector Storage.

For File Search using Assistant:

$0.10 / GB of vector-storage per day (1 GB free)

Code Interpreter using Assistant:

$0.03 / session

Let me know if this answered your question.

1 Like

Perfect, thanks!

That’s exactly the two answers I was looking for

Have a nice day

L

1 Like