predict_with_hosted_model
Try a hosted model on a request context before (or after) promoting a version: the price it would give, and what the model said (a demand model's chance of a sale and elasticity, or a price model's output). Uses the active version unless version names another, and 409 when there is none. Nothing is metered or logged as a quote. Answers 404 not_released while hosted models (the hosted-pricing-models release) are not switched on for your workspace. Needs a Last Price credential with function test scope. Needs a claimed workspace: a sandbox key from self-registration is refused (403) until a person claims the workspace.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | Yes | The request context to price, as compute_price takes it. current_price is required. | |
| version | No | The version to try. Defaults to the active one. | |
| model_id | Yes | The hosted model's id: id on a list_hosted_models result. | |
| constraints | No | Optional limits on the price. |