Skip to main content
POST
Decisions

Overview

The /v1/scaledown endpoint mirrors TypeSafe’s Jev Decisions API request/response shape. You send a state object plus a questions map, and get back one typed answer per question. choice, noul, and score questions are all answered using the same calibrated scoring /classify uses.

Request

string
default:"classify-1"
Optional. The only supported value is "classify-1", which is also the default when omitted. Any other value is rejected with 422.
object
required
The item being decided on.
object
required
A map of question name → question definition. Must contain at least one entry. Every question is answered against the same state, concurrently.

Response

string
Always "classify-1".
object
Map of question name → typed answer, matching the questions keys from the request.
object
Token usage and cost, summed across every internal call the request fanned out to (one per question, regardless of type).

How score is calculated

A score question is answered with the same constrained, calibrated decode choice uses - one model call scores every level in criteria, producing a probability distribution over them (probabilities). That distribution is then reduced to a single continuous score value: the probability-weighted expected value across level indices. For example, given criteria with 3 levels (indices 0, 1, 2) and probabilities: {"0": 0.0, "1": 0.57, "2": 0.43}:
score is therefore a continuous position on the scale, not necessarily a whole level - a value near 1.43 says the model leans toward level 2 but isn’t fully decided between levels 1 and 2. Use probabilities (or confidence, the top level’s own probability) if you need the calibration behind that number instead of just the point estimate.

Error responses

Authentication

Include your API key in every request using the x-api-key header.

Examples

Single choice question

Response:

Mixed choice + noul questions

choice and noul questions can be combined in one request. Both are answered concurrently against the same state.
Response:

A score question

Use score for an ordered-scale rating, like severity or quality. criteria is an ordered array, not a map - level 0 is the first item, level 1 the second, and so on.
Response:
score: 1.43 (0×0.0 + 1×0.57 + 2×0.43) says the model leans toward “blocking issue” (level 2) but isn’t fully decided between that and “broken or degraded” (level 1).

Mixing all three question types

choice, noul, and score questions can all appear in the same request. Every question is answered concurrently against the same state, and usage sums across all of them.
Response:

Notes

  • "classify-1" is the only supported model. Omit it (defaults to "classify-1") or pass it explicitly - any other value is rejected with 422.
  • Every question in a request - choice, noul, or score - is one separate calibrated model call, run concurrently. usage is the sum across all of them - a request with a choice, a noul, and a score question makes 3 calls and bills for all 3.
  • score’s criteria is an ordered array (2-10 levels), unlike choice’s unordered {key: description} map - the array position is the level index.
  • No reasoning field exists on this endpoint - it never generates a free-form explanation, unlike /classify with reasoning: true.
  • No batching - each request evaluates one state. To classify many items, use /classify’s chunks array instead.
  • See Differences from Jev for the full compatibility matrix.

Authorizations

x-api-key
string
header
required

Body

application/json
state
object
required

The item being decided on. Provide text, document, or both.

questions
object
required

Map of question name to question definition. Must contain at least one entry.

model
enum<string>
default:classify-1

Optional. "classify-1" is the only supported value and also the default when omitted. Any other value returns 422.

Available options:
classify-1

Response

Successful decision

model
string

Always "classify-1".

answers
object

Map of question name to typed answer, matching the questions keys from the request.

usage
object

Token usage and cost, summed across every internal call the request fanned out to.