Evaluate decision models (TypeSafe-compatible)
Beta API. Choose telnyx/decision-flash for the lowest cost and latency, or telnyx/decision-pro for decisions that require long context, including inputs beyond Jev’s 32k per-decision limit. Omitted model defaults to telnyx/decision-flash.
Evaluate shared context using named choice, noul (yes/no), and score questions. Returns TypeSafe System One-compatible answer shapes, the selected public model alias, and token usage. See the decision model guide for examples and compatibility limits.
The supported request subset requires instructions for every question, string descriptions for criteria (or null for choice descriptions), 1–64 questions, and 2–64 options for choice and score questions. The model field accepts only telnyx/decision-flash or telnyx/decision-pro. Unsupported model values and unknown fields are rejected. The endpoint is synchronous and does not stream.
Use the TypeSafe Python SDK with base_url set to https://api.telnyx.com/v2/ai/typesafe and a Telnyx API key. The SDK appends /v1/systemone; explicitly set model to a supported Telnyx alias because its own default model is not supported. Compatibility covers this operation and the documented request subset; it does not include TypeSafe model listing. Scores describe relative preference, not calibrated correctness.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Decision Models beta request. Choose a public model alias; omitted model defaults to telnyx/decision-flash. Telnyx manages the underlying models behind these aliases.
Shared context evaluated by every question.
"Our production calls are failing. Every customer is affected."
Between 1 and 64 named questions. Each key identifies the corresponding answer.
Public model alias. telnyx/decision-flash offers the lowest cost and latency; telnyx/decision-pro supports decisions that require long context, including inputs beyond Jev’s 32k per-decision limit. Applies to every question in the request. Other values are rejected.
telnyx/decision-flash, telnyx/decision-pro "telnyx/decision-flash"
Response
All questions evaluated successfully. The response is a complete JSON object, not a stream.
A complete synchronous evaluation. Answers are returned directly without a data wrapper.
Public model alias used to evaluate the request. Returns telnyx/decision-flash when model was omitted. The underlying model is managed by Telnyx.
telnyx/decision-flash, telnyx/decision-pro "telnyx/decision-flash"
Answers keyed by exactly the question IDs in the request. Each answer type matches its question.
Token usage for the completed evaluation.