ImagePricingRegistry

org.llm4s.imagegeneration.ImagePricingRegistry

Registry of image generation model pricing.

Provides per-image cost lookup for supported image generation models. Costs are in USD per image and vary by model, size, and quality.

Pricing sources:

Attributes

See also

org.llm4s.model.ModelPricing for LLM token-based pricing

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case class ImagePricingEntry(costPerImage: Double, model: String, quality: String, size: String)

Pricing entry for an image generation model configuration.

Pricing entry for an image generation model configuration.

Value parameters

costPerImage

Cost in USD per generated image

model

Model identifier

quality

Quality level (e.g., "standard", "hd")

size

Image size descriptor (e.g., "1024x1024")

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def costPerImage(model: String, quality: String, size: String): Option[Double]

Look up the cost per image for a given model, quality, and size.

Look up the cost per image for a given model, quality, and size.

Value parameters

model

Model name (e.g., "gpt-image-1", "dall-e-3")

quality

Quality level (e.g., "standard", "hd", "low", "medium", "high")

size

Image size as "WxH" string (e.g., "1024x1024")

Attributes

Returns

Cost in USD per image, or None if pricing is unknown

def costPerImageWithDefaults(model: String, quality: Option[String], size: ImageSize): Option[Double]

Look up the cost per image with automatic quality defaulting.

Look up the cost per image with automatic quality defaulting.

Uses "standard" as the default quality if the provided quality is empty or not found.

Value parameters

model

Model name

quality

Quality level (defaults to "standard" if None or empty)

size

Image size as "WxH" string

Attributes

Returns

Cost in USD per image, or None if pricing is unknown

def estimateCost(model: String, quality: Option[String], size: ImageSize, count: Int): Option[Double]

Estimate total cost for generating multiple images.

Estimate total cost for generating multiple images.

Value parameters

count

Number of images to generate

model

Model name

quality

Quality level

size

Image size

Attributes

Returns

Total estimated cost in USD, or None if pricing is unknown

def knownModels: Set[String]

List all known models in the pricing registry.

List all known models in the pricing registry.

Attributes