You can use GET
or POST
requests for any image gen endpoint
Image generation will give you images in raw bytes, you can check if the output is an image or json by reading the first byte of the response.
If the the first byte is { then it is a json error.
[Image]
{"success": false,"code": 500,"message": "This is an error"}