Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Decision Models beta request. Choose a public model alias; omitted model defaults to telnyx/decision-flash. Telnyx manages the underlying models behind these aliases.

state
required

Shared context evaluated by every question.

Example:

"Our production calls are failing. Every customer is affected."

questions
object
required

Between 1 and 64 named questions. Each key identifies the corresponding answer.

model
enum<string>
default:telnyx/decision-flash

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.

Available options:
telnyx/decision-flash,
telnyx/decision-pro
Example:

"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.

model
enum<string>
required
read-only

Public model alias used to evaluate the request. Returns telnyx/decision-flash when model was omitted. The underlying model is managed by Telnyx.

Available options:
telnyx/decision-flash,
telnyx/decision-pro
Example:

"telnyx/decision-flash"

answers
object
required

Answers keyed by exactly the question IDs in the request. Each answer type matches its question.

usage
object
required

Token usage for the completed evaluation.