Returning image as tool output in Assistants API?

Hi! I’ll be short.

  1. Upload file using File Upload API (it’s used for Assistants, Batch and others OpenAI API’s to reference files).
  2. Use id from POST /files response. Submit tool output with the file id. For example:
{"screenshot_file_id": "file-abc123"}