Class Image
- Namespace
- CivitaiSharp.Core.Models
- Assembly
- CivitaiSharp.Core.dll
Image returned by the public API.
public sealed record Image : IEquatable<Image>
- Inheritance
-
Image
- Implements
- Inherited Members
Constructors
Image(long, string, string?, int, int, ImageNsfwLevel?, MediaType?, bool?, int?, DateTime?, long?, ImageStats?, ImageMeta?, string?, string?, IReadOnlyList<long>?)
Image returned by the public API.
public Image(long Id, string Url, string? Hash, int Width, int Height, ImageNsfwLevel? NsfwLevel, MediaType? Type, bool? IsNsfw, int? BrowsingLevel, DateTime? CreatedAt, long? PostId, ImageStats? Stats, ImageMeta? Meta, string? Username, string? BaseModel, IReadOnlyList<long>? ModelVersionIds)
Parameters
IdlongThe unique identifier for the image. Maps to JSON property "id".
UrlstringThe URL of the image at its source resolution. Maps to JSON property "url".
HashstringThe blurhash of the image for placeholder generation. Maps to JSON property "hash".
WidthintThe width of the image in pixels. Maps to JSON property "width".
HeightintThe height of the image in pixels. Maps to JSON property "height".
NsfwLevelImageNsfwLevel?The NSFW content level of the image (e.g., "None", "Soft", "Mature", "X"). Maps to JSON property "nsfwLevel".
TypeMediaType?The type of media represented by this image (e.g., "image"). Maps to JSON property "type".
IsNsfwbool?Indicates whether the image has any mature content labels applied. Maps to JSON property "nsfw".
BrowsingLevelint?The browsing level threshold for viewing this image. Maps to JSON property "browsingLevel".
CreatedAtDateTime?The date and time when the image was posted. Maps to JSON property "createdAt".
PostIdlong?The unique identifier of the post this image belongs to. Maps to JSON property "postId".
StatsImageStatsStatistical information about user reactions to this image. Maps to JSON property "stats".
MetaImageMetaGeneration metadata and parameters used to create this image. Maps to JSON property "meta".
UsernamestringThe username of the creator who posted this image. Maps to JSON property "username".
BaseModelstringThe base model used for image generation (e.g., "Pony", "Flux.1 D", "SDXL 1.0"). Maps to JSON property "baseModel".
ModelVersionIdsIReadOnlyList<long>Array of model version IDs used to generate this image. Maps to JSON property "modelVersionIds".
Properties
BaseModel
The base model used for image generation (e.g., "Pony", "Flux.1 D", "SDXL 1.0"). Maps to JSON property "baseModel".
[JsonPropertyName("baseModel")]
public string? BaseModel { get; init; }
Property Value
BrowsingLevel
The browsing level threshold for viewing this image. Maps to JSON property "browsingLevel".
[JsonPropertyName("browsingLevel")]
public int? BrowsingLevel { get; init; }
Property Value
- int?
CreatedAt
The date and time when the image was posted. Maps to JSON property "createdAt".
[JsonPropertyName("createdAt")]
public DateTime? CreatedAt { get; init; }
Property Value
Hash
The blurhash of the image for placeholder generation. Maps to JSON property "hash".
[JsonPropertyName("hash")]
public string? Hash { get; init; }
Property Value
Height
The height of the image in pixels. Maps to JSON property "height".
[JsonPropertyName("height")]
public int Height { get; init; }
Property Value
Id
The unique identifier for the image. Maps to JSON property "id".
[JsonPropertyName("id")]
public long Id { get; init; }
Property Value
IsNsfw
Indicates whether the image has any mature content labels applied. Maps to JSON property "nsfw".
[JsonPropertyName("nsfw")]
public bool? IsNsfw { get; init; }
Property Value
- bool?
Meta
Generation metadata and parameters used to create this image. Maps to JSON property "meta".
[JsonPropertyName("meta")]
public ImageMeta? Meta { get; init; }
Property Value
ModelVersionIds
Array of model version IDs used to generate this image. Maps to JSON property "modelVersionIds".
[JsonPropertyName("modelVersionIds")]
public IReadOnlyList<long>? ModelVersionIds { get; init; }
Property Value
NsfwLevel
The NSFW content level of the image (e.g., "None", "Soft", "Mature", "X"). Maps to JSON property "nsfwLevel".
[JsonPropertyName("nsfwLevel")]
public ImageNsfwLevel? NsfwLevel { get; init; }
Property Value
PostId
The unique identifier of the post this image belongs to. Maps to JSON property "postId".
[JsonPropertyName("postId")]
public long? PostId { get; init; }
Property Value
- long?
Stats
Statistical information about user reactions to this image. Maps to JSON property "stats".
[JsonPropertyName("stats")]
public ImageStats? Stats { get; init; }
Property Value
Type
The type of media represented by this image (e.g., "image"). Maps to JSON property "type".
[JsonPropertyName("type")]
public MediaType? Type { get; init; }
Property Value
Url
The URL of the image at its source resolution. Maps to JSON property "url".
[JsonPropertyName("url")]
public string Url { get; init; }
Property Value
Username
The username of the creator who posted this image. Maps to JSON property "username".
[JsonPropertyName("username")]
public string? Username { get; init; }
Property Value
Width
The width of the image in pixels. Maps to JSON property "width".
[JsonPropertyName("width")]
public int Width { get; init; }