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
Idlong?The unique identifier for the image. Maps to JSON property "id".
UrlstringThe URL where the image is hosted. Maps to JSON property "url".
NsfwLevelintThe NSFW content level of the image on a numeric scale. Maps to JSON property "nsfwLevel".
WidthintThe original width of the image in pixels. Maps to JSON property "width".
HeightintThe original height of the image in pixels. Maps to JSON property "height".
HashstringThe blurhash of the image for placeholder generation. Maps to JSON property "hash".
TypeMediaTypeThe media type of the image. Maps to JSON property "type".
MinorboolIndicates whether the image contains a minor. Maps to JSON property "minor".
IsPersonOfInterestboolIndicates whether the image is of a person of interest. Maps to JSON property "poi".
HasMetadataboolIndicates whether the image contains generation metadata. Maps to JSON property "hasMeta".
HasPositivePromptboolIndicates whether the image has a positive prompt. Maps to JSON property "hasPositivePrompt".
OnSiteboolIndicates whether the image was generated on Civitai's servers. Maps to JSON property "onSite".
RemixOfIdlong?The unique identifier of the image this was remixed from. Maps to JSON property "remixOfId".
AvailabilityAvailability?The availability status of the image. Maps to JSON property "availability".
MetadataModelVersionImageFileFile properties of the image including dimensions and hash. Maps to JSON property "metadata".
MetaImageMetaGeneration 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
HasMetadata
Indicates whether the image contains generation metadata. Maps to JSON property "hasMeta".
[JsonPropertyName("hasMeta")]
public bool HasMetadata { get; init; }
Property Value
HasPositivePrompt
Indicates whether the image has a positive prompt. Maps to JSON property "hasPositivePrompt".
[JsonPropertyName("hasPositivePrompt")]
public bool HasPositivePrompt { 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 original 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
- 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
Meta
Generation metadata and parameters used to create this image. Maps to JSON property "meta".
[JsonPropertyName("meta")]
public ImageMeta? Meta { get; init; }
Property Value
Metadata
File properties of the image including dimensions and hash. Maps to JSON property "metadata".
[JsonPropertyName("metadata")]
public ModelVersionImageFile? Metadata { get; init; }
Property Value
Minor
Indicates whether the image contains a minor. Maps to JSON property "minor".
[JsonPropertyName("minor")]
public bool Minor { get; init; }
Property Value
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
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
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
Url
The URL where the image is hosted. Maps to JSON property "url".
[JsonPropertyName("url")]
public string Url { get; init; }
Property Value
Width
The original width of the image in pixels. Maps to JSON property "width".
[JsonPropertyName("width")]
public int Width { get; init; }