GenerateVideoResponse

Generate video response.

Fields
generatedSamples[] object (Media)

The generates samples.

raiMediaFilteredCount integer

Returns if any videos were filtered due to RAI policies.

raiMediaFilteredReasons[] string

Returns rai failure reasons if any.

JSON representation
{
  "generatedSamples": [
    {
      object (Media)
    }
  ],
  "raiMediaFilteredCount": integer,
  "raiMediaFilteredReasons": [
    string
  ]
}

Media

Media.

Fields
type Union type
type can be only one of the following:
image object (Image)

Image.

video object (Video)

Video

JSON representation
{

  // type
  "image": {
    object (Image)
  },
  "video": {
    object (Video)
  }
  // Union type
}

Image

Image.

Fields
encoding string

Image encoding, encoded as "image/png" or "image/jpg".

imageRaiScores object (ImageRAIScores)

RAI scores for generated image.

raiInfo object (RaiInfo)

RAI info for image.

semanticFilterResponse object (SemanticFilterResponse)

Semantic filter info for image.

text string

Text/Expanded text input for imagen.

imageSize object (ImageSize)

Image size. The size of the image. Can be self reported, or computed from the image bytes.

content Union type
content can be only one of the following:
image string (bytes format)

Raw bytes.

A base64-encoded string.

uri string

Path to another storage (typically Google Cloud Storage).

JSON representation
{
  "encoding": string,
  "imageRaiScores": {
    object (ImageRAIScores)
  },
  "raiInfo": {
    object (RaiInfo)
  },
  "semanticFilterResponse": {
    object (SemanticFilterResponse)
  },
  "text": string,
  "imageSize": {
    object (ImageSize)
  },

  // content
  "image": string,
  "uri": string
  // Union type
}

ImageRAIScores

RAI scores for generated image returned.

Fields
agileWatermarkDetectionScore number

Agile watermark score for image.

JSON representation
{
  "agileWatermarkDetectionScore": number
}

RaiInfo

Next id: 6

Fields
raiCategories[] string

List of rai categories' information to return

scores[] number

List of rai scores mapping to the rai categories. Rounded to 1 decimal place.

blockedEntities[] string

List of blocked entities from the blocklist if it is detected.

modelName string

The model name used to indexing into the RaiFilterConfig map. Would either be one of imagegeneration@002-006, imagen-3.0-... api endpoint names, or internal names used for mapping to different filter configs (genselfie, ai_watermark) than its api endpoint.

JSON representation
{
  "raiCategories": [
    string
  ],
  "scores": [
    number
  ],
  "blockedEntities": [
    string
  ],
  "modelName": string
}

SemanticFilterResponse

Fields
passedSemanticFilter boolean

This response is added when semantic filter config is turned on in EditConfig. It reports if this image is passed semantic filter response. If passedSemanticFilter is false, the bounding box information will be populated for user to check what caused the semantic filter to fail.

namedBoundingBoxes[] object (NamedBoundingBox)

Class labels of the bounding boxes that failed the semantic filtering. Bounding box coordinates.

JSON representation
{
  "passedSemanticFilter": boolean,
  "namedBoundingBoxes": [
    {
      object (NamedBoundingBox)
    }
  ]
}

NamedBoundingBox

Fields
x1 number
x2 number
y1 number
y2 number
classes[] string
entities[] string
scores[] number
JSON representation
{
  "x1": number,
  "x2": number,
  "y1": number,
  "y2": number,
  "classes": [
    string
  ],
  "entities": [
    string
  ],
  "scores": [
    number
  ]
}

ImageSize

Image size.

Fields
width integer
height integer
channels integer
JSON representation
{
  "width": integer,
  "height": integer,
  "channels": integer
}

Video

Video

Fields
encoding string

Video encoding, for example "video/mp4".

text string

Text/Expanded text input for Help Me Write.

content Union type
content can be only one of the following:
video string (bytes format)

Raw bytes.

A base64-encoded string.

uri string

Path to another storage (typically Google Cloud Storage).

encodedVideo string

Base 64 encoded video bytes.

JSON representation
{
  "encoding": string,
  "text": string,

  // content
  "video": string,
  "uri": string,
  "encodedVideo": string
  // Union type
}