Call POST /compatible-mode/v1/systemone to use the Bailian 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 more information, see Configure an 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.
Replace {WorkspaceId} with your workspace ID. See Regions and endpoints.
Region | Endpoint |
|---|---|
Singapore |
|
China (Beijing) |
|
Request ParametersContent-Type · Request type: Authorization · API key, in the format: model · Model name: state · The business state to make decisions on: ticket text, a conversation, or a structured object (objects are serialized before being sent to the model). questions · A map of questions. The key is a caller-defined question id; the value is a question object with the following fields. questions properties type · Question type:
instructions · Question description or judgment criteria. criteria ·
| Request ExamplesThe Python examples use the TypeSafe SDK ( Ticket routingA single request handles three decisions at once: team assignment ( Yes/no decisionA |
Response Parametersmodel · Model name echoed back. request_id · Request ID, for troubleshooting. answers · A map of answers. The key corresponds to the question id in the request; the value is an answer object with the following fields. answers properties type · Matches the question type ( choice · For noul · For score · For probabilities · The probability of each option / level (sums to 1). confidence · The confidence of the answer (returned for legend · For usage · Metering information:
latency_ms · Server-side latency (milliseconds). | Response ExampleThe following is the response for the ticket routing example (abbreviated). Probabilities and confidence depend on the actual result. |
Error Codes
If the call fails, an error message is returned. For more error codes and solutions, see Error messages.