I need to download the Modified CTMR Letter

I am creating an application that will send a pdf file to an Agent LLM and return an updated version of the pdf. I am currently getting the agent to give me a sandbox link that looks like

[Download AP_CV.pdf](sandbox://file.pdf

sandbox://output.csv in response.final_output. How can I download this file via my python backend. I requested the agent to give me a file id so i can download it with OpenAI().files module but the agent is hallucinating a file id and also it is hallucinating the base64 encoded string of the file so i am unable to reconstruct the file.

The model says the file is available in the sandbox but I am unable to find the file with OpenAI().files.list() .

Welcome to the developer community, @Shan_Serious

Agents create files directly on the attached container in the Responses API call. When they do so, they cite these files in the annotations of the message.

You can download the files constructed by the agent by calling the get container file content method.

More info in the official docs: