const response = await fetch("https://inference.prodia.com/v2/job", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Accept": "image/jpeg",
"Authorization": "Bearer my-token-here"
},
body: JSON.stringify({
type: "v2.job.sdxl.txt2img",
config: {
prompt: "cinematic still, filmed by Guillermo del Toro, Amidst a deep dark forest, an enigmatic being appears--an amalgamation of flora and fauna, with vines for hair, eyes gleaming like embers, and skin adorned with iridescent scales",
negative_prompt: "easynegative, bad proportions, low resolution, bad, ugly, terrible, painting, 3d, render, comic, anime, manga, unrealistic, flat, watermark, signature, worst quality, low quality, normal quality, lowres, simple background, inaccurate limb, extra fingers, fewer fingers, missing fingers, extra arms, (extra legs:1.3), inaccurate eyes, bad composition, bad anatomy, error, extra digit, fewer digits, cropped, low res, worst quality, low quality, normal quality, jpeg artifacts, extra digit, fewer digits, trademark, watermark, artist's name, username, signature, text, words, human,",
steps: 20,
refiner: false
}
})
});
// get image data
const imageData = await response.arrayBuffer();
Sign up for Prodia!