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 carriesprobabilityof yes.choice:choicesis 2 to 255{ value, description }options. The answer carrieschoiceandprobabilities.score:levelsis 2 to 10{ label, description }levels. The answer carriesscore(0 to 1) andprobabilitiesper level.
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 returns400 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.
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.
{ "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 thedecision_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.