Assistant vision image expiration policy

Hello.

I noticed that Assistants API finally supports vision capabilities now.
I upload images using Files API:

const file = await openai.files.create({
  purpose: 'vision',
  file: await fetch(url)
})

And use file.id as a reference in Assistant messages:

await openai.beta.threads.messages.create(thread.id, {
	content: [{
		type: 'image_file',
		image_file: {
			file_id: file.id,
		},
	}],
	role: 'user',
})

But I don’t understand how to set up an expiration policy. I want images to delete automatically after some time (7 days, for example) or if there are no references in threads, for example, when a message with this file_id becomes out of the scope of a thread’s context windows.

I tried to delete an image manually, but the thread failed to run after that.
I can’t even change the contents of a message because the modifyMessage method only allows updating the metadata.

And what’s the pricing for File storage for such images? I only see pricing for Vector Storage.

File storage doesn’t cost anything. If you fill it up with 100GB max for an organization, it could stop taking uploads, though.

I posted early in the Assistants v2 topic that file storage with an additional metadata layer would be extremely useful. You could then perform queries or actions based on data fields, such as “delete if over my expiration_date AND my project ID AND purpose:assistant_output”. They said “yeah, that could be neat…”

For now you have to create your own database of what’s created, and do single file delete API calls.