Error: Request failed with status code 400

I am getting “Request failed with status code 400” when running this function createImageEdit() with the official openai SDK in nodejs. Any thoughts?

    const response = await openai
        "A cartoon cute baby otter with blue eyes",
      .catch((error) => {

        return res.status(200).send({ error: error });

    var image_url = response;

    return res.status(200).send({ test: image_url });

Hast du in den Community-Foren gesucht? Schau mal bitte hier.

1 Like

Have you found a resolution for the 400 error? I get it exactly with createImageEdit as well.

I found a solution for creatImageEdit 400 error. It appears that the order of arguments should be image, prompt, mask etc instead of image, mask, prompt etc as described in the documentation.