Package google.shopping.merchant.productstudio.v1alpha

Index

ImageService

Service that exposes Generative AI (GenAI) endpoints for creating and enhancing product image content.

GenerateProductImageBackground

rpc GenerateProductImageBackground(GenerateProductImageBackgroundRequest) returns (GenerateProductImageBackgroundResponse)

GenerateProductImageBackground generates a new image where the background of the original image is replaced by an AI generated scene based on provided product information and a text prompt.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/content

For more information, see the OAuth 2.0 Overview.

RemoveProductImageBackground

rpc RemoveProductImageBackground(RemoveProductImageBackgroundRequest) returns (RemoveProductImageBackgroundResponse)

RemoveProductImageBackground generates a new image where the background of the original image is removed.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/content

For more information, see the OAuth 2.0 Overview.

UpscaleProductImage

rpc UpscaleProductImage(UpscaleProductImageRequest) returns (UpscaleProductImageResponse)

UpscaleProductImage generates a new image where the resolution of the original image is enhanced.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/content

For more information, see the OAuth 2.0 Overview.

TextSuggestionsService

Service that exposes Generative AI (GenAI) endpoints for creating and enhancing product text content, such as titles, descriptions, etc.

GenerateProductTextSuggestions

rpc GenerateProductTextSuggestions(GenerateProductTextSuggestionsRequest) returns (GenerateProductTextSuggestionsResponse)

GenerateProductTextSuggestions generates a set of candidate text completions (e.g., product titles, descriptions) based on provided product information. This endpoint leverages GenAI models to create suggestions for improving existing product text or generating new content.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/content

For more information, see the OAuth 2.0 Overview.

VideosService

Service to use Video resource.

GenerateVideo

rpc GenerateVideo(GenerateVideoRequest) returns (Video)

Generates a video.

A video can be generated for a single product, multiple products or a brand. Images used in the video are fetched from the product automatically or can be provided in the request. Text highlights used in the video are fetched from the product automatically or can be provided in the request.

Videos generated can either be of a composite template or a GenAI template. Composite templates are used to generate videos with multiple assets (for example images, texts) stitched together using specific, predefined templates. GenAI templates are used to generate short (~6s) video animations from still images.

The response is returned immediately with a video id. The actual video is generated in the background and the serving url is populated at a later time. The generation may take between 5 to 30 minutes depending on the server load.

Videos generated by default have a TTL of 6 months after which they are eligible for deletion unless the merchant explicitly requests to save the video.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/content

For more information, see the OAuth 2.0 Overview.

GetVideo

rpc GetVideo(GetVideoRequest) returns (Video)

Fetch video details such as serving url for a given video resource name. Videos created by merchants or auto-generated by Google can be fetched. If a video is not ready, the serving url will not be populated.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/content

For more information, see the OAuth 2.0 Overview.

ListVideos

rpc ListVideos(ListVideosRequest) returns (ListVideosResponse)

Lists all videos for a given account. Videos created by merchants or auto-generated by Google are returned.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/content

For more information, see the OAuth 2.0 Overview.

BrandInfo

Represents the brand information to be used in the video.

Fields
brand_colors[]

Color

Optional. The colors of the brand to be used as the background of the video. If not provided, the brand colors available in MC are used.

google_font_id

string

Optional. The Google font id of the font in the video for example "Roboto". If not provided, the default font is used.

business

string

The name of the brand. Merchant name is used if this is not provided.

CompositeTemplate

Represents a composite video template for generating videos with multiple assets (for example images, texts) stitched together using specific, predefined templates.

Fields
theme

VideoTheme

Required. The theme of the video to generate.

video_type

VideoType

Required. The type of video to generate, for example product, brand, deal, categorical.

products[]

string

Optional. The name of the product to generate the video for. Format: accounts/{account}/products/{product} where the last section product consists of 4 parts: channel~content_language~feed_label~offer_id example for product name is accounts/123/products/online~en~US~sku123

headlines[]

string

Optional. Short descriptions/titles for the video. for example Summer sale on all Nike hoodies. If not provided, the headlines will be fetched from the product and auto-generated.

images[]

InputImage

Optional. The images to use for video generation. If not provided, the images will be fetched from the product.

VideoTheme

List of video transitions.

