- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- GenerateImageBackgroundConfig
- Try it!
generatedImages.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.
HTTP request
POST https://merchantapi.googleapis.com/productstudio/v1alpha/{name=accounts/*}/generatedImages:generateProductImageBackground
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
name |
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} |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "outputConfig": { object ( |
Fields | |
---|---|
outputConfig |
Optional. Configuration for how the output image should be returned. |
inputImage |
Required. The input image. |
config |
Required. Configuration parameters for the generation of the background. |
Response body
Response message for the generatedImages.generateProductImageBackground method.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"generatedImage": {
object ( |
Fields | |
---|---|
generatedImage |
The generated output image. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/content
For more information, see the OAuth 2.0 Overview.
GenerateImageBackgroundConfig
Client provided input configuration for generating the background.
JSON representation |
---|
{ "productDescription": string, "backgroundDescription": string } |
Fields | |
---|---|
productDescription |
Required. Example: "Hat on a baseball field" "Hat" = product description Description of product. |
backgroundDescription |
Required. Example: "Hat on a baseball field" "on a baseball field" = background description Description of wanted background. |