Table of Contents

Class GenerateVideosSource

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

A set of source input(s) for video generation.

public record GenerateVideosSource : IEquatable<GenerateVideosSource>
Inheritance
GenerateVideosSource
Implements
Inherited Members

Properties

Image

The input image for generating the videos. Optional if prompt is provided. Not allowed if video is provided.

[JsonPropertyName("image")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Image? Image { get; set; }

Property Value

Image

Prompt

The text prompt for generating the videos. Optional if image or video is provided.

[JsonPropertyName("prompt")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Prompt { get; set; }

Property Value

string

Video

The input video for video extension use cases. Optional if prompt is provided. Not allowed if image is provided.

[JsonPropertyName("video")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Video? Video { get; set; }

Property Value

Video

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a GenerateVideosSource object.

public static GenerateVideosSource? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

GenerateVideosSource

The deserialized GenerateVideosSource object, or null if deserialization fails.