Solar Decide is in beta. The /v1/systemone schema may change before general availability.
Send a state along with one or more typed questions, and Solar Decide returns a decision for each. Because the model writes no prose, every question is answered in a single forward pass and output tokens are not billed.
# pip install requestsimport requestsresponse = requests.post( "https://api.upstage.ai/v1/systemone", headers={"Authorization": "Bearer UPSTAGE_API_KEY"}, json={ "model": "solar-decide", "state": ( "Customer ticket #4821: My package never arrived and I want my money back. " "I have been waiting three weeks and nobody has replied to my emails." ), "questions": { "intent": { "type": "choice", "instructions": "Classify what the customer is asking for.", "criteria": { "refund": "The customer wants money back.", "track": "The customer wants the delivery status of an order.", "other": "Anything else.", }, }, "urgency": { "type": "score", "instructions": "Rate how urgently this ticket needs a reply.", "criteria": [ "No action needed", "Can wait a week", "Needs attention today", "Escalate immediately", ], }, "is_angry": { "type": "noul", "instructions": "Is the customer angry?", }, }, },)answers = response.json()["answers"]print(answers["intent"]["choice"], answers["intent"]["confidence"])print(answers["urgency"]["score"])print(answers["is_angry"]["noul"])
A choice question takes 2 to 26 options. This endpoint reads the decision from the logits of single-token labels A through Z, so 26 is the number of options it can score in one pass. To decide among more, split the decision into several questions or narrow the candidates before the call.
Sending more returns 422:
{ "error": { "type": "validation_failed", "message": "question q: 27 candidates exceed the 26 single-token labels this route supports" }}
The name of the model used to make the decisions. Currently, the only available model is 'solar-decide'.
Value in: "solar-decide"
state
Required
unknown
The context the questions are answered against. Pass a string, or any JSON value that is serialized into the prompt. With a 512K context window, an entire document can serve as the state.
questions
Required
object
The questions to answer, keyed by a name you choose. The same names are used as the keys of the 'answers' object in the response. At least one question is required.