Voice AI agents and production automations spend most of their decision-making on small structured calls: route this ticket, flag this incident, score this urgency. Telnyx Inference now offers Decision Models (Beta), a TypeSafe-compatible endpoint that returns those decisions as typed answers in a single request.
POST /v2/ai/typesafe/v1/systemone evaluates shared context against up to 64 named questions and returns typed answers. It supports a subset of the TypeSafe System One API request format and preserves its typed answer shapes.choice selects a category from 2 to 64 options, noul evaluates a yes/no condition, and score rates input on an ordered rubric. A single request can combine all three.https://api.telnyx.com/v2/ai/typesafe and existing system_one() calls in the supported subset keep the same method and answer accessors with a Telnyx API key.Routing, flagging, and scoring are the most common judgment calls in production software, and teams usually build them by hand: prompt, parse, retry, repeat. Decision Models (Beta) returns typed answers with relative scores and confidence in one structured response, so application logic reads a field instead of parsing free text; scores are relative preferences across the supplied choices, not calibrated probabilities, so review thresholds need tuning against real examples. TypeSafe compatibility means teams on the TypeSafe System One API can migrate requests in the supported subset by pointing the SDK at Telnyx. Agents and automations make many small decisions per run, and this is the API surface for them, tuned for cost and latency as beta continues.
curl --fail-with-body --max-time 100 \ 'https://api.telnyx.com/v2/ai/typesafe/v1/systemone' \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H 'Content-Type: application/json' \ --data '{ "state": "Our production calls are failing. Every customer is affected.", "questions": { "team": { "type": "choice", "instructions": "Choose the team that should handle this incident.", "criteria": { "billing": "Payments and refunds", "technical_support": "Service faults and technical problems", "sales": "New purchases" } }, "production_incident": { "type": "noul", "instructions": "Does the message describe an active production incident?" }, "urgency": { "type": "score", "instructions": "Rate operational urgency.", "criteria": ["Low", "Normal", "High", "Critical"] } } }'
The response returns model, answers, and usage at the top level. Abbreviated sample:
{ "model": "telnyx-managed", "answers": { "team": {"type": "choice", "choice": "technical_support", "confidence": 0.982}, "production_incident": {"type": "noul", "noul": 0.999}, "urgency": {"type": "score", "score": 2.997, "legend": {"0": "Low", "1": "Normal", "2": "High", "3": "Critical"}} }, "usage": {"input_tokens": 267, "output_tokens": 4} }
Values vary per request. See the docs for the full response schema.
Learn more in the Decision Models (Beta) docs or the API reference.