DALL-E-3 API Error : The input prompt cannot be handled by the engine

OpenAI Error: The input prompt cannot be handled by the engine.
INFO 2024-03-28 07:53:38,966 util 54208 6204682240 error_code=None error_message=‘The input prompt cannot be handled by the engine.’ error_param=None error_type=invalid_request_error message=‘OpenAI API error received’ stream_error=False

MY prompt is : Calm & Modern Bed Room in Coastal theme and is furnished with Rich furnitures with Conventional Ceiling and is lit up by Candle Chandeliers

I am now seeing this error frequently, sometimes it is generating sometimes it is not.

The error message you are seeing seems be through some other API, SDK, platform, library, and is not the message returned by the OpenAI API.

Transparent passing of the actual message would be helpful for diagnosis.

I’m receiving a similiar message using the typescript SDK.

Its throwing a 400 status, but not including an OAI error code in the response.

1 Like

This guy seems to be on the case, as I get no error without sending a bad prompt.

from openai import OpenAI
client = OpenAI()
try:
 img=client.images.generate(
 model="dall-e-3",
 prompt={"bad":"A computer engineer is in a datacenter in an aisle of rack\
 servers, looking for the fault in a computer rack system."},
 size="1024x1024",
 )
 print(img.data[0].revised_prompt)
 print(img.data[0].url)
except Exception as e:
 print(e)

In which case you get a full explanation of the problem with the input (not a string).

Error code: 400 - {'error': {'code': None, 'message': "{'bad': 'A computer engineer is in a datacenter in an aisle of rack servers, looking for the fault in a comuputer rack system.'} is not of type 'string' - 'prompt'", 'param': None, 'type': 'invalid_request_error'}}