hello, im experimenting dall-e and would like to make edits of images. But for some reason it is returning me a HTTP 400 (bad request), i tried to look for an answer but unfortunately no success. I tried to write it on typescript, but a type error was beeing sent (it was expecting something of a type called “File”), then i wrote it on common js but still get the bad request error.
import { openai } from '../../core/openai';
import { createReadStream } from 'fs'
const request = await openai.createImageEdit(
createReadStream("./tmp/variation.png"),
createReadStream("./tmp/variationR.png"),
"make this pig have purple wings",
2,
"1024x1024",
);
const response = request.data.data[0].url;
console.log(response);
response: {
status: 400,
statusText: 'BAD REQUEST',
headers: {
date: 'Thu, 09 Feb 2023 00:45:22 GMT',
'content-type': 'application/json',
'content-length': '195',
connection: 'close',
'access-control-allow-origin': '*',
'openai-version': '2020-10-01',
'openai-organization': 'user-yhzflj4mm49ichozhoqiptco',
'x-request-id': '3eb2c818eb2b539e24f5986c3ef0045b',
'openai-processing-ms': '358',
'strict-transport-security': 'max-age=15724800; includeSubDomains'
},