Class ImagePrice
Represents per-image pricing, optionally scoped by resolution and quality tier.
Assembly: Glitch9.AIDevKit.dll
Syntax
[Serializable]
public class ImagePrice : ModelPrice
Constructors
|
Edit this page
View Source
ImagePrice()
Declaration
|
Edit this page
View Source
ImagePrice(double)
Declaration
public ImagePrice(double cost)
Parameters
| Type |
Name |
Description |
| double |
cost |
|
Fields
|
Edit this page
View Source
noBackground
Whether this price applies to images generated without a background (PixelArt only).
Declaration
[SerializeField]
[JsonProperty("noBackground")]
public bool noBackground
Field Value
|
Edit this page
View Source
quality
The quality tier this price applies to (OpenAI only).
Declaration
[SerializeField]
[JsonProperty("quality")]
public OpenAITypes.ImageQuality quality
Field Value
|
Edit this page
View Source
size
The image resolution this price applies to. Default matches any size.
Declaration
[SerializeField]
[JsonProperty("size")]
public MediaSize size
Field Value
Methods
|
Edit this page
View Source
GetTypeName()
Returns a human-readable label for this price type (e.g. "Input Token", "HD Image").
Declaration
public override string GetTypeName()
Returns
Overrides
|
Edit this page
View Source
Creates an OpenAI image price entry for a specific size and quality combination.
Declaration
public static ImagePrice OpenAI(MediaSize size, OpenAITypes.ImageQuality quality, double cost)
Parameters
Returns
|
Edit this page
View Source
PixelArt(int, int, double, bool)
Creates a PixelArt image price entry for a specific resolution, optionally without background.
Declaration
public static ImagePrice PixelArt(int width, int height, double cost, bool noBackground = false)
Parameters
Returns
Extension Methods