# "num\_images\_per\_prompt" in Inference Endpoint request with a text-to-image model

**URL:** <https://discuss.huggingface.co/t/num-images-per-prompt-in-inference-endpoint-request-with-a-text-to-image-model/98830>\
**Category:** Beginners\
**Created:** [July 22, 2024, 10:59pm UTC](https://discuss.huggingface.co/t/num-images-per-prompt-in-inference-endpoint-request-with-a-text-to-image-model/98830 "2024-07-22T22:59:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lunatikz61](https://avatars.discourse-cdn.com/v4/letter/l/c37758/32.png) [@Lunatikz61](https://discuss.huggingface.co/u/Lunatikz61)\
**Post date:** [July 22, 2024, 10:59pm UTC](https://discuss.huggingface.co/t/num-images-per-prompt-in-inference-endpoint-request-with-a-text-to-image-model/98830/1 "2024-07-22T22:59:51Z")

</div>

Hi community,

I’m using a dedicated Inference Endpoint with a text-to-image model (stable-diffusion-xl-base-1-0-cqq).

- The documentation indicates, that I could use the parameter “num\_images\_per\_prompt”. I experimentally set this parameter to 2 in my request, but the response base64 encoded string does not seem to contain two images.  
How would I use this parameter correctly?

This is my curl request

```auto
curl "https://some_instance.eu-west-1.aws.endpoints.huggingface.cloud" \
  -X POST \
  -H "Accept: application/json" \
  -H "Authorization: Bearer hf_XYZ..." \
  -H "Content-Type: application/json" \
  -d '{ "inputs": "a cat sitting on a mirror", "parameters": { "num_images_per_prompt" : 2 }}' \ 
  > response.txt

```

In the response I’m searching actually for the Base64 header (`iVBORw0KGgo`) for png images… I can only find one.

- Another question would be, can I use multiple prompts in one request ?

So something like:

```auto
curl "https://some_instance.eu-west-1.aws.endpoints.huggingface.cloud" \
 -X POST \
 -H "Accept: application/json" \
 -H "Authorization: Bearer hf_XYZ..." \
 -H "Content-Type: application/json" \
 -d '{ "inputs": ["a cat sitting on a mirror", "a dog sitting on a mirror"]}' \
 > response.txt

```

I tried this and it seems the model takes nearly the doubled time to perform the generation, thus assuming it did generate two images. But again in the response I do only find one image.
