#InvalidRequestError Uploaded image must be a PNG and less than 4 MB.
5 messages · Page 1 of 1 (latest)
Hey! Can you give us some more information? It seems to me like you may need to make your input image smaller before sending it to the API
5 messages · Page 1 of 1 (latest)
response = openai.Image.create_edit(
image=Image.open("dalle2.png").convert("RGBA").tobytes(),
mask=Image.open("mask.png").convert("RGBA").tobytes(),
prompt=description,
n=2,
size="512x512"
)
Hey! Can you give us some more information? It seems to me like you may need to make your input image smaller before sending it to the API