Call POST /compatible-mode/v1/systemone to use the Bailian decision model (decision-model / decision-model-preview), which returns classification, scoring, and yes/no decisions with full probability distributions and confidence in a single forward pass, without generating text. Suitable for high-frequency structured decisions such as ticket routing, content moderation, agent routing, and result verification.
Prerequisites
You have created an API Key and set it as the environment variable DASHSCOPE_API_KEY. For configuration, see Configure the API key in environment variables.
Request
Protocol: TypeSafe System One (POST /compatible-mode/v1/systemone)
A single request carries the business state and several typed questions (choice / noul / score). The model returns the decision result and probability distribution for each question in one forward pass, with choice and score additionally returning confidence, and does not generate text, so latency and cost are independent of output length.
Endpoint
Replace {WorkspaceId} with your workspace ID. See Regions and endpoints.
Region | Endpoint |
|---|---|
China (Beijing) |
|
Singapore |
|
US (Virginia) |
|
Germany (Frankfurt) |
|
Japan (Tokyo) |
|
Hong Kong (China) |
|
Request Parameters
Content-Type ·String · Header · RequiredRequest type: application/json.Authorization · String · Header · RequiredAPI key, in the format: Bearer $DASHSCOPE_API_KEY.model · String · Body · RequiredModel name. Supported values:decision-model: stable version. Model details.decision-model-preview: preview version.
String / Object / Array · Body · RequiredThe business state to make decisions on: ticket text, a conversation, or a structured object (objects are serialized before being sent to the model).The following image input parameters apply to the stable decision-model.image · Object · Body · OptionalSingle image used with the text in state for decisions. url is a publicly accessible image URL or a Base64 Data URL such as data:image/png;base64,... (use the MIME type of the image file).images · Array<Object> · Body · OptionalMultiple images, each using the same object format as image.At most 4 images per question and 16 images per request.Use HTTP for image input; client.decision.create in DashScope Python SDK 2.0.1 has no images parameter.questions · Object · Body · RequiredA map of questions. The key is a caller-defined question id; the value is a question object with the following fields.Question object properties
Question object properties
String · RequiredQuestion type:choice: single choicenoul: yes/noscore: ordinal scale
String · OptionalQuestion description or judgment criteria.criteria · Object / Array · Depends on typechoice: a map of option name → option description (1–255 items; providing all options and anotherfallback is recommended).noul: optional{"true":…, "false":…}descriptions.score: an array of level descriptions from low to high (2–255 levels; 3–7 clearly distinguishable levels recommended).
- Maximum 16 questions (latency grows near-linearly with the number of questions).
choiceoptions: ≤ 255.scorelevels: 2–255 (3–7 recommended).- Context:
decision-model: 268,288 tokens;decision-model-preview: 65,536 tokens; overlongstateis rejected.
Request Examples
- Python:DashScope SDK 2.0.1 or later。
- Java:DashScope SDK 2.23.3 or later。
- Image input example
- Ticket routing
- Yes/no decision
- Image URL(curl)
- Base64 image(Python)
Response Parameters
model ·StringModel name echoed back.request_id · StringRequest ID, for troubleshooting.answers · ObjectA map of answers. The key corresponds to the question id in the request; the value is an answer object with the following fields.Answer object properties
Answer object properties
StringMatches the question type (choice / noul / score).choice · StringFor choice: the selected option name.noul · FloatFor noul: P(yes), where 0 = no and 1 = yes.score · FloatFor score: the probability-weighted expectation of the level index, which can fall between two levels (e.g. 1.43).probabilities · ObjectThe probability of each option / level (sums to 1).confidence · FloatThe confidence of the answer (returned for choice / score).legend · ObjectFor score: a map of level index → level description.ObjectMetering information:input_tokens(Integer): number of input tokens.
FloatServer-side latency (milliseconds).