import fetch from 'node-fetch';
const payload = {
"text_prompt": "a cute robotic metal penguin surfing, surfing in the intergalactic sea, on top of a mystical sea wave, soft multicoloured light, the water and sea is a rainbow magical potion, overlooking a beautiful blue beach, by makoto shinkai, stanley artgerm lau, wlop, rossdraws, james jean, andrei riabovitchev, marc simonetti, krenz cushart, sakimichan,",
"selected_models": [
"dreamlike_2",
"protogen_5_3",
"analog_diffusion",
"sd_2"
]
};
async function gooeyAPI() {
const response = await fetch("https://api.gooey.ai/v2/CompareText2Img?example_id=xw1509yj", {
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();