# Image Generation

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FW3YsUS2sTfFKHYwDDjeM%2Fimage.png?alt=media&#x26;token=1718e235-19ce-40ec-881c-714b4d9ed441" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2F12CpPnFOxvDK485WOHQ2%2Fimage.png?alt=media&#x26;token=a2fe0e9a-6864-4f99-9203-931eed83c4ef" alt=""><figcaption></figcaption></figure>

## I. Description <a href="#description" id="description"></a>

This component allows you to transform text descriptions into professional-grade images. It leverages advanced AI models to interpret your prompts and generate visuals in various styles and ratios. With Diaflow’s integrated Private Key, you can access these powerful models immediately without needing your own API subscriptions.

Currently, this node supports the following high-performance models:

* Gemini - 2.5 Flash Image (Nano banana)
* BytePlus - Seedream 4.5

## II. Component settings <a href="#description" id="description"></a>

| Parameter Name   | Description                                                                                                                                                                                                                                                                        |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Model            | <p>This parameter specifies that the component should use. </p><p></p><p>Available values:</p><p></p><p>Gemini:</p><ul><li>Flash 2.5 Image (Nano Banana)</li></ul><p></p><p>BytePlus:</p><ul><li>Seedream 4.5</li></ul>                                                            |
| Prompt           | <p>Describes how you want the component to respond. <br><br>For example, you can specify the role, manner and rules that component should adhere to. <br>Also mention the component ID to connect the components.</p>                                                              |
| Image source     | <p>This is used for "Image to Image."<br><br>You can refer to the image of the node before<br><br>\*\*Note: Only support image formats, such as .jpg and .png</p>                                                                                                                  |
| Aspect ratio     | <p>Defines the dimensions of the generated image.<br><br>Select the ratio that fits your needs (e.g., 16:9 for landscape, 1:1 for square, 9:16 for mobile/portrait).<br><br>List:<br>- 1:1<br>- 2:3<br>- 3:2<br>- 3:4<br>- 4:3<br>- 4:5<br>- 5:4<br>- 9:16<br>- 16:9<br>- 21:9</p> |
| Number of images | <p>Specify how many variations of the image you want to generate in a single run.<br><br></p><p>Available values:</p><p></p><p>Gemini:</p><ul><li>1</li></ul><p></p><p>BytePlus:</p><ul><li>1</li><li>2</li><li>3</li><li>4</li></ul>                                              |

## III. Use case <a href="#description" id="description"></a>

**Input:**

Set up the "Image Generation" node with:

* Model = BytePlus - Seedream 4.5
* Prompt = "A cute 3D render of a robot holding a flower, pastel colors, white background"
* Aspect ratio = 1:1
* Number of images = 1

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FGXKV3Nlvx9wAShTiesgD%2Fimage.png?alt=media&#x26;token=7b051e94-6cf6-4296-a843-d8f11c5a1da1" alt=""><figcaption></figcaption></figure>

**Output:**

Once the node executes successfully, it will return an Image URL (or a list of URLs if multiple images were requested). You can map this output to subsequent nodes

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FZJD6DWu521kY7X9yTIQy%2Fimage.png?alt=media&#x26;token=9b112397-40cb-465a-8ded-ae2221cc27c9" alt=""><figcaption></figcaption></figure>
