Decisions
Get typed answers about a state, in the System One or OpenAI decisions contract.
A decision is a typed answer, not free text: you send a state and a set of questions, and the model returns one answer per question with probabilities and a confidence. Use it where you would otherwise prompt a chat model and parse its reply, such as routing tickets or grading severity. Call POST https://gateway.respan.ai/api/v1/systemone (System One contract) or POST https://gateway.respan.ai/openai/v1/decisions (OpenAI’s contract); see All API formats.
Quickstart
curl https://gateway.respan.ai/api/v1/systemone \
-H "Authorization: Bearer $RESPAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "span-02",
"state": "My package arrived damaged. I want a refund now.",
"questions": {
"department": {
"type": "choice",
"instructions": "Which team should handle this ticket?",
"criteria": { "returns": "Wrong or damaged items", "billing": "Charges and invoices" }
}
}
}'Respan parameters work here as on chat: see Respan parameters.
Models and providers
The model’s catalog entry decides who answers. System One models are served by TypeSafe, OpenRouter and EmpirioLabs. OpenAI decisions models are served by OpenAI and Azure OpenAI. Either contract’s client is served by either contract’s provider, so you call every model the same way.
To pick a model, filter by output type decisions on the model catalog , or read Span-02 and Models.
Decisions are not redacted, so an organization with PII redaction on is refused.
Contracts
| Contract | Endpoint | Body |
|---|---|---|
| System One | POST https://gateway.respan.ai/api/v1/systemone | state and questions keyed by your own ids. |
| OpenAI decisions | POST https://gateway.respan.ai/openai/v1/decisions | input as the evidence and an ordered list of questions. |
The System One contract is also served at /api/systemone and /api/alpha/decisions, so a System One client works by changing its base URL. A decision is answered whole: stream is refused with 400.
Questions and answers
Each question has a type and instructions. The types are choice (pick one of its criteria), noul (a yes/no probability), score and number. The state can be text or any JSON.
A System One response is {"model", "answers", "usage"}, with each answer under its question’s id. In OpenAI’s contract, the answers come back in the order of the questions. Question types shows a full request and response for each type.
Pricing and logs
- Each decision is one trace with one
chatrow (io_formattypesafe): the questions as the system turn, the state (or OpenAI’sinput) as the user turn, and the answers as the reply. - It is priced on the model’s catalog entry from the tokens the answer reports. See the model catalog for each model’s price.
- Your key’s TPM limit applies, with no completion tokens reserved.