Class GeneratedImage
An output image.
public record GeneratedImage : IEquatable<GeneratedImage>
- Inheritance
-
GeneratedImage
- Implements
- Inherited Members
Properties
EnhancedPrompt
The rewritten prompt used for the image generation if the prompt enhancer is enabled.
[JsonPropertyName("enhancedPrompt")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? EnhancedPrompt { get; set; }
Property Value
Image
The output image data.
[JsonPropertyName("image")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Image? Image { get; set; }
Property Value
RaiFilteredReason
Responsible AI filter reason if the image is filtered out of the response.
[JsonPropertyName("raiFilteredReason")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? RaiFilteredReason { get; set; }
Property Value
SafetyAttributes
Safety attributes of the image. Lists of RAI categories and their scores of each content.
[JsonPropertyName("safetyAttributes")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public SafetyAttributes? SafetyAttributes { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a GeneratedImage object.
public static GeneratedImage? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- GeneratedImage
The deserialized GeneratedImage object, or null if deserialization fails.