You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Confirm this is a Node library issue and not an underlying OpenAI API issue
This is an issue with the Node library
Describe the bug
The latest version of the openai-node SDK defines the image parameter in images.edit() as accepting either a single Uploadable or an array of Uploadable files:
However, when I try to pass an array of images to the image field while using the gpt-image-1 model (as the type definition seems to allow), the API responds with:
400 Invalid type for 'image': expected a file, but got an array instead.
To Reproduce
importOpenAIfrom"openai";constclient=newOpenAI();constimages=awaitPromise.all([fetch(`http://localhost:3000${img.image.url_1}`),fetch(`http://localhost:3000${img.image.url_2}`),]);awaitclient.images.edit({model: "gpt-image-1",prompt: "Combine these",image: images,// 👈 Passes an array as allowed by type definition});
OS
macOs
Node version
Node v22.10.0
Library version
v4.97.0
The text was updated successfully, but these errors were encountered:
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
The latest version of the openai-node SDK defines the image parameter in images.edit() as accepting either a single Uploadable or an array of Uploadable files:
However, when I try to pass an array of images to the image field while using the gpt-image-1 model (as the type definition seems to allow), the API responds with:
To Reproduce
OS
macOs
Node version
Node v22.10.0
Library version
v4.97.0
The text was updated successfully, but these errors were encountered: