# How to have custom output size for inference API

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-have-custom-output-size-for-inference-api%2F31868%3E%5C
**Category:** Inference Endpoints on the Hub\
**Created:** [February 16, 2023, 9:47pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-have-custom-output-size-for-inference-api%2F31868 "2023-02-16T21:47:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jetpackjules](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/jetpackjules/32/14161_2.png) [@jetpackjules](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjetpackjules)%5C
**Post date:** [February 16, 2023, 9:47pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-have-custom-output-size-for-inference-api%2F31868%2F1 "2023-02-16T21:47:46Z")

</div>

I am using the free version of inference API’s with a custom Stable Diffusion model. When trying to use the endpoint, I am unable to figure out how to set a custom size for the output (like how in the pipeline it’s just height=x and width=x)…

Is this possible?

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [February 16, 2023, 10:22pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-have-custom-output-size-for-inference-api%2F31868%2F2 "2023-02-16T22:22:34Z")

</div>

Hi @jetpackjules, the Inference API only accepts the prompt parameter such as `inputs`, and most recently we have also added support for `negative_prompts`. If you need access to extra params you can deploy it as a Space or a custom [Inference Endpoints](https://huggingface.co/inference-endpoints).

> <https://github.com/huggingface/api-inference-community/blob/main/docker_images/diffusers/app/pipelines/text_to_image.py#L57>

---

<div class="post-metadata">

**Author:** ![jetpackjules](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/jetpackjules/32/14161_2.png) [@jetpackjules](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjetpackjules)%5C
**Post date:** [February 16, 2023, 10:30pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-have-custom-output-size-for-inference-api%2F31868%2F3 "2023-02-16T22:30:00Z")

</div>

Thanks for the quick reply!

Does this mean that there is no way to accomplish this for free?

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [February 16, 2023, 10:41pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-have-custom-output-size-for-inference-api%2F31868%2F4 "2023-02-16T22:41:09Z")

</div>

You can try to find a Space with our community granted GPU that has an open API.

---

<div class="post-metadata">

**Author:** ![jetpackjules](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/jetpackjules/32/14161_2.png) [@jetpackjules](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjetpackjules)%5C
**Post date:** [February 16, 2023, 10:48pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-have-custom-output-size-for-inference-api%2F31868%2F5 "2023-02-16T22:48:37Z")

</div>

Not sure how to do that…

Also would it still work with a custom model?
