let response = await openai.images.edit({
image: file,
prompt: ‘Convert this image into an AI Avatar’,
// n: 1,
// size: “1024x1024”,
// response_format: ‘b64_json’
})
Using this both function to create the image passing the buffer of the file
then also its not giving any output its just stuck on it
I’m curious if you are actually doing something with “response” after this segment of code. This only demonstrates how to make the call to the API using the node.js openai library.
Here’s clearly formatted code as a final answer, using node library as it was in July. You’ll likely want to adapt code to the latest node.js python 4.0+ version, with the github showing new API methods.