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.

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.

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.

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.

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.