---
title: Decision Models API for AI Agents | Telnyx
canonical: https://telnyx.com/products/decision-models
---
# Decision Models API for AI Agents | Telnyx

**TELNYX DECISION MODELS (BETA)**

# Decision Models for AI agents

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.

[Start building](https://telnyx.com/sign-up)[Try the playground](https://portal.telnyx.com/#/ai/inference/decision-models)

## $0.035per 1M input tokens on Flash

## $0for output tokens on Flash and Pro

## 64typed questions per request

USE CASES

## Built for the decisions agents make on every run.

* ### Voice AI branching  
Score a live transcript for a refund request or a reported fault, then branch the call on the number.
* ### Support triage  
Pick the owning team, flag production incidents, and rate urgency in a single request.
* ### On-call escalation  
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

### Open-ended work

* Writing replies, summaries, and reports
* Tool calls with open-ended parameters
* Multi-step reasoning and planning
* Choices you can't list in advance

Send to Decision Models

### Bounded decisions

* Routing to a known team, queue, or agent
* Yes/no gates such as refund or incident checks
* Urgency and quality ratings on a fixed scale
* Intent classification across up to 64 options

QUESTION TYPES

## Three question types, one shared state.

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.

HOW IT WORKS

## One request. Typed answers back.

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)
```

Try it with cURLPort an existing TypeSafe integration

PRICING

## Two models, priced per input token.

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.

PRODUCTS

## One API key. Every primitive your agent needs.

* [![Voice-AI-Agents_Hero](https://d2efw2akbx8gaf.cloudfront.net/https://dotcom-payload-assets-prod.s3.us-east-1.amazonaws.com/cms-media/Voice-AI-Agents_Hero_16x9%402x.webp?width=1024&format=webp)Voice AI AgentsProgrammable voice agents for inbound and outbound calls. Branch the conversation on a decision call mid-call.](https://telnyx.com/products/voice-ai-agents)
* [![inference](https://d2efw2akbx8gaf.cloudfront.net/https://dotcom-payload-assets-prod.s3.us-east-1.amazonaws.com/cms-media/ab-prod-02-inference.png?width=2000&format=webp)InferenceOpen-weight and frontier models on edge-deployed GPUs, on the same API key as Decision Models.](https://telnyx.com/products/inference)
* [![Text-to-Speech — one API for leading voice engines](https://d2efw2akbx8gaf.cloudfront.net/https://dotcom-payload-assets-prod.s3.us-east-1.amazonaws.com/cms-media/Voice-API_Feature_Text-to-speech_16x9%402x.webp?width=1696&format=webp)Text-to-SpeechHosted voices from Telnyx and third-party providers for your agent's speech.](https://telnyx.com/products/text-to-speech-api)
* [![Real-time speech-to-text transcription](https://d2efw2akbx8gaf.cloudfront.net/https://dotcom-payload-assets-prod.s3.us-east-1.amazonaws.com/cms-media/stt-hero.png?width=833&format=webp)Speech-to-TextReal-time and batch transcription. Feed the transcript straight into a decision request.](https://telnyx.com/products/speech-to-text-api)

## Get a Telnyx API key and send your first decision.

Sign up, grab your key, and run the cURL example above. Decision Models is in beta.

[Get started](https://telnyx.com/sign-up)[Read the docs](https://developers.telnyx.com/docs/inference/decision-models)

## Get a Telnyx API key and send your first decision.

Sign up, grab your key, and run the cURL example above. Decision Models is in beta.

[Get started](https://telnyx.com/sign-up)[Read the docs](https://developers.telnyx.com/docs/inference/decision-models)

## FAQ

### What are decision models?

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.

### How is this different from prompting an LLM?

### Is it compatible with TypeSafe's System One API?

### Should I use Flash or Pro?

### How much does it cost?

### How does pricing compare to Jev?

### What are the limits?

### Are the scores calibrated probabilities?

[Start building](https://telnyx.com/sign-up)