---
schema_version: "1"
id: 96adc72d540bb5b49eff42c04485b10ff8d104b22941394b13afe5fb5b64c2f0
title: Configuring Image Generation Operations
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mulesoft-inference-connector/latest/configuring-image-generation-operations.md
canonical_url: https://docs.mulesoft.com/mulesoft-inference-connector/latest/configuring-image-generation-operations
source_site: docs.mulesoft.com
content_type: documentation
content_hash: b5df27fc025183d97810481c84d8f8faa22f87f59238d3811fce01f5c328b035
description: MuleSoft Documentation Site
release: "1.2"
latest: true
---
---
product: MuleSoft Inference Connector
version: 1.2
is-latest-version: true
---

# Configuring Image Generation Operations

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Configure the **\[Image\] Generate (only Base64)** operation.

## Configure the Image Generate (only Base64) Operation

The **\[Image\] Generate (only Base64)** operation creates images from text descriptions using
AI-powered image generation models.

Apply the **\[Image\] Generate (only Base64)** operation in various scenarios, such as for:

- **Content Generation**

  Generate images for blog posts, articles, social media, research, or design projects.

To configure the **\[Image\] Generate (only Base64)** operation:

1.  Select the operation on the Anypoint Code Builder or Studio canvas.

2.  In the **General** properties tab for the operation, enter these values:

    - **Prompt**

      Enter the text description of the image you want to generate.

3.  In the **Additional Request Attributes** (optional) field, you can pass any additional request
    attributes in the request payload to generate more relevant and precise LLM outputs.

This is the XML for this operation:

```xml
<ms-inference:image-generation
  doc:id="7e62e70e-eff7-4080-bb20-3d162bb84c39"
  config-ref="OpenAIConfig"
  doc:name="Image generation">
    <ms-inference:prompt>
      <![CDATA[A photorealistic image of a modern office building with glass facades, surrounded by landscaped gardens]]>
    </ms-inference:prompt>
</ms-inference:image-generation>
```

### Output Configuration

This operation responds with a JSON payload containing the generated image data and metadata about
the generation process. This is an example response:

```json
{
  "payload": {
    "response": "<Base64 of image>"
  }
}
```

The operation also returns attributes that aren’t within the main JSON payload, for example:

```json
{
  "model": "Model name used",
  "promptUsed": "Revised prompt from LLM"
}
```

## See Also

- [MuleSoft Inference Connector Overview](https://docs.mulesoft.com/mulesoft-inference-connector/latest/)

- [MuleSoft Inference Connector Reference](https://docs.mulesoft.com/mulesoft-inference-connector/latest/mulesoft-inference-connector-reference)

- [Salesforce Help](https://help.salesforce.com)
