> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetImageAssetSuggestions

# Package: googleAds

# Namespace: SuggestionsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/marketing/ads/google-ads/google-suggestion-v1/get-image-asset-suggestions.md

## Permission Scopes:
View google ads campaigns: SCOPE.PROMOTE.VIEW-GOOGLE-ADS

## Introduction

Retrieves AI-generated image assets for a Performance Max campaign using Runway AI.
Generated images are automatically uploaded to the site's Wix Media Manager.
Responses may take up to 60 seconds. `suggestionInfo.landingPageUrl` is required.

---

## REST API

### Schema

```
 Method: getImageAssetSuggestions
 Description: Retrieves AI-generated image assets for a Performance Max campaign using Runway AI. Generated images are automatically uploaded to the site's Wix Media Manager. Responses may take up to 60 seconds. `suggestionInfo.landingPageUrl` is required.
 URL: https://www.wixapis.com/_serverless/pa-google/v1/image-asset-suggestions
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  suggestionInfo, suggestionInfo.landingPageUrl
 Method parameters: 
   param name: imageSuggestionInfo | type: ImageSuggestionInfo    
        - name: adContent | type: PerformanceMaxAdContent | description: Existing text ad content for the Performance Max campaign, used as context for image generation.  
           - name: headlines | type: array<HeadlineTextAsset> | description: Short headline text assets for the campaign.  | validation: maxItems 100
              - name: text | type: string | description: Headline text shown in the ad.  | validation: maxLength 30
           - name: longHeadlines | type: array<LongHeadlineTextAsset> | description: Long headline text assets for the campaign.  | validation: maxItems 100
              - name: text | type: string | description: Long headline text shown in the ad.  | validation: maxLength 90
           - name: descriptions | type: array<DescriptionTextAsset> | description: Description text assets for the campaign.  | validation: maxItems 100
              - name: text | type: string | description: Description text shown below the headline in the ad.  | validation: maxLength 90
           - name: businessName | type: BusinessNameTextAsset | description: Business name asset for the campaign.  
              - name: text | type: string | description: Business name shown in the ad.  | validation: maxLength 25
   param name: suggestionInfo | type: AssetSuggestionInfo   | required: true 
        - name: landingPageUrl | type: string | description: Public URL of the campaign landing page, used to analyze content for asset generation. | required: true | validation: format WEB_URL
        - name: assetTypes | type: array<AssetFieldType> | description: Specific asset types to generate. Must correspond to the requested kind of asset (text or image). When omitted or empty, all supported types for the request are returned. Supported text types: HEADLINE, LONG_HEADLINE, DESCRIPTION. Supported image types: MARKETING_IMAGE, SQUARE_MARKETING_IMAGE, LOGO.  | validation: maxItems 5
             - enum:
             -     HEADLINE: Short headline shown in ads. At least 3 required; up to 15 allowed. Maximum 30 characters.
             -     LONG_HEADLINE: Longer headline used in certain ad formats. Exactly 1 required. Maximum 90 characters.
             -     DESCRIPTION: Description shown below the headline. At least 2 required; up to 4 allowed. Maximum 90 characters.
             -     BUSINESS_NAME: Business name shown in the ad. Exactly 1 required. Maximum 25 characters.
             -     MARKETING_IMAGE: Landscape marketing image with a 1.91:1 aspect ratio (e.g. 1200x628). Multiple images allowed.
             -     SQUARE_MARKETING_IMAGE: Square marketing image with a 1:1 aspect ratio (e.g. 1200x1200). Multiple images allowed.
             -     LOGO: Square logo with a 1:1 aspect ratio (e.g. 1200x1200). A transparent background is recommended.
             -     PORTRAIT_MARKETING_IMAGE: Portrait marketing image with a 4:5 aspect ratio (e.g. 960x1200). Multiple images allowed.
             -     LANDSCAPE_LOGO: Landscape logo with a 4:1 aspect ratio (e.g. 1200x300).
             -     CALL_TO_ACTION_SELECTION: Call-to-action button label. Select a value from CallToActionType. Optional.
             -     YOUTUBE_VIDEO: YouTube video asset identified by an 11-character video ID. 1 to 5 videos recommended.
             -     MEDIA_BUNDLE: HTML5 media bundle (ZIP file). Mutate-only in Google Ads.
        - name: searchThemes | type: array<string> | description: Search themes used in the campaign's targeting, provided as context for more relevant suggestions.  | validation: maxItems 25, maxLength 1000
        - name: userPrompt | type: string | description: Optional free-form instructions for refining the generated asset content.  | validation: maxLength 1000
        - name: provider | type: AssetSuggestionProvider | description: Provider to use for asset generation. Defaults to GOOGLE with WIX as fallback.  
             - enum:
             -     GOOGLE: Google Ads Asset Generation API.
             -     WIX: Wix in-house asset generation (Runway AI for images).
 Return type: GetImageAssetSuggestionsResponse
  - name: assetSuggestions | type: array<AssetSuggestion> | description: AI-generated image assets uploaded to the site's Wix Media Manager.  
     - ONE-OF: 
        - name: headlineAsset | type: HeadlineTextAsset | description: Short headline text asset (up to 30 characters).  
           - name: text | type: string | description: Headline text shown in the ad.  | validation: maxLength 30
        - name: longHeadlineAsset | type: LongHeadlineTextAsset | description: Long headline text asset (up to 90 characters).  
           - name: text | type: string | description: Long headline text shown in the ad.  | validation: maxLength 90
        - name: descriptionAsset | type: DescriptionTextAsset | description: Description text asset (up to 90 characters).  
           - name: text | type: string | description: Description text shown below the headline in the ad.  | validation: maxLength 90
        - name: businessNameAsset | type: BusinessNameTextAsset | description: Business name text asset (up to 25 characters).  
           - name: text | type: string | description: Business name shown in the ad.  | validation: maxLength 25
        - name: imageAsset | type: ImageAsset | description: Image asset uploaded to the site's Wix Media Manager.  
           - name: name | type: string | description: Display name for the image asset.  | validation: maxLength 1000
           - name: url | type: string | description: URL of the image served from Wix Media Manager.  | validation: format WEB_URL
     - name: assetType | type: AssetFieldType | description: The field type identifying how this asset is used within a Performance Max campaign.  
         - enum:
         -     HEADLINE: Short headline shown in ads. At least 3 required; up to 15 allowed. Maximum 30 characters.
         -     LONG_HEADLINE: Longer headline used in certain ad formats. Exactly 1 required. Maximum 90 characters.
         -     DESCRIPTION: Description shown below the headline. At least 2 required; up to 4 allowed. Maximum 90 characters.
         -     BUSINESS_NAME: Business name shown in the ad. Exactly 1 required. Maximum 25 characters.
         -     MARKETING_IMAGE: Landscape marketing image with a 1.91:1 aspect ratio (e.g. 1200x628). Multiple images allowed.
         -     SQUARE_MARKETING_IMAGE: Square marketing image with a 1:1 aspect ratio (e.g. 1200x1200). Multiple images allowed.
         -     LOGO: Square logo with a 1:1 aspect ratio (e.g. 1200x1200). A transparent background is recommended.
         -     PORTRAIT_MARKETING_IMAGE: Portrait marketing image with a 4:5 aspect ratio (e.g. 960x1200). Multiple images allowed.
         -     LANDSCAPE_LOGO: Landscape logo with a 4:1 aspect ratio (e.g. 1200x300).
         -     CALL_TO_ACTION_SELECTION: Call-to-action button label. Select a value from CallToActionType. Optional.
         -     YOUTUBE_VIDEO: YouTube video asset identified by an 11-character video ID. 1 to 5 videos recommended.
         -     MEDIA_BUNDLE: HTML5 media bundle (ZIP file). Mutate-only in Google Ads.


```

