Get Image Safely

Retrieve an image bypassing Cloudflare to retrieve an image.

The Button Model

Properties

  • Name
    imgUrl
    Type
    string
    Description

    The Midjourney image url.


POST/getImage

Get an image safely

Request

POST
/getImage
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer {token}");

var raw = JSON.stringify({
  "imgUrl": "https://cdn....",
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.justimagineapi.org/v1/getImage", requestOptions)
  .then(response => {
    console.log(response)
    // Array Buffer
  })
  .catch(error => console.log('error', error));