Make a decision
Send one typed question and receive a structured answer.
The fields, schemas, and errors below are generated from the gateway OpenAPI file. The API accepts one decision per request. Its response contains the resolved model, probabilities, routing action, and usage.
Numerical examples elsewhere in these docs are illustrative. A successful response is not evidence that your workflow is ready for automation.
The gateway also exposes the public OpenAPI document. This site includes a local snapshot so reference generation does not require an API connection.
POST /v1/decide
Choose one offered option
Complete formatted model input is limited to 2048 tokens; inference checks its exact tokenizer before encoding and never truncates (413). Body limit is 4 MB compressed and decompressed (413). JSON nesting is limited to 64 (400). Supports gzip, x-gzip and zstd, one layer only. Choice takes 2 to 255 options and score 2 to 10 levels (422 outside). Probabilities cover offered options only. probability is the chosen option's probability. The routing gate acts when probability >= threshold (default 0.9), otherwise asks a human. This configurable routing rule is not a certified precision guarantee. One question per request: send situation (text) or state (JSON), a question, a type and its options or levels. Unknown fields are rejected at every level. Requests that can never succeed are rejected before rate limiting and never get 429. Every response carries X-Request-Id; error bodies are {code, message} and never repeat request content.
Authentication: [{"ApiKey":[]}]
Request body (required)
application/json
schemaoneOf · ChoiceRequest
objectadditionalProperties: falsemodel required
stringpattern: "^ren-(?:\\d+\\.\\d+\\.\\d+|latest|preview)$"situation optional
Plain-text situation. Send exactly one of situation or state.
stringminLength: 1state optional
Structured situation as any non-null JSON value; a string must be nonblank. Send exactly one of situation or state.
schemaquestion required
The single question the model answers about the situation.
stringminLength: 1type required
stringconst: "choice"options required
arrayminItems: 2maxItems: 255Array items
objectadditionalProperties: falseid required
stringminLength: 1maxLength: 128description optional
stringthreshold optional
Routing threshold; defaults to 0.9 unless configured by the operator.
numberminimum: 0maximum: 1oneOf · variant 1
schemaoneOf · variant 2
schemaoneOf · ScoreRequest
Levels have unique numeric string IDs from 1 through 10, ordered strictly increasingly. At least two levels are required by the engine.
objectadditionalProperties: falsemodel required
stringpattern: "^ren-(?:\\d+\\.\\d+\\.\\d+|latest|preview)$"situation optional
Plain-text situation. Send exactly one of situation or state.
stringminLength: 1state optional
Structured situation as any non-null JSON value; a string must be nonblank. Send exactly one of situation or state.
schemaquestion required
The single question the model answers about the situation.
stringminLength: 1type required
stringconst: "score"levels required
arrayminItems: 2maxItems: 10Array items
objectadditionalProperties: falseid required
stringminLength: 1maxLength: 128description optional
stringthreshold optional
Routing threshold; defaults to 0.9 unless configured by the operator.
numberminimum: 0maximum: 1oneOf · variant 1
schemaoneOf · variant 2
schemaoneOf · NoulRequest
objectadditionalProperties: falsemodel required
stringpattern: "^ren-(?:\\d+\\.\\d+\\.\\d+|latest|preview)$"situation optional
Plain-text situation. Send exactly one of situation or state.
stringminLength: 1state optional
Structured situation as any non-null JSON value; a string must be nonblank. Send exactly one of situation or state.
schemaquestion required
The single question the model answers about the situation.
stringminLength: 1type required
stringconst: "noul"threshold optional
Routing threshold; defaults to 0.9 unless configured by the operator.
numberminimum: 0maximum: 1oneOf · variant 1
schemaoneOf · variant 2
schemaSchema illustration (replace placeholder values)
"string"Responses and error codes
200 Decision with typed fields, routing gate and exact input-token usage
X-Request-Id
Unique request ID; quote it when contacting support.
stringpattern: "^req_[0-9a-f]{32}$"X-RateLimit-Limit
Requests allowed in the current one-minute window by the tightest limit (key or account).
integerminimum: 1X-RateLimit-Remaining
Requests left in the current window by the tightest limit.
integerminimum: 0X-RateLimit-Reset
Seconds until the current window resets.
integerminimum: 0application/json
objectadditionalProperties: falseid required
stringmodel required
stringpattern: "^ren-\\d+\\.\\d+\\.\\d+$"choice required
stringprobabilities required
objectAdditional values
numberminimum: 0maximum: 1action required
stringenum: ["act","ask_human"]gate required
objectadditionalProperties: falsethreshold required
numberminimum: 0maximum: 1type required
stringenum: ["choice","score","noul"]threshold required
numberminimum: 0maximum: 1expected_score optional
numberminimum: 1maximum: 10probability required
Calibrated probability of the chosen option. The gate acts when probability >= threshold. For noul, the probability of true is probabilities.true.
numberminimum: 0maximum: 1usage required
objectadditionalProperties: falseinput_tokens required
integerminimum: 1maximum: 2048output_tokens required
integerconst: 0model required
stringpattern: "^ren-\\d+\\.\\d+\\.\\d+$"Schema illustration (replace placeholder values)
{
"id": "string",
"model": "string",
"choice": "string",
"probabilities": {},
"action": "act",
"gate": {
"threshold": 0
},
"type": "choice",
"threshold": 0,
"probability": 0,
"usage": {
"input_tokens": 1,
"output_tokens": 0,
"model": "string"
}
}400 Malformed JSON or compression, or JSON nested deeper than 64 levels; unknown model IDs return unknown_model and name ren-1.1.0, ren-latest, ren-preview
X-Request-Id
Unique request ID; quote it when contacting support.
stringpattern: "^req_[0-9a-f]{32}$"application/json
objectadditionalProperties: falsecode required
stringmessage required
stringSchema illustration (replace placeholder values)
{
"code": "string",
"message": "string"
}401 Invalid authentication
X-Request-Id
Unique request ID; quote it when contacting support.
stringpattern: "^req_[0-9a-f]{32}$"application/json
objectadditionalProperties: falsecode required
stringmessage required
stringSchema illustration (replace placeholder values)
{
"code": "string",
"message": "string"
}402 Insufficient organization credits when BILLING_ENFORCED is enabled. Charging is off by default.
X-Request-Id
Unique request ID; quote it when contacting support.
stringpattern: "^req_[0-9a-f]{32}$"application/json
objectadditionalProperties: falsecode required
stringmessage required
stringSchema illustration (replace placeholder values)
{
"code": "string",
"message": "string"
}413 Body over 4 MB or input over 2048 tokens; never truncated
X-Request-Id
Unique request ID; quote it when contacting support.
stringpattern: "^req_[0-9a-f]{32}$"application/json
objectadditionalProperties: falsecode required
stringmessage required
stringSchema illustration (replace placeholder values)
{
"code": "string",
"message": "string"
}415 Unsupported content type or content encoding
X-Request-Id
Unique request ID; quote it when contacting support.
stringpattern: "^req_[0-9a-f]{32}$"application/json
objectadditionalProperties: falsecode required
stringmessage required
stringSchema illustration (replace placeholder values)
{
"code": "string",
"message": "string"
}422 Request does not match the schema: unknown field, option or level count, or blank text
X-Request-Id
Unique request ID; quote it when contacting support.
stringpattern: "^req_[0-9a-f]{32}$"application/json
objectadditionalProperties: falsecode required
stringmessage required
stringSchema illustration (replace placeholder values)
{
"code": "string",
"message": "string"
}429 Rate limited; wait Retry-After seconds (retry-after-ms milliseconds). Only for requests that can succeed later
X-Request-Id
Unique request ID; quote it when contacting support.
stringpattern: "^req_[0-9a-f]{32}$"X-RateLimit-Limit
Requests allowed in the current one-minute window by the tightest limit (key or account).
integerminimum: 1X-RateLimit-Remaining
Requests left in the current window by the tightest limit.
integerminimum: 0X-RateLimit-Reset
Seconds until the current window resets.
integerminimum: 0Retry-After
Whole seconds to wait before retrying.
integerminimum: 1retry-after-ms
Milliseconds to wait before retrying.
integerminimum: 0application/json
objectadditionalProperties: falsecode required
stringmessage required
stringSchema illustration (replace placeholder values)
{
"code": "string",
"message": "string"
}502 Invalid inference response
X-Request-Id
Unique request ID; quote it when contacting support.
stringpattern: "^req_[0-9a-f]{32}$"application/json
objectadditionalProperties: falsecode required
stringmessage required
stringSchema illustration (replace placeholder values)
{
"code": "string",
"message": "string"
}503 Service unavailable
X-Request-Id
Unique request ID; quote it when contacting support.
stringpattern: "^req_[0-9a-f]{32}$"application/json
objectadditionalProperties: falsecode required
stringmessage required
stringSchema illustration (replace placeholder values)
{
"code": "string",
"message": "string"
}504 Inference timeout
X-Request-Id
Unique request ID; quote it when contacting support.
stringpattern: "^req_[0-9a-f]{32}$"application/json
objectadditionalProperties: falsecode required
stringmessage required
stringSchema illustration (replace placeholder values)
{
"code": "string",
"message": "string"
}529 Inference is overloaded; retry with backoff
X-Request-Id
Unique request ID; quote it when contacting support.
stringpattern: "^req_[0-9a-f]{32}$"application/json
objectadditionalProperties: falsecode required
stringmessage required
stringSchema illustration (replace placeholder values)
{
"code": "string",
"message": "string"
}