### Examples

### Get Image Asset Suggestions
```curl
curl -X POST \
  'https://www.wixapis.com/google-ads/v1/image-asset-suggestions' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  -d '{
    "suggestionInfo": {
      "landingPageUrl": "https://www.example.com",
      "assetTypes": ["MARKETING_IMAGE", "SQUARE_MARKETING_IMAGE"]
    }
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.promoteGoogleAds.suggestions.getImageAssetSuggestions(suggestionInfo, options)
 Description: Retrieves AI-generated image assets for a Performance Max campaign using Runway AI. Generated images are automatically uploaded to the site's Wix Media Manager. Responses may take up to 60 seconds. `suggestionInfo.landingPageUrl` is required.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  suggestionInfo, suggestionInfo.landingPageUrl
 Method parameters: 
   param name: options | type: GetImageAssetSuggestionsOptions  none  
        - name: imageSuggestionInfo | type: ImageSuggestionInfo | description: Ad content (headlines, descriptions) used as context for image generation.  
           - name: adContent | type: PerformanceMaxAdContent | description: Existing text ad content for the Performance Max campaign, used as context for image generation.  
              - name: headlines | type: array<HeadlineTextAsset> | description: Short headline text assets for the campaign.  | validation: maxItems 100
                 - name: text | type: string | description: Headline text shown in the ad.  | validation: maxLength 30
              - name: longHeadlines | type: array<LongHeadlineTextAsset> | description: Long headline text assets for the campaign.  | validation: maxItems 100
                 - name: text | type: string | description: Long headline text shown in the ad.  | validation: maxLength 90
              - name: descriptions | type: array<DescriptionTextAsset> | description: Description text assets for the campaign.  | validation: maxItems 100
                 - name: text | type: string | description: Description text shown below the headline in the ad.  | validation: maxLength 90
              - name: businessName | type: BusinessNameTextAsset | description: Business name asset for the campaign.  
                 - name: text | type: string | description: Business name shown in the ad.  | validation: maxLength 25
   param name: suggestionInfo | type: AssetSuggestionInfo   | required: true 
        - name: landingPageUrl | type: string | description: Public URL of the campaign landing page, used to analyze content for asset generation. | required: true | validation: format WEB_URL
        - name: assetTypes | type: array<AssetFieldType> | description: Specific asset types to generate. Must correspond to the requested kind of asset (text or image). When omitted or empty, all supported types for the request are returned. Supported text types: HEADLINE, LONG_HEADLINE, DESCRIPTION. Supported image types: MARKETING_IMAGE, SQUARE_MARKETING_IMAGE, LOGO.  | validation: maxItems 5
             - enum:
             -     HEADLINE: Short headline shown in ads. At least 3 required; up to 15 allowed. Maximum 30 characters.
             -     LONG_HEADLINE: Longer headline used in certain ad formats. Exactly 1 required. Maximum 90 characters.
             -     DESCRIPTION: Description shown below the headline. At least 2 required; up to 4 allowed. Maximum 90 characters.
             -     BUSINESS_NAME: Business name shown in the ad. Exactly 1 required. Maximum 25 characters.
             -     MARKETING_IMAGE: Landscape marketing image with a 1.91:1 aspect ratio (e.g. 1200x628). Multiple images allowed.
             -     SQUARE_MARKETING_IMAGE: Square marketing image with a 1:1 aspect ratio (e.g. 1200x1200). Multiple images allowed.
             -     LOGO: Square logo with a 1:1 aspect ratio (e.g. 1200x1200). A transparent background is recommended.
             -     PORTRAIT_MARKETING_IMAGE: Portrait marketing image with a 4:5 aspect ratio (e.g. 960x1200). Multiple images allowed.
             -     LANDSCAPE_LOGO: Landscape logo with a 4:1 aspect ratio (e.g. 1200x300).
             -     CALL_TO_ACTION_SELECTION: Call-to-action button label. Select a value from CallToActionType. Optional.
             -     YOUTUBE_VIDEO: YouTube video asset identified by an 11-character video ID. 1 to 5 videos recommended.
             -     MEDIA_BUNDLE: HTML5 media bundle (ZIP file). Mutate-only in Google Ads.
        - name: searchThemes | type: array<string> | description: Search themes used in the campaign's targeting, provided as context for more relevant suggestions.  | validation: maxItems 25, maxLength 1000
        - name: userPrompt | type: string | description: Optional free-form instructions for refining the generated asset content.  | validation: maxLength 1000
        - name: provider | type: AssetSuggestionProvider | description: Provider to use for asset generation. Defaults to GOOGLE with WIX as fallback.  
             - enum:
             -     GOOGLE: Google Ads Asset Generation API.
             -     WIX: Wix in-house asset generation (Runway AI for images).
 Return type: PROMISE<GetImageAssetSuggestionsResponse>
  - name: assetSuggestions | type: array<AssetSuggestion> | description: AI-generated image assets uploaded to the site's Wix Media Manager.  
     - ONE-OF: 
        - name: headlineAsset | type: HeadlineTextAsset | description: Short headline text asset (up to 30 characters).  
           - name: text | type: string | description: Headline text shown in the ad.  | validation: maxLength 30
        - name: longHeadlineAsset | type: LongHeadlineTextAsset | description: Long headline text asset (up to 90 characters).  
           - name: text | type: string | description: Long headline text shown in the ad.  | validation: maxLength 90
        - name: descriptionAsset | type: DescriptionTextAsset | description: Description text asset (up to 90 characters).  
           - name: text | type: string | description: Description text shown below the headline in the ad.  | validation: maxLength 90
        - name: businessNameAsset | type: BusinessNameTextAsset | description: Business name text asset (up to 25 characters).  
           - name: text | type: string | description: Business name shown in the ad.  | validation: maxLength 25
        - name: imageAsset | type: ImageAsset | description: Image asset uploaded to the site's Wix Media Manager.  
           - name: name | type: string | description: Display name for the image asset.  | validation: maxLength 1000
           - name: url | type: string | description: URL of the image served from Wix Media Manager.  | validation: format WEB_URL
     - name: assetType | type: AssetFieldType | description: The field type identifying how this asset is used within a Performance Max campaign.  
         - enum:
         -     HEADLINE: Short headline shown in ads. At least 3 required; up to 15 allowed. Maximum 30 characters.
         -     LONG_HEADLINE: Longer headline used in certain ad formats. Exactly 1 required. Maximum 90 characters.
         -     DESCRIPTION: Description shown below the headline. At least 2 required; up to 4 allowed. Maximum 90 characters.
         -     BUSINESS_NAME: Business name shown in the ad. Exactly 1 required. Maximum 25 characters.
         -     MARKETING_IMAGE: Landscape marketing image with a 1.91:1 aspect ratio (e.g. 1200x628). Multiple images allowed.
         -     SQUARE_MARKETING_IMAGE: Square marketing image with a 1:1 aspect ratio (e.g. 1200x1200). Multiple images allowed.
         -     LOGO: Square logo with a 1:1 aspect ratio (e.g. 1200x1200). A transparent background is recommended.
         -     PORTRAIT_MARKETING_IMAGE: Portrait marketing image with a 4:5 aspect ratio (e.g. 960x1200). Multiple images allowed.
         -     LANDSCAPE_LOGO: Landscape logo with a 4:1 aspect ratio (e.g. 1200x300).
         -     CALL_TO_ACTION_SELECTION: Call-to-action button label. Select a value from CallToActionType. Optional.
         -     YOUTUBE_VIDEO: YouTube video asset identified by an 11-character video ID. 1 to 5 videos recommended.
         -     MEDIA_BUNDLE: HTML5 media bundle (ZIP file). Mutate-only in Google Ads.


```

