> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vectorshift.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Text to Image Node

> Generate an image from a prompt

<img src="https://mintcdn.com/vectorshift/fUdgBpX7VNpDIEaX/images/platform/pipelines/multi-modal/text-to-image.png?fit=max&auto=format&n=fUdgBpX7VNpDIEaX&q=85&s=6702c1b90044f225a5d6ed45312348eb" alt="Text to Image" width="576" height="374" data-path="images/platform/pipelines/multi-modal/text-to-image.png" />

The text to image node generates an image based on a prompt.

For the size of the generated image:

* If the provider is OpenAI, you need to specify the image size.
* If the provider is Flux or Stability AI, you need to specify the aspect ratio.

## Node Inputs

1. Prompt: Description of the image for generation
   * Type: `Text`

## Node Parameters

1. Provider: Provider of the AI model you want to use. The default provider is OpenAI.
2. Model: Specific model you want to use.
3. Use Personal Api Key: This allows you to enter your API key.
4. Size: Dimensions of the image you want to generate.
5. Aspect Ratio: The aspect ratio of the image you want to generate.

## Node Outputs

1. Image: The image generated from the prompt
   * Type: `Image`
   * Example usage: `{{ai_text_to_image_0.image}}`

## Example

The below example shows a pipeline that takes a text description and generates an image based on that description.

1. Input Node: Contains the text description of the image to generate
2. Text to Image Node: Converts the text description into an image
   * Prompt: Utilizes`{{input_0.text}}`
3. Output: The generated image
   * Output: `{{ai_text_to_image_0.image}}`

<img src="https://mintcdn.com/vectorshift/fUdgBpX7VNpDIEaX/images/platform/pipelines/multi-modal/text-to-image-example.png?fit=max&auto=format&n=fUdgBpX7VNpDIEaX&q=85&s=f24d989dfc2c75092e51c104894dc660" alt="Text to Image Example" width="1905" height="834" data-path="images/platform/pipelines/multi-modal/text-to-image-example.png" />

## Pricing

| Provider     | Model                          | Resolution | Cost per Image |
| ------------ | ------------------------------ | ---------- | -------------- |
| OpenAI       | dall-e-2                       | 256x256    | 0.016          |
| OpenAI       | dall-e-2                       | 512x512    | 0.018          |
| OpenAI       | dall-e-2                       | 1024x1024  | 0.02           |
| OpenAI       | dall-e-2                       | 1024x1792  | 0.12           |
| OpenAI       | dall-e-2                       | 1792x1024  | 0.12           |
| OpenAI       | dall-e-3                       | 1024x1024  | 0.04           |
| OpenAI       | dall-e-3                       | 1024x1792  | 0.08           |
| OpenAI       | dall-e-3                       | 1792x1024  | 0.08           |
| Stability AI | Stable Diffusion Ultra         | Default    | 0.08           |
| Stability AI | Stable Diffusion Core          | Default    | 0.03           |
| Stability AI | Stable Diffusion 3 Medium      | Default    | 0.035          |
| Stability AI | Stable Diffusion 3 Large       | Default    | 0.065          |
| Stability AI | Stable Diffusion 3 Large Turbo | Default    | 0.04           |
| Stability AI | Stable Diffusion XL            | Default    | 0.01           |
| Stability AI | Stable Diffusion 1.6           | Default    | 0.01           |
| Flux         | flux-pro                       | Default    | 0.055          |
| Flux         | flux-dev                       | Default    | 0.025          |
| Flux         | flux-schnell                   | Default    | 0.003          |
