hi @jetpackjules,
Yes we’ve recently add the negative prompt to the API
Here is a request example in Javascript
fetch(
"/static-proxy?url=https%3A%2F%2Fapi-inference.huggingface.co%2Fmodels%2Fstabilityai%2Fstable-diffusion-2",
{
method: "POST",
headers: {
"content-type": "application/json",
},
body: JSON.stringify({
inputs:
"award winning high resolution photo of a giant tortoise/((ladybird)) hybrid, [trending on artstation]",
negative_prompt: "blurry",
}),
}
)
.then((res) => res.blob())
.then((blob) => {
const tab = window.open((target = "_blank"));
tab.location.href = window.URL.createObjectURL(blob);
});
Blockquote