Interface CreateModelRequest._FinalStage
- All Known Implementing Classes:
CreateModelRequest.Builder
- Enclosing class:
CreateModelRequest
-
Method Summary
Modifier and TypeMethodDescriptionadditionalProperties(Map<String, Object> additionalProperties) additionalProperty(String key, Object value) build()inputPrice(Double inputPrice) inputPrice(Optional<Double> inputPrice) Deprecated.outputPrice(Double outputPrice) outputPrice(Optional<Double> outputPrice) Deprecated.pricingTiers(List<PricingTierInput> pricingTiers) pricingTiers(Optional<List<PricingTierInput>> pricingTiers) Optional.startDate(OffsetDateTime startDate) startDate(Optional<OffsetDateTime> startDate) Apply only to generations which are newer than this ISO date.tokenizerConfig(Object tokenizerConfig) tokenizerConfig(Optional<Object> tokenizerConfig) Optional.tokenizerId(String tokenizerId) tokenizerId(Optional<String> tokenizerId) Optional.totalPrice(Double totalPrice) totalPrice(Optional<Double> totalPrice) Deprecated.unit(ModelUsageUnit unit) unit(Optional<ModelUsageUnit> unit) Unit used by this model.
-
Method Details
-
build
CreateModelRequest build() -
additionalProperty
-
additionalProperties
-
startDate
Apply only to generations which are newer than this ISO date.
-
startDate
-
unit
Unit used by this model.
-
unit
-
inputPrice
Deprecated. Use 'pricingTiers' instead. Price (USD) per input unit. Creates a default tier if pricingTiers not provided.
-
inputPrice
-
outputPrice
Deprecated. Use 'pricingTiers' instead. Price (USD) per output unit. Creates a default tier if pricingTiers not provided.
-
outputPrice
-
totalPrice
Deprecated. Use 'pricingTiers' instead. Price (USD) per total units. Cannot be set if input or output price is set. Creates a default tier if pricingTiers not provided.
-
totalPrice
-
pricingTiers
Optional. Array of pricing tiers for this model.
Use pricing tiers for all models - both those with threshold-based pricing variations and those with simple flat pricing:
-
For models with standard flat pricing: Create a single default tier with your prices (e.g., one tier with isDefault=true, priority=0, conditions=[], and your standard prices)
-
For models with threshold-based pricing: Create a default tier plus additional conditional tiers (e.g., default tier for standard usage + high-volume tier for usage above certain thresholds)
Requirements:
- Cannot be provided with flat prices (inputPrice/outputPrice/totalPrice) - use one approach or the other
- Must include exactly one default tier with isDefault=true, priority=0, and conditions=[]
- All tier names and priorities must be unique within the model
- Each tier must define at least one price
If omitted, you must provide flat prices instead (inputPrice/outputPrice/totalPrice), which will automatically create a single default tier named "Standard".
-
-
pricingTiers
-
tokenizerId
Optional. Tokenizer to be applied to observations which match to this model. See docs for more details.
-
tokenizerId
-
tokenizerConfig
Optional. Configuration for the selected tokenizer. Needs to be JSON. See docs for more details.
-
tokenizerConfig
-