Hi everyone
,
I’m currently using the OpenAI Assistants API and invoking prompts through the Threads API.
Sometimes, the Assistant’s response includes links like this:
sandbox://file.pdf
sandbox://output.csv
From what I understand, these are files generated during the Assistant’s processing (inside the OpenAI sandbox environment).
However, I can’t find any clear documentation or examples on how to actually download or access these sandbox files.
Here’s my current setup:
-
I’m using the Assistants + Threads API flow
-
I send a prompt → the model processes it → and in the response text I get one or more
sandbox://...file links -
Now I’d like to programmatically retrieve these files (for example, download
sandbox://file.pdfand process it further in my system)
So my questions are:
-
How can I download or access files referenced with
sandbox://file.pdflinks that appear in an Assistant response? -
Is there an API endpoint (or SDK helper) to fetch these files from the sandbox environment?
-
Are these files temporary, and how long do they remain accessible?
-
If they’re not directly downloadable, what’s the recommended best practice to retrieve their contents?
Example of what I get from the API:
{
“id”: “msg_123”,
“type”: “message”,
“role”: “assistant”,
“content”: [
{
“type”: “text”,
“text”: “Here is your report: sandbox://file.pdf”
}
]
}
Any official guidance, sample code, or clarification from the OpenAI team would be greatly appreciated ![]()
Thanks in advance!
Gianluca