Table of Contents

Class ModelVersionImage

Namespace
CivitaiSharp.Core.Models
Assembly
CivitaiSharp.Core.dll

An image associated with a model version (for gallery/examples). When fetched via /model-versions/:id endpoint, some fields like Id may be absent.

public sealed record ModelVersionImage : IEquatable<ModelVersionImage>
Inheritance
ModelVersionImage
Implements
Inherited Members

Constructors

ModelVersionImage(long?, string, int, int, int, string, MediaType, bool, bool, bool, bool, bool, long?, Availability?, ModelVersionImageFile?, ImageMeta?)

An image associated with a model version (for gallery/examples). When fetched via /model-versions/:id endpoint, some fields like Id may be absent.

public ModelVersionImage(long? Id, string Url, int NsfwLevel, int Width, int Height, string Hash, MediaType Type, bool Minor, bool IsPersonOfInterest, bool HasMetadata, bool HasPositivePrompt, bool OnSite, long? RemixOfId, Availability? Availability, ModelVersionImageFile? Metadata, ImageMeta? Meta)

Parameters

Id long?

The unique identifier for the image. Maps to JSON property "id".

Url string

The URL where the image is hosted. Maps to JSON property "url".

NsfwLevel int

The NSFW content level of the image on a numeric scale. Maps to JSON property "nsfwLevel".

Width int

The original width of the image in pixels. Maps to JSON property "width".

Height int

The original height of the image in pixels. Maps to JSON property "height".

Hash string

The blurhash of the image for placeholder generation. Maps to JSON property "hash".

Type MediaType

The media type of the image. Maps to JSON property "type".

Minor bool

Indicates whether the image contains a minor. Maps to JSON property "minor".

IsPersonOfInterest bool

Indicates whether the image is of a person of interest. Maps to JSON property "poi".

HasMetadata bool

Indicates whether the image contains generation metadata. Maps to JSON property "hasMeta".

HasPositivePrompt bool

Indicates whether the image has a positive prompt. Maps to JSON property "hasPositivePrompt".

OnSite bool

Indicates whether the image was generated on Civitai's servers. Maps to JSON property "onSite".

RemixOfId long?

The unique identifier of the image this was remixed from. Maps to JSON property "remixOfId".

Availability Availability?

The availability status of the image. Maps to JSON property "availability".

Metadata ModelVersionImageFile

File properties of the image including dimensions and hash. Maps to JSON property "metadata".

Meta ImageMeta

Generation metadata and parameters used to create this image. Maps to JSON property "meta".

Properties

Availability

The availability status of the image. Maps to JSON property "availability".

[JsonPropertyName("availability")]
public Availability? Availability { get; init; }

Property Value

Availability?

HasMetadata

Indicates whether the image contains generation metadata. Maps to JSON property "hasMeta".

[JsonPropertyName("hasMeta")]
public bool HasMetadata { get; init; }

Property Value

bool

HasPositivePrompt

Indicates whether the image has a positive prompt. Maps to JSON property "hasPositivePrompt".

[JsonPropertyName("hasPositivePrompt")]
public bool HasPositivePrompt { get; init; }

Property Value

bool

Hash

The blurhash of the image for placeholder generation. Maps to JSON property "hash".

[JsonPropertyName("hash")]
public string Hash { get; init; }

Property Value

string

Height

The original height of the image in pixels. Maps to JSON property "height".

[JsonPropertyName("height")]
public int Height { get; init; }

Property Value

int

Id

The unique identifier for the image. Maps to JSON property "id".

[JsonPropertyName("id")]
public long? Id { get; init; }

Property Value

long?

IsPersonOfInterest

Indicates whether the image is of a person of interest. Maps to JSON property "poi".

[JsonPropertyName("poi")]
public bool IsPersonOfInterest { 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

ImageMeta

Metadata

File properties of the image including dimensions and hash. Maps to JSON property "metadata".

[JsonPropertyName("metadata")]
public ModelVersionImageFile? Metadata { get; init; }

Property Value

ModelVersionImageFile

Minor

Indicates whether the image contains a minor. Maps to JSON property "minor".

[JsonPropertyName("minor")]
public bool Minor { get; init; }

Property Value

bool

NsfwLevel

The NSFW content level of the image on a numeric scale. Maps to JSON property "nsfwLevel".

[JsonPropertyName("nsfwLevel")]
public int NsfwLevel { get; init; }

Property Value

int

OnSite

Indicates whether the image was generated on Civitai's servers. Maps to JSON property "onSite".

[JsonPropertyName("onSite")]
public bool OnSite { get; init; }

Property Value

bool

RemixOfId

The unique identifier of the image this was remixed from. Maps to JSON property "remixOfId".

[JsonPropertyName("remixOfId")]
public long? RemixOfId { get; init; }

Property Value

long?

Type

The media type of the image. Maps to JSON property "type".

[JsonPropertyName("type")]
public MediaType Type { get; init; }

Property Value

MediaType

Url

The URL where the image is hosted. Maps to JSON property "url".

[JsonPropertyName("url")]
public string Url { get; init; }

Property Value

string

Width

The original width of the image in pixels. Maps to JSON property "width".

[JsonPropertyName("width")]
public int Width { get; init; }

Property Value

int