Enums
VIDEO_THEME_UNSPECIFIED Unspecified video theme.
MOVING_GRID Requires 3 images, 3 texts for example https://www.youtube.com/embed/NyBKgo5H0K4
ORIGIN_STORY Requires 4 images, 4 texts for example https://www.youtube.com/embed/wBsrEpqzhug
SCRIBBLE_REVEAL Requires 5 images, 2 texts, for example https://www.youtube.com/embed/wd7dhASYP7k
STACKING_CARDS Requires 3 images, 3 texts.
REPEATING_TEXT Requires 3 images, 1 texts, for example https://www.youtube.com/embed/uhTjA8BeST8
NEWSFEED Requires 2 images, 4 texts, for example https://www.youtube.com/embed/FC6YU6x8gdY
SLIDING_IMAGES Requires 7 images, 1 text, for example https://www.youtube.com/embed/ooKCu05A-J0
SLIDING_STRIPES Requires 3 images, 2 text, for example https://www.youtube.com/embed/VLxLN9tQM4U
PRODUCT_CARDS Requires 6 images, 14 text, for example https://www.youtube.com/embed/n3GeQWkZJwM
LIGHT_REVEAL Requires 3 image, 2 text, for example https://www.youtube.com/embed/DPJm5NQ48Ns
SNAPSHOTS Requires 7 images, 6 text, for example https://www.youtube.com/embed/2xUC6N8nSHQ
WIPING_BACKGROUND Requires 3 image, 3 text, for example https://www.youtube.com/embed/KE8TNDup0ow
BOUNCING_WHEEL Requires 3 image, 3 text, for example https://www.youtube.com/embed/HCdEg0VLaXE
CARD_TOWER_V Requires 5 image, 3 text.
FLUID_LINES_H Requires 4 image, 3 text.
PRODUCT_SCROLL_V Requires 6 image, 2 text.
SLIDER_H Requires 4 image, 4 text.
FLASH_REVEAL_V Requires 7 image, 4 text.
SLIP_AND_SLIDE_V Requires 2 image, 2 text.
SHREDDED_SLIDESHOW_H Requires 3 image, 2 text.
UNFOLDING_STORY_H Requires 7 image, 2 text.

VideoType

The type of video to generate.

Enums
VIDEO_TYPE_UNSPECIFIED Unspecified video type.
BRAND Tell the story of the brand from different perspective.
DEAL Sales event to increase merchants’ visibility online
CATEGORICAL Promote selected product collections.
PRODUCT Demonstrate single products.

GenAiTemplate

Represents a GenAI video template for creating ~6s animations from still images and a prompt.

Fields
theme

VideoTheme

Required. The theme of the video to generate.

product

string

Optional. The name of the product to generate the video for. Format: accounts/{account}/products/{product} where the last section product consists of 4 parts: channel~content_language~feed_label~offer_id example for product name is accounts/123/products/online~en~US~sku123

image

InputImage

Optional. The image to generate the video from. If not provided, the image will be fetched from the product automatically.

VideoTheme

List of GenAI video transitions.

Enums
VIDEO_THEME_UNSPECIFIED Unspecified video theme type.
ZOOM_IN Zoom in the image.
ZOOM_OUT Zoom out the image.
CIRCULAR_DOLLY Circular dolly zoom.

GenerateImageBackgroundConfig

Client provided input configuration for generating the background.

Fields
product_description

string

Required. Example: "Hat on a baseball field" "Hat" = product description Description of product.

background_description

string

Required. Example: "Hat on a baseball field" "on a baseball field" = background description Description of wanted background.

GenerateProductImageBackgroundRequest

Request message for the GenerateProductImageBackground method.

Fields
name

string

Required. The account for which to generate an image. This acts as a container for the request and does not affect the generation itself. Format: accounts/{account}

output_config

OutputImageConfig

Optional. Configuration for how the output image should be returned.

input_image

InputImage

Required. The input image.

config

GenerateImageBackgroundConfig

Required. Configuration parameters for the generation of the background.

GenerateProductImageBackgroundResponse

Response message for the GenerateProductImageBackground method.

Fields
generated_image

GeneratedImage

The generated output image.

GenerateProductTextSuggestionsRequest

Request message for the GenerateProductTextSuggestions method.

Fields
name

string

Required. The name of the account to generate text suggestions for. This acts as a container for the request and does not affect the generation itself, as this is a stateless API. Format: accounts/{account}

product_info

ProductInfo

Required. Available information about the product. Used to inform the genAI models.

title_examples[]

TitleExample

Optional. Provide some hand-crafted examples of title improvements that are unique to your use case. This is a general tool that handles multiple product categories, but your brand identity may require custom functionality. Feel free to specify that here.

output_spec

OutputSpec

Optional. Configuration parameters that directly influence what content is generated, and how that content is rendered in the final response.

GenerateProductTextSuggestionsResponse

Response message for the GenerateProductTextSuggestions method.

Fields
attributes

map<string, string>

