
openai
#10081
invalid_parameter_error
The provided size '1600x900' is not valid. Accepted values are: '256x256', '512x512', '1024x1024', '1024x1792', '1792x1024'.
This error has been identified and solved.
Reason
The 400 status error you are seeing in the OpenAI API is due to an invalid request related to the image size. The error message indicates that the image size '1600x900' is not one of the supported sizes, which are ['256x256', '512x512', '1024x1024', '1024x1792', '1792x1024']. This means the server cannot process the request because the specified image dimensions do not match the allowed sizes for the API.
Solution
To fix the 400 status error in the OpenAI API due to invalid image size, you need to ensure that the image dimensions conform to the supported sizes. Here are the steps to resolve this issue:
Use one of the supported image sizes for the DALL-E model you are using.
Ensure the image is resized to one of the following dimensions:
256x256
512x512
1024x1024
1024x1792
1792x1024
By adjusting the image size to one of these supported dimensions, you can avoid the 400 error and successfully submit your request to the OpenAI API.
Suggested Links
https://cheatsheet.md/chatgpt-cheatsheet/openai-api-error-axioserror-request-failed-status-code-400
https://www.codecademy.com/article/setting-parameters-in-open-ai
https://community.openai.com/t/400-errors-on-gpt-vision-api-since-today/534538
https://community.openai.com/t/getting-400-response-with-already-working-code/509212
https://help.openai.com/en/articles/5072518-controlling-the-length-of-openai-model-responses
https://community.openai.com/t/charges-for-dall-e-3-model-for-image/675469
https://github.com/Nutlope/aicommits/issues/137
https://community.openai.com/t/invalid-image-error-in-gpt-4-vision/505843/39
https://meta.discourse.org/t/image-sizes-of-dall-e-3/298748