I think I found it.
TLDR: You must NOT use style=“natural”.
I was thinking maybe it’s something wrong with python package, and I was trying with http request from postman. But I could reproduce the poor quality image.
Then I thought maybe try changing the body passed, since it can cause some compatibility issues and make me fall back to dalle2. I first tried getting rid of “style” and “quality” parameters. And… the quality went back to normal!
I want natural+HD settings, so I wanted to see if which one I can keep. I tried removing style only / quality only; quality didn’t matter, it worked fine with hd. But style mattered - when it was not passed (which defaults to vivid) or when I pass style=“vivid”, it worked fine. But when I pass style=“natural”, it goes back to producing the crappy output.
So - there seem to be a bug in the api regarding “natural” style. Just avoid it and it will work I presume.