Structured decisions
/model/v1/systemone● SupportedRequest body
modelstringrequiredPublished model id from model.models.list with supported_apis containing typesafe.systemone; returned unchanged in the response.
statestring | object | arrayrequiredShared content evaluated by every question, supplied as text, a JSON object or an array.
questionsobjectrequired◐ Partially supportedNon-empty map of caller-chosen question ids to typed questions; answers preserve these ids. noul evaluates yes/no, choice selects a named option, score rates ordered levels. box is unsupported.
noul
assetsobjectoptional○ UnsupportedUnsupported image assets. Supplying this field, including null or an empty collection, returns 400: images are not supported.
Supplying assets returns 400 because images are not supported.
Returns
200
Platform errors (auth, rate limits, validation) and OCR errors use problem+json; other model call errors follow the endpoint's own format (OpenAI or Anthropic) — see error codes
Request
curl
curl https://api.deepraxis.com/model/v1/systemone \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"jev-1.13","state":{"subject":"Charged twice","message":"My card was charged twice for the annual plan. Please refund the extra charge today."},"questions":{"team":{"type":"choice","instructions":"Which team should handle this ticket","criteria":{"billing":"Charges, invoices, refunds","technical":"Errors, outages, broken features","other":"None of these"}},"urgency":{"type":"score","instructions":"How urgent the request is","criteria":["No time pressure","Wants action soon","Wants action today"]},"refund":{"type":"noul","instructions":"The customer is asking for money back"}}}'Python
import requests
opts = dict(
base_url="https://api.deepraxis.com/model/v1",
api_key="$PRAXIS_API_KEY",
)
resp = requests.post(
f"{opts['base_url']}/systemone",
headers={"Authorization": f"Bearer {opts['api_key']}"},
json={
"model": "jev-1.13",
"state": {"subject": "Charged twice", "message": "My card was charged twice for the annual plan. Please refund the extra charge today."},
"questions": {
"team": {"type": "choice", "instructions": "Which team should handle this ticket", "criteria": {"billing": "Charges, invoices, refunds", "technical": "Errors, outages, broken features", "other": "None of these"}},
"urgency": {"type": "score", "instructions": "How urgent the request is", "criteria": ["No time pressure", "Wants action soon", "Wants action today"]},
"refund": {"type": "noul", "instructions": "The customer is asking for money back"},
},
},
)
answers = resp.json()["answers"]
print(answers["team"]["choice"], answers["refund"]["noul"])TypeScript
const opts = {
baseURL: "https://api.deepraxis.com/model/v1",
apiKey: "$PRAXIS_API_KEY",
};
const resp = await fetch(`${opts.baseURL}/systemone`, {
method: "POST",
headers: { Authorization: `Bearer ${opts.apiKey}`, "Content-Type": "application/json" },
body: JSON.stringify({
model: "jev-1.13",
state: { subject: "Charged twice", message: "My card was charged twice for the annual plan. Please refund the extra charge today." },
questions: {
team: { type: "choice", instructions: "Which team should handle this ticket", criteria: { billing: "Charges, invoices, refunds", technical: "Errors, outages, broken features", other: "None of these" } },
urgency: { type: "score", instructions: "How urgent the request is", criteria: ["No time pressure", "Wants action soon", "Wants action today"] },
refund: { type: "noul", instructions: "The customer is asking for money back" },
},
}),
});
const { answers } = await resp.json();
console.log(answers.team.choice, answers.refund.noul);Response 200
{
"model": "jev-1.13",
"answers": {
"refund": {
"noul": 0.99,
"type": "noul"
},
"team": {
"choice": "billing",
"confidence": 1,
"probabilities": {
"billing": 1,
"other": 0,
"technical": 0
},
"type": "choice"
},
"urgency": {
"confidence": 1,
"legend": {
"0": "No time pressure",
"1": "Wants action soon",
"2": "Wants action today"
},
"probabilities": {
"0": 0,
"1": 0,
"2": 1
},
"score": 2,
"type": "score"
}
},
"usage": {
"input_tokens": 422,
"output_tokens": 69,
"cost": 0.000018
}
}Response
HTTP 200
Typed answers keyed by the original question ids, token usage, and the actual customer charge in USD.
application/json
| Name | Type | Description |
|---|---|---|
| model | string | Model id exactly as supplied in the request, including any public alias or creator prefix. |
| answers | object | Results mapped by the caller's question ids; each discriminator matches that question's type. |
| usage | object | Provider token counts and the actual input-only customer charge; output tokens are free. |
| usage.input_tokens | integer | Authoritative upstream count of input tokens; the sole billed quantity for this operation. |
| usage.output_tokens | integer | Upstream count of output tokens, returned for visibility and never charged. |
| usage.cost | number | Actual customer charge in USD after micro-dollar rounding; exactly the value in X-Praxis-Cost-Usd, never upstream procurement cost. |