Image generation

To track the generation status, we can get its position in the queue.

Refer to the demo on GitHub


POST https://getnude.app/api/mch/img-2-img

Body

Name
Type
Required
Description

timestamp

String

Yes

Current timestamp

mode

String

Yes

Optional: nude、bikini、lingerie

file_base64

String

Yes

The base64 of the picture contains data:image/png;base64

merchant_no

String

Yes

Merchant no

notify_url

String

Yes

Your webhook url

sign

String

Yes

Refer to the sign page

Response

{
    "code": 0,
    "message": "",
    "data": {
        "file_id": 402310
    }
}
const axios = require('axios');
let data = JSON.stringify({
  "file_base64": "Your base64 string contains data:image/png;base64",
  "timestamp": "xxx",
  "sign": "xxx",
  "merchant_no": xxx,
  "mode": "nude",
  "notify_url": "string"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://getnude.app/api/mch/img-2-img',
  headers: { 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

Last updated