Configure AI image generation

Available from version 3.1.0

Generate images using AI models directly from the Assets app with a streamlined dialog interface. This feature provides quick access to AI-powered image generation with support for multiple models including DALL-E, FLUX, Gemini, and more.

Activation

To enable the AI image generation dialog:

  1. Ensure you have the ai-accelerator-ui module installed.

  2. Ensure you have configured at least one AI image generation model, such as from ai-accelerator-fal-ai, ai-accelerator-gemini, or ai-accelerator-openai.

  3. Create a JavaScript dialog definition in your light module.

    Create the file <light-module-folder>/<light-module-name>/javascriptDialogs/generate-asset-dialog.yaml:

    $type: generateAssetDialog
    parameters:
      width: 1200  # Optional: dialog width in pixels
      height: 800  # Optional: dialog height in pixels
  4. Add the action to the Assets app that opens the dialog.

    Create or update <light-module-folder>/<light-module-name>/decorations/assets/apps/dam.yaml:

    subApps:
      jcrBrowser:
        actions:
          generateAsset:
            label: Generate Asset
            icon: icon-import
            $type: openJavascriptDialogAction
            javascriptDialogId: <light-module-name>:generate-asset-dialog (1)
            availability:
              root: true
              writePermissionRequired: true
              rules:
                notDeleted:
                  $type: jcrIsDeletedRule
                  negate: true
        actionbar:
          sections:
            folder:
              groups:
                generate:
                  items:
                    - name: generateAsset
            root:
              groups:
                generate:
                  items:
                    - name: generateAsset
    1 Reference your dialog using the format <light-module-name>:<dialog-file-name> (without the .yaml extension).
Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the AI Accelerator module docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules