Keep getting "'image' is a required property" when using valid image urls?

Hi, why do I keep getting 400 errors despite having valid image URLs converted into buffers?

const response = await axios.get(input,  { responseType: 'arraybuffer' })
  const buffer = Buffer.from(, "utf-8") = "image.png";
  var data = JSON.stringify({
  "image": input,
  "n": 10,
  "size": "1024x1024"

var config = {
  method: 'post',
  url: '',
  headers: { 
    'Authorization': 'Bearer ' + apikey, 
    'Content-Type': 'multipart/form-data'
  data : data

await axios(config)
.then(function (response) {
      let toInsert = {
  "key":        key,
  "title":    "response"

I’ve tried passing plain image URLs, Data Urls, and buffers. Why does it keep telling me “Image property is required” despite having a valid image?


Hey @sewellstephens104, did you find a solution?

I’m getting same error using images edit API with PHP.
My payload is this:

$params = [
            'image' => fopen($filePath, 'r'),
            'prompt' => $prompt,

I have the same issue, did you find a solution?

I tried with Laravel http client.

Hi, I am getting the similar error. I have image data like this.

let imageData = cxt.getImageData(0, 0, width, height).data;

Then I convert ImageData into image similar described in the tutorial but getting this error.

const buffer = imageData; = "image.png";

Did you find the solution? I am getting similar error but I think error is not about valid image but in sending the request. Why you are sending the input instead of buffer?

Looking throught nodejs sdk docs, I found that the api checks that the object is ~FileLike~ when attempting to append it to FormData. If it’s not FileLike, it gets interpreted as an object, which messes the key that gets added to the FormData hence the error.

My solution was to just set the values expected by the file like check on the blob and things seemed to work.

const blob = new Blob() = "foo.png"
blob.lastModified = 20

I can’t include the link to the code as reference, but you can find it by going to the node js sdk on github, and looking for the function isFileLike. The code messing up is the function addFormValue.

Your content-type is wrong. Set it to something like ‘Content-Type: multipart/form-data; boundary=${boundary}’