GenerateImagesRequest

  • The request message for AssetGenerationService.GenerateImages is used to generate images for a customer.

  • You must provide the customer ID for whom the images are being generated.

  • You can specify the desired output field types for the generated images, such as MARKETING_IMAGE or SQUARE_MARKETING_IMAGE.

  • Additional context can be provided to guide image generation, such as the advertising channel type (SEARCH, PERFORMANCE_MAX, DISPLAY, DEMAND_GEN).

  • The type of image generation to apply can be based on a final URL, a freeform prompt, or by recontextualizing existing product images.

Request message for AssetGenerationService.GenerateImages

Proto definition GitHub

Fields

asset_field_types[]

AssetFieldType

Optional. Output field types for generated images. Supported values are MARKETING_IMAGE, SQUARE_MARKETING_IMAGE, PORTRAIT_MARKETING_IMAGE, and TALL_PORTRAIT_MARKETING_IMAGE. All specified field types must be compatible with the advertising_channel_type or existing_generation_context (whichever is set). If no field types are provided, images will be generated for all compatible field types.

context

Union field. Additional context to guide image generation.

context can be only one of the following:

advertising_channel_type

AdvertisingChannelType

Optional. The advertising channel type for which the images are being generated. This field is required if existing_generation_context is not provided. Supported channel types include SEARCH, PERFORMANCE_MAX, DISPLAY, and DEMAND_GEN.

customer_id

string

Required. The ID of the customer for whom the images are being generated. Required.

generation_type

Union field. Type of image generation to apply. Required.

generation_type can be only one of the following:

final_url_generation

FinalUrlImageGenerationInput

Optional. Generate images from a final url.

freeform_generation

FreeformImageGenerationInput

Optional. Generate images from a freeform prompt.

product_recontext_generation

ProductRecontextGenerationImageInput

Optional. Generate new images by recontextualizing existing product images.