Answer typed questions with a classifier
Answers typed questions about a text or JSON input with a classifier: a choice, a score or a yes/no, with probabilities. Bills input tokens only. Each answer carries its probabilities and a confidence; nothing is generated. Served by openrelay/laya; check a model's supported_apis on GET /v1/models for decisions. Online only: the Batch API does not accept /v1/decisions. Requires a funded balance. Any field this schema does not list is rejected with 400 unknown_field. stream is dropped: a decision is always a single JSON response. Limits: 1 to 64 questions per request, 10 MiB request body.
Required permission
Requires the inference.invoke permission. See Permissions for the roles and API key permissions that include it.
Command line
The orl CLI wraps this endpoint:
orl decisions create --model <model> --questions <questions> --state <state>apiKeyAuthorizationBearer <token>OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).
application/json- body
A typed-decision request: a state to decide about and a set of questions, each answered as a label or a score. stream is dropped; a decision is always a single JSON response. Any field this schema does not list is rejected by the gateway with 400 unknown_field.
model*stringopenrelay/laya.
state*||array<unknown>The input to decide about. Objects and arrays are serialized to JSON text before the model reads them.
questions*Question id to question ({type, instructions, criteria}). Between 1 and 64 questions.
[key: string]?anyOK
application/json- response
A decisions response (opaque; additionalProperties carries the rest of the dialect).
model?stringThe public model id requested.
answers?routing?usage?openrelay?What the request is billed, on every online inference response.
[key: string]?anycurl -X POST 'https://inference.openrelay.inc/v1/decisions' \ -H 'Content-Type: application/json' \ -d '{ "model": "string", "state": "string", "questions": { "property1": {}, "property2": {} }}'{ "model": "string", "answers": { "property1": {}, "property2": {} }, "routing": {}, "usage": {}, "openrelay": { "cost_nano_usd": 0, "priced_at": "string" }}Overview
Answer typed questions about an input (a choice, a score or a yes/no) with a classifier instead of a generator, online only and billed per input token. Served by the inference endpoint (inference.openrelay.inc).
Overview
Batch inference jobs: submit a JSONL file of requests, poll status, and download results. A batch has 24 hours to finish; standard batches bill at a discount. Served by the inference endpoint (inference.openrelay.inc). Batch access is enabled per organization; without it these endpoints return 404.