This section in the documentation explains how you can download files generated by tools. https://platform.openai.com/docs/assistants/tools/file-citations
tl;dr: you have to look for file_id
s in the content array of the message and then download the file using https://platform.openai.com/docs/api-reference/files/retrieve-contents