I’m experiencing an error in setting a ‘quality’ parameter with the new ‘gpt-image-1’ api for image edit request.
result = client.images.edit(
image=open(image_path, "rb"),
prompt=prompt,
model="gpt-image-1",
n=1,
quality="low",
size="1024x1536",
)
The error message says :
result = client.images.edit(
^^^^^^^^^^^^^^^^^^^
TypeError: Images.edit() got an unexpected keyword argument 'quality'
Does anyone else encounter this error as well? In the api document, it said that you can use ‘quality’ for image edit but it doesn’t seem working for me: https://platform.openai.com/docs/api-reference/images/createEdit. I can get the result without setting the ‘quality’ but couldn’t set the ‘quality’,
Also in the playground, I was able to create image edit request with reference image and quality setting to ‘low’, but when I check out the code from playground, it was using client.images.edits
instead of client.images.edit
as specified in the api document (see screenshot below). Is there different ways of creating request?