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

Interpret supplied input, then execute a model

Supply the complete aityx model and evidence. Valid explicit facts are preserved; OpenAI establishes unresolved fields and their confidence from the supplied data. Extracted values are checked against the schema before local evaluation. Missing required evidence fails instead of being guessed. No model is created and Jev is not called. Interpretation and execution settle one System Two charge using API input/output tokens. Provider usage is reported separately, not charged again.

POST/v1/systemtwo/decisions
Authorization
AuthorizationBearer token · headerrequired

Account API key

Request body
requiredapplication/json
decisionNativeModelrequired

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
stateStaterequired
Show properties
One of:
object
object
any[]
Array of any
any
string
string
Responses
200

Interpreted facts, answers, inline receipt and one settled System Two charge

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) or OpenAI observations (source=openai).

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[]
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[]
402

insufficient_balance; available funds cannot cover the request reservation

statusinteger
codestring
detailstring
errorsobject[]
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[]
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[]
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[]
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[]
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
curl -X POST 'https://api.aityx.ai/v1/systemtwo/decisions' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "decision": {
    "name": "string",
    "inputs": {},
    "decisions": {},
    "functions": {},
    "types": {}
  },
  "state": {}
}'
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": [
      {}
    ]
  }
}