### Examples

### Get image asset suggestions for a Performance Max campaign
```javascript
import { suggestions } from '@wix/promote-google-ads';

const response = await suggestions.getImageAssetSuggestions({
  suggestionInfo: {
    landingPageUrl: 'https://www.example.com',
    assetTypes: ['MARKETING_IMAGE', 'SQUARE_MARKETING_IMAGE'],
  },
});

/* Promise resolves to:
 * {
 *   "assetSuggestions": [
 *     {
 *       "assetType": "MARKETING_IMAGE",
 *       "imageAsset": {
 *         "name": "storefront-banner",
 *         "url": "https://static.wixstatic.com/media/abc123.jpg"
 *       }
 *     },
 *     {
 *       "assetType": "SQUARE_MARKETING_IMAGE",
 *       "imageAsset": {
 *         "name": "product-square",
 *         "url": "https://static.wixstatic.com/media/def456.jpg"
 *       }
 *     }
 *   ]
 * }
 */

```

### getImageAssetSuggestions (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { suggestions } from '@wix/promote-google-ads';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { suggestions },
  // Include the auth strategy and host as relevant
});


async function getImageAssetSuggestions(suggestionInfo,options) {
  const response = await myWixClient.suggestions.getImageAssetSuggestions(suggestionInfo,options);
};
```

---