POST /v1/decisions answers up to 16 typed questions about one input. Scope decisions.

Request

input is a string or a list of items (input_text, input_json). instructions is shared by all questions. Each question has a name, a type and instructions:
  • predicate: a yes or no question. The answer carries probability of yes.
  • choice: choices is 2 to 255 { value, description } options. The answer carries choice and probabilities.
  • score: levels is 2 to 10 { label, description } levels. The answer carries score (0 to 1) and probabilities per level.
Other fields: latency_budget_ms, allow_abstain, metadata. questions may also be an object keyed by question name.

Limits and latency

  • 1 to 16 questions per request.
  • Text input up to 4 KiB, counting the shared instructions. A larger input returns 400 input_too_large.
  • Each question’s own instructions plus its choice or level texts: up to 4 KiB (400 question_too_large).
  • Image inputs are not supported yet. An image part returns 400 image_not_supported.
Decisions run on our own scoring hardware. Expect about 5 s per 100 input tokens the first time an input is seen, plus 1 to 3 s per question. A 300-token input with 3 questions takes about 20 to 25 s. Questions about the same input share the work of reading it, so asking several questions in one request is faster than sending them one by one. If you leave out latency_budget_ms, it defaults to 5000 + 15 × input bytes + 3000 × questions milliseconds, kept between 10,000 and 120,000. Input bytes are the shared instructions plus the input text. Set latency_budget_ms yourself (1 to 120,000) to wait less; questions that miss the budget come back as refusal answers with reason: budget_exhausted. These limits are sized to the current scoring hardware. They will rise as that hardware grows.
A question that cannot be answered returns { "name", "type": "refusal", "reason" } with reason one of abstained, unavailable or budget_exhausted.

List

GET /v1/decisions returns the project’s decisions, newest first, in the usual page envelope: { "data": [Decision, …], "has_more", "next_cursor" }. limit is 1 to 100 (default 20); pass next_cursor as after for the next page. A key bound to an account sees only that account’s decisions. account_id narrows a project-wide key, and a bound key that names a different account gets 403 account_mismatch. Each item has the same shape as GET /v1/decisions/{id} returns.

Outcomes

PATCH /v1/decisions/{id} takes { "outcomes": { "<name>": { "status": "success|failure|error|skipped", "label"?, "detail"? } } }. Outcomes feed back into the decision backends.

Billing

Only answered questions count, as the decision_questions meter. Live keys pay $0.50 per 1,000 answered questions; test keys are not charged. See Pricing. The project needs a card on file first, sandbox included; without one the request answers 402 payment_method_required (see Billing). For the agent-facing feature, see Decisions and decision trees.