# Assistant vision image expiration policy

**URL:** <https://community.openai.com/t/assistant-vision-image-expiration-policy/757675>\
**Category:** API\
**Tags:** api, gpt-4-vision, assistants, assistants-api\
**Created:** [May 16, 2024, 4:44pm UTC](https://community.openai.com/t/assistant-vision-image-expiration-policy/757675 "2024-05-16T16:44:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxpain](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/maxpain/32/49915_2.png) [@maxpain](https://community.openai.com/u/maxpain)\
**Post date:** [May 16, 2024, 4:44pm UTC](https://community.openai.com/t/assistant-vision-image-expiration-policy/757675/1 "2024-05-16T16:44:58Z")

</div>

Hello.

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

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

```

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

```typescript
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.

---

<div class="post-metadata">

**Author:** ![\_j](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/32/766292_2.png) [@\_j](https://community.openai.com/u/_j)\
**Post date:** [May 16, 2024, 5:00pm UTC](https://community.openai.com/t/assistant-vision-image-expiration-policy/757675/2 "2024-05-16T17:00:49Z")

</div>

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.
