Automatically save DALL-E output

I’m giving my users the feature to see an automatic image based on the input for a wiki entry. I successfully implemented the OpenAI Dall-e api, and displayed the result on the entry page using the output url. [dynamic image from ]

The problem is that since the url expires after an hour, the image deletes itself. How can I automatically save the image to my database for use as a thumbnail or seo image?

I am willing to upgrade to dalle3 or buy a plugin, anything that will let me automatically save and or manage the dalle output.