How to get different size images from Dalle2 API?

The API reference says you can request these image size 256x256 , 512x512 , or 1024x1024 only. Does anyone have any techniques to get a different size? Or just a different aspect ratio? I need a vertical rectangle, not a square.

1 Like

Welcome to the community.

DALLE2 only does squares, but you can use out-painting to get a rectangle. It’s a bit more difficult with the API, but it can be done. I remember someone did an auto-resizer that was pretty slick.


Thank you for the reply. Did the auto resizer use the out-painting method?

Yes, if I recall correctly, he took the original image then outpainted in all directions to “expand it” or you could just expand in one direction.

You might try in the DALLE2 playground first then replicate in API.