DALLE 2 API https/json documentation available?

I keep getting “400 Bad Request” responses when trying to send an image to https://api.openai.com/v1/images/generations.
I’m currently trying to send the image encoded to Base64 as part of a JSON structure, yet I still get an error message.
Is there documentation available on how to properly format the request and image?

If you inspect the response body it should have a more detailed error message on what the error is.


Thank you!
I didn’t realise that all my credits expired and needed to add a payment method.