Any other generated attributes.

title

ProductTextGenerationSuggestion

Generated title suggestion.

description

ProductTextGenerationSuggestion

Generated description suggestion.

metadata

ProductTextGenerationMetadata

Additional info that clients may want to audit surrounding the generation.

GenerateVideoRequest

Request message for GenerateVideo.

Fields
parent

string

Required. The account where the video will be generated and stored. Format: accounts/{account}

video_input

VideoInput

Required. The input request to generate video.

GeneratedImage

Represents a generated image object.

Fields
name

string

Identifier. The unique key for the image.

generation_time

Timestamp

The timestamp when the image was generated.

Union field image. The generated image. image can be only one of the following:
uri

string

Generally web-requestable URI of the generated image. This is a temporary URI and will expire after 6 months. A URI may not be populated immediately after generation. Use get or list api using image_id to get the URI.

image_bytes

bytes

Raw bytes for the image.

GetVideoRequest

Request message for GetVideo.

Fields
name

string

Required. The unique key for the video using the format of accounts/{account}/videos/{video_id}.

Image

Product image represented as bytes directly or a URI.

Fields
Union field image. Required. The image to use for text generation. image can be only one of the following:
uri

string

Generally web-requestable URI.

data

bytes

Raw bytes for the image.

InputImage

Represents an input image.

Fields
Union field image. The input image. image can be only one of the following:
image_uri

string

Public uri of the image.

image_bytes

bytes

Raw image bytes.

ListVideosRequest

Request message for ListVideos.

Fields
parent

string

Required. The account to list videos for. Format: accounts/{account}

page_size

int32

Optional. The maximum number of videos to return. The service may return fewer than this value. The maximum value is 250; values above 250 will be coerced to 250. If unspecified, the maximum number of videos will be returned.

page_token

string

Optional. A page token, received from a previous ListVideos call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListVideos must match the call that provided the page token.

ListVideosResponse

Response message for ListVideos.

Fields
videos[]

Video

The list of videos.

next_page_token

string

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

OutputImageConfig

Configuration for how the output image should be returned.

Fields
return_image_uri

bool

Optional. If true, returns the output images as serving uris instead of bytes.

OutputSpec

Configuration parameters that directly influence what content is generated, and how that content is rendered in the final response.

Fields
attribute_order[]

string

Optional. The order that generated attributes should be placed in the generated title. Eg., if the attribute order is ["brand", "product", "size"], the generated title will have brand first, followed by the product name, and then size information after that.

workflow_id

string

Optional. The workflow to execute for the provided product data. Workflows may populate the response's title, description, or both. Currently supported workflow_ids are: "title", "description", and "tide"

tone

string

Optional. The tone of the output generated text. Supported tones are: "playful", "formal", "persuasive", and "conversational"

editorial_changes

string

Optional. Any editorial changes for the generated product data. For example, replace Small with "S", do not modify color if already present.

target_language

string

Optional. The language for output titles/descriptions. For example. 'German', 'es', 'FR'. Default is 'en'.

attribute_separator

string

Optional. Character used to separate attributes in the generated title. For example, '|', '-', ','.

ProductInfo

Available information about the product. Used to inform the genAI models.

Fields
product_attributes

map<string, string>

Required. A mapping of all available product attributes. This may include title, description, brand, gender, color, size, etc.

product_image

Image

Optional. Image associated with the product.

ProductTextGenerationMetadata

Wrapper data type for any metadata associated with text generation.

Fields
metadata

Struct

Metadata is a pretty loose concept. The data is modeled as a map here to indicate that there is no guaranteed structure to the output past a simple K:V association. The first use-case is to track words added/removed/changed in generations.

ProductTextGenerationSuggestion

Text generated for a product, optionally including its quality score.

Fields
text

string

The text generated

score

float

The quality score associated with the generation. Heuristic implemented according to the feedgen team's implementation styles.

change_summary

string

A brief summarization of all the changes that have been made.

RemoveImageBackgroundConfig

Client provided input configuration for removing the background.

Fields
background_color

RgbColor

Optional. If set, the result of background removal will be an RGB image with this given color as the background, instead of an RGBA 4-channel transparent image.

RemoveProductImageBackgroundRequest

Request message for the RemoveProductImageBackground method.

Fields
name

string

Required. The account for which to generate an image. This acts as a container for the request and does not affect the generation itself. Format: accounts/{account}

output_config

OutputImageConfig

Optional. Configuration for how the output image should be returned.

input_image

InputImage

Required. The input image.

config

RemoveImageBackgroundConfig

Optional. Configuration parameters for the removal of the background.

