On this page
Inference
Decisions
Typed, probabilistic answers from a Decisions model: boolean, categorical, and ordered questions over one state document.
Instead of free-form text, a Decisions model answers structured questions — a probability, a category with confidence, or a position on an ordered scale. Send the material to evaluate as state, describe each question in questions, and read the answers back as numbers.
Endpoint
/v1/decisionsAPI key (JWT also resolves)Alias: /api/v1/decisions. Non-streaming: the response is one JSON body. Requests are billed from the model-reported input and output tokens at the model's prices, exactly like chat.
Use a catalog model backed by a Decisions-capable provider, for example jev-1.14. Call GET /v1/models to see what is currently available.
Request
curl -X POST https://api.relayrouter.org/v1/decisions \ -H "Authorization: Bearer $RELAY_API_KEY" \ -H 'content-type: application/json' \ -d '{ "model": "jev-1.14", "state": { "ticket": "My checkout page shows a blank screen after I click Pay.", "customer_tier": "enterprise" }, "questions": { "is_bug": { "type": "noul", "instructions": "Is the customer reporting a software defect?", "criteria": { "true": "The customer describes broken or unexpected behavior.", "false": "The customer is asking a question or requesting a feature." } }, "team": { "type": "choice", "instructions": "Which team should own this ticket?", "criteria": { "account": "Login, permissions, profile.", "frontend": "Rendering, layout, browser compatibility.", "payments": "Checkout, billing, payment processing." } }, "urgency": { "type": "score", "instructions": "How urgent is this ticket?", "criteria": ["Can wait", "Fix this week", "Blocking revenue"] } } }'Top-level fields
Question types
Only these three types
400 before the model is called. instructions is required and must not be blank.Response
{ "id": "gen-dec-...", "model": "jev-1.14", "provider": "relayrouter", "answers": { "is_bug": { "type": "noul", "noul": 0.96 }, "team": { "type": "choice", "choice": "payments", "confidence": 0.75, "probabilities": { "account": 0, "frontend": 0.16, "payments": 0.84 } }, "urgency": { "type": "score", "score": 1.99, "confidence": 0.99, "legend": { "0": "Can wait", "1": "Fix this week", "2": "Blocking revenue" }, "probabilities": { "0": 0, "1": 0.01, "2": 0.99 } } }, "usage": { "input_tokens": 476, "output_tokens": 70 }}modelis the public id andprovideris alwaysrelayrouter; internal serving details are never exposed.usage.input_tokens/output_tokensare model-reported and drive billing.confidence,probabilitiesandlegendare present onchoiceandscoreanswers.
Billing
A Decisions request costs the model's network fee plus input and output tokens at its prices, with the model's token multiplier and any account price override applied. The same balance, allowlist, quota and daily-cap gates as chat apply.
If the model has no capacity at that moment, the call fails with 503 model_busy and is not billed. Retry later.
Errors
No failover
See Errors for the shared error shapes and the SDK for typed helpers.