Generate a topic hero image
Create the hero image for a carousel topic in Airtable with the text to image model you choose, and save it as the approved image
Version 1
What it does
A webhook receives a topic record's ids and sets its workflow status to In Progress. The workflow combines the topic's hero image prompt and headline with your hero image prompt, then fills in the request template stored on the text to image model linked to the topic.
It posts the request to that model's endpoint, checks every 10 seconds until the job is completed and gets the image link. Any earlier approved hero image for the topic is set to Not Approved, the new image is saved as an Approved image record linked to the topic, and the topic is set to Hero Generated. The image cost is added to your usage log. Create Carousel Script uses this image next.