cURL
Prerequisites
You have created an API key and configured it as the environment variable DASHSCOPE_API_KEY. See Configure an API key as an environment variable.
Supported regions: Singapore and China North 2 (Beijing). Use an API key and endpoint from the region you call; see Regions and endpoints.
Request
Protocol: TypeSafe System One (POST /compatible-mode/v1/systemone)
A single request carries a business state and several typed questions (choice / noul / score). The model returns the decision result and probability distribution for each question in a single forward pass, with choice and score additionally returning confidence, without generating text, so latency and cost are independent of output length.
decision-model-preview does not support streaming, Function Calling, web search, or structured output. The model output is a structured decision result (probability distributions and confidence), not generated text.client.decision.create interface, and Java SDK 2.23.3 or later provides the com.alibaba.dashscope.decision package. You can also call it with the generic TypeSafe SDK (typesafe-sdk). On failure, the Python SDK raises a DashScopeError exception and the Java SDK raises an ApiException.Authorizations
string
header
required
QwenCloud API key, in the format Bearer $DASHSCOPE_API_KEY. See Get an API key.
Body
application/jsonenum<string>
required
Model name: decision-model-preview.
decision-model-preview
Text
required
The business state to make decisions on: ticket text, a conversation, or a structured object (objects are serialized before being sent to the model).
object
required
A map of questions. The key is a caller-defined question id; the value is a question object with the following fields.
Response
200-application/json