Error sending image to OpenAI: APIError: 413 The data value transmitted exceeds the capacity limit

I’m trying to send an image from my Firebase Storage bucket to openai edit image API, but I’m getting the error above on the title.

The “fileBuffer” has a length of 0.1MB and according to the API docs the image must have less than 4MB.

I tried to pass other small images too, but had no success.

I gave permissions on Firebase to anyone writes and reads the storage.

I don’t know why I’m getting this error. Has anyone had the same problem?