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

Execute questions or a portable model

Questions + state generates a model or reuses the account’s disposable questions cache. Every such call uses System Two pricing, including cache hits with no provider call. State is never part of the model-cache key and answers are fresh. A complete model + matching JSON state executes deterministically at System One rates. Required values that cannot be established from evidence produce an error. Execution succeeds synchronously; returned decision data belongs to the client.

POST/v1/systemone
Authorization
AuthorizationBearer token · headerrequired

Account API key

Request body
requiredapplication/json
stateStaterequired

JSON evidence or a text string. JSON matching the input schema needs no LLM.

Show properties
One of:
object
object
any[]
Array of any
any
string
string
questionsQuestions
modelPortableModel | string
Show properties
One of:
PortableModel
contentDefinitionrequired
Show properties
namestringrequired
inputsobjectrequired
decisionsobjectrequired
functionsobject
questionsQuestionsrequired
string
string
contentDefinition

Alternative to portable model; requires outer questions and no model field.

Show properties
namestringrequired
inputsobjectrequired
decisionsobjectrequired
functionsobject
modestring
default: "fast"
Allowed:fastthinking
Any of:
any
any
any
any
Responses
200

Portable model, fresh answers, inline receipt and settled billing

modelPortableModelrequired
Show properties
contentDefinitionrequired
Show properties
namestringrequired
inputsobjectrequired
decisionsobjectrequired
functionsobject
questionsQuestionsrequired
inputobjectrequired

Derived JSON Schema

answersobjectrequired

Distributions shaped to the question types

receiptReceiptrequired

Inline execution evidence. Download it locally to keep it; server never stores it.

Show properties
receiptstring
modelstring

Display name of the model

givenobject

Values supplied directly by caller; no inference

readobject

Extracted observations and confidence

decisionsobject

Evaluated values

answersobject
stateobject

Input provenance metadata

latency_msinteger
billingBilling

Settled charge deducted from account balance. Questions and authoring use API input/output tokens at System Two rates, independent of provider work or cache hits. Submitted model executions use API input tokens at System One rates (output free by default). Extraction uses actual provider tokens at System Two rates. API response accounting metadata (usage, billing) is excluded from token counting.

Show properties
currencystring
estimatedboolean
cost_usdnumber
balanceBalance
itemsobject[]
cache_hitbooleanrequired

Questions reused a disposable model cache; still priced as System Two

provider_usageUsagerequired

Actual provider tokens; zero when no LLM ran

Show properties
input_tokensintegerrequired
min 0
output_tokensintegerrequired
min 0
usageUsagerequired
Show properties
input_tokensintegerrequired
min 0
output_tokensintegerrequired
min 0
billingBillingrequired

Settled charge deducted from account balance. Questions and authoring use API input/output tokens at System Two rates, independent of provider work or cache hits. Submitted model executions use API input tokens at System One rates (output free by default). Extraction uses actual provider tokens at System Two rates. API response accounting metadata (usage, billing) is excluded from token counting.

Show properties
currencystring
estimatedboolean
cost_usdnumber
balanceBalance
Show properties
currencystring
balance_usdnumber
reserved_usdnumber
available_usdnumber
itemsobject[]
400

Request failed; no successful execution charge is settled

typestring
titlestring
statusinteger
codestring
detailstring
errorsobject[]
401

Request failed; no successful execution charge is settled

typestring
titlestring
statusinteger
codestring
detailstring
errorsobject[]
402

insufficient_balance; available funds cannot cover the request reservation

typestring
titlestring
statusinteger
codestring
detailstring
errorsobject[]
403

Request failed; no successful execution charge is settled

typestring
titlestring
statusinteger
codestring
detailstring
errorsobject[]
422

Request failed; no successful execution charge is settled

typestring
titlestring
statusinteger
codestring
detailstring
errorsobject[]
429

Request failed; no successful execution charge is settled

typestring
titlestring
statusinteger
codestring
detailstring
errorsobject[]
502

Request failed; no successful execution charge is settled

typestring
titlestring
statusinteger
codestring
detailstring
errorsobject[]
504

Request failed; no successful execution charge is settled

typestring
titlestring
statusinteger
codestring
detailstring
errorsobject[]
Request
curl -X POST 'https://api.aityx.ai/v1/systemone' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "questions": {
    "approved": {
      "type": "noul",
      "instructions": "Is this purchase approved?",
      "criteria": {
        "true": "Amount is at least 40",
        "false": "Amount is below 40"
      }
    }
  },
  "state": {
    "amount": 100
  }
}'
Response
{
  "model": {
    "content": {
      "name": "string",
      "inputs": {},
      "decisions": {},
      "functions": {}
    },
    "questions": {
      "property1": {
        "type": "noul",
        "instructions": null,
        "criteria": null,
        "options": {},
        "levels": [
          null
        ]
      },
      "property2": {
        "type": "noul",
        "instructions": null,
        "criteria": null,
        "options": {},
        "levels": [
          null
        ]
      }
    }
  },
  "input": {},
  "answers": {},
  "receipt": {
    "receipt": "string",
    "model": "string",
    "given": {},
    "read": {},
    "decisions": {},
    "answers": {},
    "state": {},
    "latency_ms": 0,
    "billing": {
      "currency": "USD",
      "estimated": false,
      "cost_usd": 0,
      "balance": {
        "currency": "USD",
        "balance_usd": 0,
        "reserved_usd": 0,
        "available_usd": 0
      },
      "items": [
        {}
      ]
    }
  },
  "cache_hit": true,
  "provider_usage": {
    "input_tokens": 0,
    "output_tokens": 0
  },
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0
  },
  "billing": {
    "currency": "USD",
    "estimated": false,
    "cost_usd": 0,
    "balance": {
      "currency": "USD",
      "balance_usd": 0,
      "reserved_usd": 0,
      "available_usd": 0
    },
    "items": [
      {}
    ]
  }
}