# openai_image_generation

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: openai_image_generation
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: connect/components/processors/openai_image_generation
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: connect/components/processors/openai_image_generation.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/develop/pages/connect/components/processors/openai_image_generation.adoc
page-git-created-date: "2024-09-09"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/develop/connect/components/processors/openai_image_generation.md -->

**Available in:** Cloud, [Self-Managed](https://docs.redpanda.com/connect/components/processors/openai_image_generation/%20%22View%20the%20Self-Managed%20version%20of%20this%20component%22)

Generates an image from a text description and other attributes, using OpenAI API.

#### Common

```yml
processors:
  label: ""
  openai_image_generation:
    server_address: https://api.openai.com/v1
    api_key: "" # No default (required)
    model: "" # No default (required)
    prompt: "" # No default (optional)
```

#### Advanced

```yml
processors:
  label: ""
  openai_image_generation:
    server_address: https://api.openai.com/v1
    api_key: "" # No default (required)
    model: "" # No default (required)
    prompt: "" # No default (optional)
    quality: "" # No default (optional)
    size: "" # No default (optional)
    style: "" # No default (optional)
```

This processor sends an image description and other attributes, such as image size and quality to the OpenAI API, which generates an image. By default, the processor submits the entire payload of each message as a string, unless you use the `prompt` configuration field to customize it.

To learn more about image generation, see the [OpenAI API documentation](https://platform.openai.com/docs/guides/images).

## [](#fields)Fields

### [](#api_key)`api_key`

The API key for OpenAI API.

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Manage Secrets](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/secret-management/) before adding it to your configuration.

**Type**: `string`

### [](#model)`model`

The name of the OpenAI model to use.

**Type**: `string`

```yaml
# Examples:
model: dall-e-3

# ---

model: dall-e-2
```

### [](#prompt)`prompt`

A text description of the image you want to generate. The `prompt` field accepts a maximum of 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`.

**Type**: `string`

### [](#quality)`quality`

The quality of the image to generate. Use `hd` to create images with finer details and greater consistency across the image. This parameter is only supported for `dall-e-3` models. This field supports [interpolation functions](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/interpolation/#bloblang-queries).

**Type**: `string`

```yaml
# Examples:
quality: standard

# ---

quality: hd
```

### [](#server_address)`server_address`

The Open API endpoint that the processor sends requests to. Update the default value to use another OpenAI compatible service.

**Type**: `string`

**Default**: `[https://api.openai.com/v1](https://api.openai.com/v1)`

### [](#size)`size`

The size of the generated image. Choose from `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. Choose from `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models. This field supports [interpolation functions](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/interpolation/#bloblang-queries).

**Type**: `string`

```yaml
# Examples:
size: 1024x1024

# ---

size: 512x512

# ---

size: 1792x1024

# ---

size: 1024x1792
```

### [](#style)`style`

The style of the generated image. Choose from `vivid` or `natural`. Vivid causes the model to lean towards generating hyperreal and dramatic images. Natural causes the model to produce more natural, less hyperreal looking images. This parameter is only supported for `dall-e-3`. This field supports [interpolation functions](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/interpolation/#bloblang-queries).

**Type**: `string`

```yaml
# Examples:
style: vivid

# ---

style: natural
```