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

# Generate Image

> Create an image from a prompt with DALL·E or GPT Image.

**Generate Image** sends a text prompt to an OpenAI image model and returns the
generated image as a file. Available controls change with the selected model.

## Common inputs

| Input                   | Type           | Required | Description                                               |
| ----------------------- | -------------- | -------- | --------------------------------------------------------- |
| **Third-party account** | OpenAI account | Yes      | The API key used for generation.                          |
| **Prompt**              | String         | Yes      | A visual description of the desired image.                |
| **Model**               | Enum           | Yes      | DALL·E 2, DALL·E 3, or GPT Image 1. Defaults to DALL·E 2. |
| **Image Size**          | Enum           | Yes      | The available dimensions for the selected model.          |

## Model controls

<Tabs>
  <Tab title="DALL·E 2">
    Square sizes: `256×256`, `512×512`, and `1024×1024`. The default is
    `1024×1024`.
  </Tab>

  <Tab title="DALL·E 3">
    Sizes: `1024×1024`, `1792×1024`, and `1024×1792`.

    * **Quality** — Standard or HD.
    * **Style** — Natural or Vivid.
  </Tab>

  <Tab title="GPT Image 1">
    Sizes: `1024×1024`, `1536×1024`, `1024×1536`, or Auto.

    * **Quality** — Auto, High, Medium, or Low.
    * **Background** — Auto, Transparent, or Opaque.
    * **Output Format** — PNG, JPEG, or WebP.
    * **Output Compression** — `0` to `100` for JPEG and WebP.
  </Tab>
</Tabs>

## Output

| Output    | Type | Description                                                                     |
| --------- | ---- | ------------------------------------------------------------------------------- |
| **Image** | File | The generated image. DALL·E output is PNG; GPT Image follows **Output Format**. |

<Tip>
  Describe the subject, setting, composition, lighting, palette, and intended
  use. A specific art direction is more reliable than a list of adjectives.
</Tip>

<Note>
  Transparent backgrounds are a GPT Image 1 feature. Choose PNG or WebP when the
  downstream workflow must preserve transparency.
</Note>
