Hi everyone, I’m migrating our code interpreter from the Assistants API style to the Responses API style. I understand that I can upload files through container uploads for operations with models. However, I also see that I can use file IDs obtained from the /v1/files
endpoint, which don’t expire like containers. I’m confused about the relationship between files uploaded via container URLs and those accessed via /v1/files
. Are there any documents that explain this relationship? Thanks!
Those files are completely separate https://platform.openai.com/docs/api-reference/container-files
As far as I can see there is no relationship between the two. And at the moment, as per the documentation containers expire in 20 minutes, so indeed the files are not persisted.
Also in my experience currently using Responses API it is virtually impossible to get a correct reference to a container file in annotations - I have solved it by always using the container file list to get all the (in my case) created files.
@jlvanhulst can you elaborate on the issue with container file annotations? Based on the thread titled “Reliably retrieving code interpreter files from the container?” (unable to include link due to trust level) if the file is not annotated by the model, it also won’t be included in the container (this is also my experience). Thoughts/advice on this?
I have not had a problem with the file being referenced in the container (output) files. But in the response output it is/was often missing in the annotations. So that was my challenge.
I does seem that at the moment this works much better at the moment.
I was actually surprised to see today a response that was using the image_generation tool where the resulting file was provided as a Base64 string and properly annotated in the JSON output response! (Nothing to do with container files, but everything with annotations) So it seems that things have gotten better in the last few weeks!