I cannot get Image Edit to work on mages made by Image

Friends

Following the examples

curl https://api.openai.com/v1/images/generations -H "Content-Type: application/json" -H "Authorization: Bearer $OPENAI_API_KEY" -d '{"prompt": "A cute baby sea otter","n": 1, "size": "1024x1024" }'

The only change from the example is I changed n to be 1

I then downloaded the image generated and named the file and renamed it “otter.png”

Then ran the example code (again n is 1, and I am no supplying a mask)

curl https://api.openai.com/v1/images/edits -H "Authorization: Bearer $OPENAI_API_KEY" -F image="@otter.png" -F prompt="A cute baby sea otter wearing a beret" -F n=1 -F size="1024x1024"

I get the error:

/tmp$ curl https://api.openai.com/v1/images/edits  -H "Authorization: Bearer $OPENAI_API_KEY" -F image="@otter.png"  -F prompt="A cute baby sea otter wearing a beret" -F n=1 -F size="1024x1024"
{
  "error": {
    "code": null,
    "message": "Invalid input image - format must be in ['RGBA', 'LA', 'L'], got RGB.",
    "param": null,
    "type": "invalid_request_error"
  }
}

Does this mean what I think it says, that the image format used by the images/generations is incompatible with the images/edits API?

Finaly the command:

curl https://api.openai.com/v1/images/variations -H "Authorization: Bearer $OPENAI_API_KEY" -F image="@otter.png" -F n=1 -F size="1024x1024"

works well. SO the image format is compatible images/variations

What am I missing?

It is possible to convert the image:

convert otter.png -type TrueColor -define png:color-type=6 otter_rgba.png