Convert Image for Open AI

HI @all
I’m trying to handle image take with my android samsung smartphone to generate new image.
I uploaded photo to OneDrive, download it, convert it to PNG with built-in module, resizing to less resolution.
OpenAI gives an error
[400] Invalid input image - format must be in ['RGBA', 'LA', 'L'], got RGB.

Is there a module that can convert image before sending to open AI ?

HTTP get a file might do the trick

I try another solution with google cloud run to convert image. My resquest is ok in postman
Here’s new scenario


I don’t know how to set image in HTTP request module. It’s a post request with multipart/form-data with “file” parameter.

I have an error in HTTP request :

##### BundleValidationError

Validation failed for 1 parameter(s).

* Array of objects expected in parameter 'formDataFields'.

Request in postman is good

Find this simple solution

2 Likes