RemoveProductImageBackgroundResponse

Response message for the RemoveProductImageBackground method.

Fields
generated_image

GeneratedImage

The generated output image.

RgbColor

Represents a color in RGB format.

Fields
red

int32

Optional. Values in [0, 255].

green

int32

Optional. Values in [0, 255].

blue

int32

Optional. Values in [0, 255].

TitleExample

A hand-crafted example of a product title improvement. These examples are provided to the AI to improve its quality and guide it towards required outputs.

Fields
product_info

map<string, string>

Required. A map containing all existing product information. For example: {"title": "dress", "description": "A red dress", "brand": "Dresses4All"} Any information that you might use to populate your product feed.

final_product_info

map<string, string>

Required. A map in the same format as product_info but with all improvements included. For example, {"brand": "Dresses4All", "product": "dress", "color": "red", ...}. The order of attributes in this map may be used to guide the order in which they appear in the final generated title. For instance, the above will become: Dresses4All dress | red

category

string

Required. The product's category. This helps the AI understand when certain examples are more relevant than others.

title_format

string

Required. The attributes or approximate attributes that make up the title. For example, title "Google GShoe M" title_format can be "brand | product | size".

UpscaleProductImageRequest

Request message for the UpscaleProductImage method.

Fields
name

string

Required. The account for which to generate an image. This acts as a container for the request and does not affect the generation itself. Format: accounts/{account}

output_config

OutputImageConfig

Optional. Configuration for how the output image should be returned.

input_image

InputImage

Required. The input image.

UpscaleProductImageResponse

Response message for the UpscaleProductImage method.

Fields
generated_image

GeneratedImage

The generated output image.

Video

Represents a video object.

Fields
name

string

Output only. Identifier. The unique key for the video using the format of accounts/{account}/videos/{video_id}.

video_uri

VideoUri

Output only. The uri of the generated video. This is a temporary url and will expire after 6 months. A url may not be populated immediately after generation. Use get or list api using video_id to get the url.

generation_source

GenerationSource

Output only. The source of the video.

generation_time

Timestamp

Output only. The timestamp when the video was generated.

expiration_time

Timestamp

Output only. The timestamp when the video expires.

video_input

VideoInput

Required. The original input request used to generate the video.

video_status

VideoStatus

Output only. The status of the video generation.

GenerationSource

The source of the video.

Enums
GENERATION_SOURCE_UNSPECIFIED Unspecified generation source.
MERCHANT_GENERATED The video was generated by the merchant.
GENERATED_FOR_YOU The video was generated by Google.

VideoConfig

Video configuration to be used for video generation. These are the parameters that merchant can set to customize the video generation.

Fields
image_editing_option

ImageEditingOption

Optional. The image editing option for the video. If not provided, the image will be cropped to match the exact dimensions of the image slot.

brand_info

BrandInfo

Optional. Brand information to supplement the video generation for example brand name, logo, colors, font. If not provided, the brand information available in MC will be used.

ImageEditingOption

The image editing options for the video.

Enums
IMAGE_EDITING_OPTION_UNSPECIFIED Unspecified image editing option.
ORIGINAL Preserve the image's original aspect ratio.
CROPPING Crop the image to match the exact dimensions of the image slot.
AUTO_EXPANSION_WITH_BLURRY_BACKGROUND Fit the entire image within the slot, expanding the image with a blur effect to fill any remaining space.
BACKGROUND_REMOVAL Remove the background of the image.

VideoInput

The input request to generate video.

Fields
video_config

VideoConfig

Required. The configuration for the video to use for generation. These are the parameters that merchant can set to customize the video generation.

Union field video_template. The video template to use for generation. video_template can be only one of the following:
composite_template

CompositeTemplate

Multiple asset/data types stitched together using specific, predefined templates. Images, text, logos are pulled automatically into pre-defined slots in the template to output a video.

gen_ai_template

GenAiTemplate

Leverage AI to create short (~6s) video animations from still images for a single product. This can only be used for a single product. Generated clips can be stitched together for longer outputs using CompositeTemplate, for example product showcase from multiple animated movements.

region_code

string

CLDR country code (For example "US"). The region code is used to run eligibility checks for the underlying products and images used in the video generation.

VideoStatus

Represents the status of the video generation.

Fields
status

string

Output only. The status of the video generation for example generating, ready, failed.

VideoUri

Represents different types of video urls.

Fields
playable_uri

string

The playable uri for the video.

downloadable_uri

string

The downloadable uri for the video.

thumbnail_uri

string

The static thumbnail uri for the video.

preview_uri

string

A 6s preview of the video. This is a playable url.