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:
- OpenAI: https://openai.com/api/pricing/
- Stability AI: https://platform.stability.ai/pricing
Attributes
- See also
-
org.llm4s.model.ModelPricing for LLM token-based pricing
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ImagePricingRegistry.type
Members list
Type members
Classlikes
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 Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Value members
Concrete methods
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
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
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
List all known models in the pricing registry.
List all known models in the pricing registry.