Image.edit can't take multiple image?

I tried to run the template from the official cookbook.
When I try to run this:

result_edit = client.images.edit(
model=“gpt-image-1”,
image=[img1,img2],
prompt=prompt_edit,
# size=“1024x1536”
)

I got:

RuntimeError: Expected entry at image to be bytes, an io.IOBase instance, PathLike or a tuple but received <class ‘list’> instead.

Then how you suppose to input multiple images?

Having the exact same problem. The code in the playground doesn’t seem to help either. It shows just 1 image there, even though I uploaded multiple images. Also, it says ‘client.images.edits’ instead of ‘client.images.edit’…

I solved it by updating openai lib, just pip install --upgrade openai. But not in google colab.

1 Like