How to creat/update Contentful image resource in Stackbit custom actions?

Hi, I am integrating OpenAI features in custom actions as mentioned in this Stackbit’s webinar ( for my demo project.

I have tried sending image resource as URL, Blob and File formats but every time I end up with an error on Stackbit console. Could someone please guide me to create/update the image in Contentful CMS?

I’m attaching the code implemented for this custom action