Interface Model._FinalStage
- All Known Implementing Classes:
Model.Builder
- Enclosing class:
Model
-
Method Summary
Modifier and TypeMethodDescriptionaddAllPricingTiers(List<PricingTier> pricingTiers) additionalProperties(Map<String, Object> additionalProperties) additionalProperty(String key, Object value) addPricingTiers(PricingTier pricingTiers) build()inputPrice(Nullable<Double> inputPrice) inputPrice(Double inputPrice) inputPrice(Optional<Double> inputPrice) Deprecated.outputPrice(Nullable<Double> outputPrice) outputPrice(Double outputPrice) outputPrice(Optional<Double> outputPrice) Deprecated.prices(String key, ModelPrice value) prices(Map<String, ModelPrice> prices) Deprecated.pricingTiers(List<PricingTier> pricingTiers) Array of pricing tiers with conditional pricing based on usage thresholds.putAllPrices(Map<String, ModelPrice> prices) startDate(Nullable<OffsetDateTime> startDate) startDate(OffsetDateTime startDate) startDate(Optional<OffsetDateTime> startDate) Apply only to generations which are newer than this ISO date.tokenizerId(Nullable<String> tokenizerId) tokenizerId(String tokenizerId) tokenizerId(Optional<String> tokenizerId) Optional.totalPrice(Nullable<Double> totalPrice) totalPrice(Double totalPrice) totalPrice(Optional<Double> totalPrice) Deprecated.unit(Nullable<ModelUsageUnit> unit) unit(ModelUsageUnit unit) unit(Optional<ModelUsageUnit> unit) Unit used by this model.
-
Method Details
-
build
Model build() -
additionalProperty
-
additionalProperties
-
startDate
Apply only to generations which are newer than this ISO date.
-
startDate
-
startDate
-
unit
Unit used by this model.
-
unit
-
unit
-
inputPrice
Deprecated. See 'prices' instead. Price (USD) per input unit
-
inputPrice
-
inputPrice
-
outputPrice
Deprecated. See 'prices' instead. Price (USD) per output unit
-
outputPrice
-
outputPrice
-
totalPrice
Deprecated. See 'prices' instead. Price (USD) per total unit. Cannot be set if input or output price is set.
-
totalPrice
-
totalPrice
-
tokenizerId
Optional. Tokenizer to be applied to observations which match to this model. See docs for more details.
-
tokenizerId
-
tokenizerId
-
prices
Deprecated. Use 'pricingTiers' instead for models with usage-based pricing variations.
This field shows prices by usage type from the default pricing tier. Maintained for backward compatibility. If the model uses tiered pricing, this field will be populated from the default tier's prices.
-
putAllPrices
-
prices
-
pricingTiers
Array of pricing tiers with conditional pricing based on usage thresholds.
Pricing tiers enable accurate cost tracking for models that charge different rates based on usage patterns (e.g., different rates for high-volume usage, large context windows, or cached tokens).
Each model must have exactly one default tier (isDefault=true, priority=0) that serves as a fallback. Additional conditional tiers can be defined with specific matching criteria.
If this array is empty, the model uses legacy flat pricing from the inputPrice/outputPrice/totalPrice fields.
-
addPricingTiers
-
addAllPricingTiers
-