Class ImageSample
- Namespace
- GenerativeAI.Types
- Assembly
- GenerativeAI.dll
Represents an image, which can be provided via Google Cloud Storage URI or raw byte data.
public class ImageSample
- Inheritance
-
ImageSample
- Inherited Members
- Extension Methods
Remarks
Used as input for certain video generation tasks (e.g., image-to-video).
Properties
GcsUri
The Cloud Storage URI of the image. Cannot be set if ImageBytes is set. Example: "gs://bucket-name/image.png".
[JsonPropertyName("gcsUri")]
public string? GcsUri { get; set; }
Property Value
ImageBytes
The raw image data as a byte array, Base64 encoded when serialized. Cannot be set if GcsUri is set.
[JsonPropertyName("imageBytes")]
public byte[]? ImageBytes { get; set; }
Property Value
- byte[]
MimeType
The MIME type of the image (e.g., "image/png", "image/jpeg"). Required if providing image data.
[JsonPropertyName("mimeType")]
public string? MimeType { get; set; }