# Are there any parameters for Stable DIffiusion inference api

**URL:** <https://discuss.huggingface.co/t/are-there-any-parameters-for-stable-diffiusion-inference-api/31175>\
**Category:** Beginners\
**Created:** [February 6, 2023, 9:23am UTC](https://discuss.huggingface.co/t/are-there-any-parameters-for-stable-diffiusion-inference-api/31175 "2023-02-06T09:23:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![umerxa](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/umerxa/32/14006_2.png) [@umerxa](https://discuss.huggingface.co/u/umerxa)\
**Post date:** [February 6, 2023, 9:23am UTC](https://discuss.huggingface.co/t/are-there-any-parameters-for-stable-diffiusion-inference-api/31175/1 "2023-02-06T09:23:35Z")

</div>

Hi, I’m using Hugging face’s Stable Diffusion inference api. I want to know if there are any parameters I can send to post request other than input prompt like number of images or guidance scale?

```auto
  const generateImage = async (e) => {
    e.preventDefault();
    setLoading(false);
    console.log("Generating Image");
    // You can replace this with different model API's
    const URL = `https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-2-1`;

    // Send the request
    const response = await axios({
      url: URL,
      method: "POST",
      headers: {
        Authorization: `Bearer ${process.env.NEXT_PUBLIC_HUGGING_FACE_API_KEY}`,
        Accept: "application/json",
        "Content-Type": "application/json",
      },
      data: JSON.stringify({
        inputs: prompt,
        options: { wait_for_model: true },
      }),
      responseType: "arraybuffer",
    });

    console.log(response);

    const type = response.headers["content-type"];
    const data = response.data;
    const base64data = Buffer.from(data).toString("base64");
    const img = `data:${type};base64,` + base64data; // <-- This is so we can render it on the page
    setImage(img);
    setLoading(true);
  };

```
