Send shared context and up to 64 typed questions in one request. Get back a choice, a yes/no score, or a rating for each one, and branch in code on the answer. Works with the TypeSafe SDK.


Score a live transcript for a refund request or a reported fault, then branch the call on the number.

Pick the owning team, flag production incidents, and rate urgency in a single request.

Rate urgency on an ordered rubric and page on-call when the score crosses your threshold.
WHERE DECISION MODELS FIT
Keep your LLM for work that produces text. Send the bounded judgment calls to a decision model and branch in code on a typed answer.
Keep on your LLM
Send to Decision Models
Every question needs a type and instructions. State and instructions accept strings, JSON objects, or arrays. Inputs are text only.
state: one shared context
Send the transcript, the message, or the incident report once. Every question in the request evaluates against the same state.
choice: pick from options
Route a ticket, classify intent, select a category. 2 to 64 options, with probabilities on every option and a confidence score on the answer.
noul: answer yes or no
Is this a refund request? Is this an active production incident? Returns a 0 to 1 score for the positive outcome. Ask separate noul questions when several conditions can be true at once.
score: rate on a scale
Rate urgency on an ordered rubric of 2 to 64 levels. The score is the expected zero-based index, fractional values included, with a legend and per-level probabilities.
Pick a model, send shared state and named questions, and read typed answers from the response. Existing TypeSafe SDK code needs the Telnyx base URL and a Telnyx model alias.
Try it with cURL
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 '{
"model": "telnyx/decision-flash",
"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"]
}
}
}'Port an existing TypeSafe integration
import os
from typesafe_sdk import Choice, Noul, Score, TypeSafeClient
with TypeSafeClient(
api_key=os.environ["TELNYX_API_KEY"],
base_url="https://api.telnyx.com/v2/ai/typesafe",
timeout=100,
) as client:
result = client.system_one(
model="telnyx/decision-flash",
state="Our production calls are failing. Every customer is affected.",
questions={
"team": 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": Noul(
instructions="Does the message describe an active production incident?",
),
"urgency": Score(
instructions="Rate operational urgency.",
criteria=["Low", "Normal", "High", "Critical"],
),
},
)
print(result.choices["team"].choice)
print(result.nouls["production_incident"].noul)
print(result.scores["urgency"].score)Set model to telnyx/decision-flash or telnyx/decision-pro on each request. Requests without a model use Flash. Beta pricing can change.
Flash: $0.035 per 1M input tokens
The default model. Lowest cost and latency for high-volume routing, triage, and intent classification. Output tokens are free, and cached input is billed at the same rate.
Pro: $0.20 per 1M input tokens
For decisions that need long context. Keep a full support history, a policy and its amendments, or a long transcript in one request, past Jev's 32k-token per-decision limit. Output tokens are free.

Programmable voice agents for inbound and outbound calls. Branch the conversation on a decision call mid-call.

Open-weight and frontier models on edge-deployed GPUs, on the same API key as Decision Models.

Hosted voices from Telnyx and third-party providers for your agent's speech.

Real-time and batch transcription. Feed the transcript straight into a decision request.
Sign up, grab your key, and run the cURL example above. Decision Models is in beta.
Sign up, grab your key, and run the cURL example above. Decision Models is in beta.
A decision model answers typed questions about a piece of context instead of generating text. Telnyx Decision Models evaluates shared state against choice, noul, and score questions and returns every answer in one JSON response, with probabilities for each option.