How do download files generated in AI Assistants?

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_ids in the content array of the message and then download the file using https://platform.openai.com/docs/api-reference/files/retrieve-contents

4 Likes