import fetch from 'node-fetch';
const payload = {
"text_prompt": "An illustrated portrait of an androgynous person, red cloak, dark skin, short hair untammed hair, neck tattoo close up of face, forest like hair, looking at the camera, with indian features, full clothing, covered upper body, bronze coloured face, beautiful tribal facial tattoos, lots of facial tattoos, facial tattoo indicating time, deep contrast lighting, natural jewellery, old world wisdom, fantasy, intricate, highly detailed,matte, sharp focus, illustration, hdr, 4k, 8k, front facing, ",
"selected_models": [
"dreamlike_2"
]
};
async function gooeyAPI() {
const response = await fetch("https://api.gooey.ai/v2/CompareText2Img?example_id=fdairryn", {
method: "POST",
headers: {
"Authorization": "bearer " + process.env["GOOEY_API_KEY"],
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
if (!response.ok) {
throw new Error(response.status);
}
const result = await response.json();
console.log(response.status, result);
}
gooeyAPI();