Skip to content
aityx
Esc
↑↓navigate↵open⌘Jpreview

Execute matching facts or Jev questions

A complete aityx model and matching state executes locally; no provider is called. Input schema errors return 422; there is no automatic interpretation fallback. Send decision + state for native execution. Jev’s model is an inference alias, never a native definition. Flat model? + questions + state is forwarded to Jev, without creating an aityx decision. Add decision to that payload to chain both. With both, Jev runs first. Model inputs may bind any response field with from=“jev:<JSON Pointer>” (e.g. jev:/answers/category/confidence); jev: binds the full response. Bound values are validated natively; required missing values fail without falling back to caller data. Named Jev answers override overlapping original input fields; the combined facts must satisfy the aityx schema. Noul becomes a number in [0,1], choice a string and score a number, without thresholding or rounding. After successful Jev execution, a model failure returns HTTP 200 with decision_error and Jev answers. Successful execution has no decision_error. That completed Jev execution is charged at execution prices. Upstream Jev failure does not run aityx. All responses are synchronous. Jev latency is separate from local evaluation.

POST/v1/systemone
Authorization
AuthorizationBearer token · headerrequired

Account API key

Request body
requiredapplication/json
decisionNativeModel

Complete native decision definition. Answer names and types are inferred locally from its decisions; no questions or output metadata is required.

Show properties
namestringrequired
inputsobjectrequired

Inputs declare native types. In combined execution, from="jev:<JSON Pointer>" binds a field or complete answer from the original Jev result. Objects and lists support typed records or Any.

decisionsobjectrequired
functionsobject
typesobject
modelstring

Jev inference alias; requires questions and defaults to server configuration

min length 1
questionsJevQuestions
stateStaterequired

Shared state. Must match the native schema for local-only execution. Jev receives the same data; its answers override overlapping facts.

Show properties
One of:
object
object
any[]
Array of any
any
string
string
Any of:
any
any
any
any
Responses
200

Answers, execution trace and input/output token counts; decision_error only if the native decision failed after Jev completed

answersobjectrequired

Named Jev and native outputs. Native decisions own overlapping names; original Jev facts remain in the input trace.

receiptReceiptrequired

Computed values and input provenance without repeating supplied state. Not persisted.

Show properties
readobject

Jev scalar facts and bound response data (source=jev with optional from pointer).

provenanceobject
decisionsobject
functionsobject
usageUsagerequired
Show properties
input_tokensintegerrequired
min 0
output_tokensintegerrequired
min 0
decision_errorDecisionError
Show properties
codestringrequired
detailstringrequired
errorsobject[]
400

Request failed; no completed operation charge is settled. Completed Jev with model failure uses the HTTP 200 partial response instead.

statusinteger
codestring
detailstring
errorsobject[]
request_idstring<uuid>

Same value as the X-Request-Id response header; quote it when reporting a problem.

401

Request failed; no completed operation charge is settled. Completed Jev with model failure uses the HTTP 200 partial response instead.

statusinteger
codestring
detailstring
errorsobject[]
request_idstring<uuid>

Same value as the X-Request-Id response header; quote it when reporting a problem.

402

insufficient_balance; available funds cannot cover the request reservation

statusinteger
codestring
detailstring
errorsobject[]
request_idstring<uuid>

Same value as the X-Request-Id response header; quote it when reporting a problem.

403

Request failed; no completed operation charge is settled. Completed Jev with model failure uses the HTTP 200 partial response instead.

statusinteger
codestring
detailstring
errorsobject[]
request_idstring<uuid>

Same value as the X-Request-Id response header; quote it when reporting a problem.

422

Request failed; no completed operation charge is settled. Completed Jev with model failure uses the HTTP 200 partial response instead.

statusinteger
codestring
detailstring
errorsobject[]
request_idstring<uuid>

Same value as the X-Request-Id response header; quote it when reporting a problem.

502

Request failed; no completed operation charge is settled. Completed Jev with model failure uses the HTTP 200 partial response instead.

statusinteger
codestring
detailstring
errorsobject[]
request_idstring<uuid>

Same value as the X-Request-Id response header; quote it when reporting a problem.

503

Request failed; no completed operation charge is settled. Completed Jev with model failure uses the HTTP 200 partial response instead.

statusinteger
codestring
detailstring
errorsobject[]
request_idstring<uuid>

Same value as the X-Request-Id response header; quote it when reporting a problem.

504

Request failed; no completed operation charge is settled. Completed Jev with model failure uses the HTTP 200 partial response instead.

statusinteger
codestring
detailstring
errorsobject[]
request_idstring<uuid>

Same value as the X-Request-Id response header; quote it when reporting a problem.

Request
curl -X POST 'https://api.aityx.ai/v1/systemone' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "decision": {
    "name": "Approval",
    "inputs": {
      "amount": {
        "type": "number",
        "desc": "Purchase amount"
      }
    },
    "decisions": {
      "approved": {
        "type": "boolean",
        "desc": "Approve purchase",
        "expr": "amount >= 40"
      }
    }
  },
  "state": {
    "amount": 100
  }
}'
Response
{
  "answers": {},
  "receipt": {
    "read": {},
    "provenance": {
      "property1": "state",
      "property2": "state"
    },
    "decisions": {},
    "functions": {}
  },
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0
  },
  "decision_error": {
    "code": "string",
    "detail": "string",
    "errors": [
      {}
    ]
  }
}