Contact Us 1-800-596-4880

Configuring Image Generation Operations

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.

This is the XML for this operation:

<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:

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

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

{
  "model": "Model name used",
  "promptUsed": "Revised prompt from LLM"
}
View on GitHub