<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>
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:
-
Select the operation on the Anypoint Code Builder or Studio canvas.
-
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:
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"
}