Open
Description
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
Since yesterday, a call to the "openai.images.edit" API throws an error:
BadRequestError: 400 Invalid file 'image': unsupported mimetype ('application/octet-stream'). Supported file formats are 'image/png'.
The same API call worked for that last year without this error.
To Reproduce
- Provide to images, and set the filenames to patchFn and maskFn, both files are PNGs.
- Call the openai.images.edit API with the following code
Code snippets
const response = await openai.images.edit({
image: fs.createReadStream(patchFn),
prompt,
mask: fs.createReadStream(maskFn),
n: 1,
size: "1024x1024",
response_format: "b64_json",
}
);
OS
macOS 15.4
Node version
Node v22.14.0
Library version
openai 4.95.0