Review the rules you’ll use.
Inspect the draft and try a boundary case. Keep the rules that match your policy.
Download the complete model as JSON.
Decision API for AI applications and agents
Turn your business rules into decisions, amounts and deadlines your AI app can use. AI drafts the model; the engine runs the rules you reviewed. Test a change before you ship it.
Approved accounts include credits to test your own policy in the console and API.
Watch an original invoice policy become working rules, then test the cutoff and a new discount. Pause or skip to any step.
{ "payment_action": { "type": "choice", "instructions": "Unapproved invoices go to review. Approved invoices get 2% off if payment_on is within 10 calendar days of invoice_date (inclusive); otherwise pay in full.", "criteria": {"discount":"Pay at the discount rate.","full":"Pay the full amount.","review":"Needs approval."} }, "payable_amount": { "type": "number", "instructions": "Return USD payable: zero for review; 98% of invoice_amount for discount; otherwise invoice_amount. Round to cents.", "criteria": {"unit":"USD","range":">= 0"} }, "discount_by": { "type": "date", "instructions": "Return the last discount date: invoice_date plus 10 calendar days." } }
Refine your decision
{ "invoice_amount": 25000, "invoice_date": "2026-10-01", "payment_on": "2026-10-11", "approved": true }
We'll show the result here when it's ready.
Preparing your answers
compare the original and revised modelsRun six cases →$24,500.00 → $24,250.00Receipt 34b84967$24,500.00 → $24,250.00Receipt dd425bbe$39,200.00 → $38,800.00Receipt 415c99df{ "cases": 6, "changed": 3, "unchanged": 3, "changes": [ { "receipt": "34b84967-85ff-4f00-89e1-e005aab44b3b", "case": "Original $25,000 invoice", "answers": { "payable_amount": { "from": 24500, "to": 24250 } } }, { "receipt": "dd425bbe-57c9-473d-a610-1e92133c5236", "case": "Same invoice · matching JSON", "answers": { "payable_amount": { "from": 24500, "to": 24250 } } }, { "receipt": "415c99df-2871-4d7d-9ef7-9e54abbf7ba2", "case": "$40,000 invoice · paid early", "answers": { "payable_amount": { "from": 39200, "to": 38800 } } } ] }
/v1/systemoneModel · System Oneimport { readFile } from "node:fs/promises"; // The downloaded file contains content and questions. const model = JSON.parse( await readFile("aityx-model.json", "utf8") ); const state = { "invoice_amount": 25000, "invoice_date": "2026-10-01", "payment_on": "2026-10-11", "approved": true }; const response = await fetch( "https://api.aityx.ai/v1/systemone", { method: "POST", headers: { "Authorization": "Bearer " + process.env.AITYX_API_KEY, "Content-Type": "application/json" }, body: JSON.stringify({ model, state }) } ); if (!response.ok) throw new Error(await response.text()); const { answers, receipt, usage, billing } = await response.json();
{ "answers": { "payment_action": { "type": "choice", "choice": "discount", "confidence": 1, "probabilities": { "discount": 1, "full": 0, "review": 0 } }, "payable_amount": { "type": "number", "number": 24250, "confidence": 1 }, "discount_by": { "type": "date", "date": "2026-10-11", "confidence": 1 } }, "receipt": { "receipt": "eb9cb6a0-5e58-48c6-b8f0-276828c3a66e", "given": { "approved": true, "invoice_amount": 25000, "invoice_date": "2026-10-01", "payment_on": "2026-10-11" }, "decisions": { "payment_action": { "value": "discount", "rule": 2, "rows": "xF+", "columns": { "payment_on >= invoice_date and payment_on <= discount_by": true }, "cells": [ "FT", "TT", "TT" ] }, "payable_amount": { "value": 24250, "rule": 2, "rows": "xF+", "cells": [ "F", "T", "T" ] }, "discount_by": { "value": "2026-10-11" } } }, "usage": { "input_tokens": 688, "output_tokens": 1125 }, "billing": { "currency": "USD", "estimated": false, "complete": true, "cost_usd": 0.000028896, "estimated_cost_usd": 0.000028896, "priced_cost_usd": 0.000028896, "items": [ { "category": "system_one", "operation": "execution", "status": "completed", "token_source": "api", "input_tokens": 688, "output_tokens": 1125, "usage_complete": true, "provider_calls": 0, "input_usd_per_million": 0.042, "output_usd_per_million": 0, "cost_usd": 0.000028896, "estimated_cost_usd": 0.000028896, "includes_execution": false } ], "balance": { "currency": "USD", "balance_usd": 9.947684352, "reserved_usd": 0, "available_usd": 9.947684352 } } }
You created the rules, tested the cutoff and compared the revision. Send your model with each invoice; keep the answer and receipt.
Start with your invoice and payment terms. Create the rules, then inspect the calculated amount and deadline.
$25,000 invoice: $24,500.00 by October 11Matching JSON: 6 ms recorded executionDiscount revision: 3 of 6 recorded test results change
Built by Aletyx, a team with nearly two decades of enterprise decision experience.Meet the team →
Why aityx
You need a calculation you can verify and a rule you can explain. aityx executes your reviewed model and returns the inputs and the rules that fired with the answer.
{
"model": {
"content": {
"name": "Invoice Payment Terms",
"inputs": {
"approved": {
"type": "boolean",
"desc": "Has the invoice been approved?",
"from": "approved"
},
"invoice_amount": {
"type": "number >= 0",
"desc": "What is the invoice amount in USD?",
"from": "invoice_amount"
},
"invoice_date": {
"type": "date",
"desc": "What is the invoice date?",
"from": "invoice_date"
},
"payment_on": {
"type": "date",
"desc": "On what date will payment occur?",
"from": "payment_on"
}
},
"decisions": {
"payment_action": {
"desc": "Unapproved invoices go to review. Approved invoices get 2% off if payment_on is within 10 calendar days of invoice_date (inclusive); otherwise pay in full.",
"table": [
[
"approved",
"payment_on >= invoice_date and payment_on <= discount_by",
"=> discount|full|review",
"# why"
],
[
"false",
"-",
"review",
"Unapproved invoices require review regardless of payment date."
],
[
"true",
"true",
"discount",
"Approved invoices paid from the invoice date through the tenth calendar day qualify for 2% off."
],
[
"-",
"-",
"full",
"Approved invoices outside the inclusive discount window are payable in full."
]
]
},
"payable_amount": {
"desc": "Return USD payable: zero for review; 98% of invoice_amount for discount; otherwise invoice_amount. Round to cents.",
"table": [
[
"payment_action",
"=> number >= 0",
"# why"
],
[
"review",
"0",
"An invoice awaiting approval has zero payable amount."
],
[
"discount",
"round cents(invoice_amount * 0.98)",
"The discount reduces the invoice amount by 2%, rounded to cents."
],
[
"-",
"round cents(invoice_amount)",
"The full invoice amount is payable, rounded to cents."
]
]
},
"discount_by": {
"type": "date",
"desc": "Return the last discount date: invoice_date plus 10 calendar days.",
"expr": "invoice_date + duration(\"P10D\")"
}
},
"functions": {
"round cents": {
"params": {
"amount": "number >= 0"
},
"returns": "number >= 0",
"body": "decimal(amount, 2)"
}
}
},
"questions": {
"payment_action": {
"type": "choice",
"instructions": "Unapproved invoices go to review. Approved invoices get 2% off if payment_on is within 10 calendar days of invoice_date (inclusive); otherwise pay in full.",
"criteria": {
"discount": "Pay at the discount rate.",
"full": "Pay the full amount.",
"review": "Needs approval."
}
},
"payable_amount": {
"type": "number",
"instructions": "Return USD payable: zero for review; 98% of invoice_amount for discount; otherwise invoice_amount. Round to cents.",
"criteria": {
"unit": "USD",
"range": ">= 0"
}
},
"discount_by": {
"type": "date",
"instructions": "Return the last discount date: invoice_date plus 10 calendar days."
}
}
},
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Invoice Payment Terms",
"type": "object",
"properties": {
"approved": {
"type": "boolean",
"description": "Has the invoice been approved?",
"x-jev-from": "approved"
},
"invoice_amount": {
"type": "number",
"minimum": 0,
"description": "What is the invoice amount in USD?",
"x-jev-from": "invoice_amount"
},
"invoice_date": {
"type": "string",
"format": "date",
"description": "What is the invoice date?",
"x-jev-from": "invoice_date"
},
"payment_on": {
"type": "string",
"format": "date",
"description": "On what date will payment occur?",
"x-jev-from": "payment_on"
}
},
"required": [
"approved",
"invoice_amount",
"invoice_date",
"payment_on"
],
"additionalProperties": false
},
"answers": {
"payment_action": {
"type": "choice",
"choice": "full",
"confidence": 1,
"probabilities": {
"discount": 0,
"full": 1,
"review": 0
}
},
"payable_amount": {
"type": "number",
"number": 25000,
"confidence": 1
},
"discount_by": {
"type": "date",
"date": "2026-10-11",
"confidence": 1
}
},
"receipt": {
"state": {
"kind": "json"
},
"given": {
"approved": true,
"invoice_amount": 25000,
"invoice_date": "2026-10-01",
"payment_on": "2026-10-12"
},
"read": {},
"decisions": {
"payment_action": {
"value": "full",
"rule": 3,
"rows": "xxF",
"columns": {
"payment_on >= invoice_date and payment_on <= discount_by": false
},
"cells": [
"FT",
"TF",
"TT"
]
},
"payable_amount": {
"value": 25000,
"rule": 3,
"rows": "xxF",
"cells": [
"F",
"F",
"T"
]
},
"discount_by": {
"value": "2026-10-11"
}
},
"receipt": "18e93cef-a415-4dc3-9255-0a981115439a",
"model": "Invoice Payment Terms",
"mode": "defined",
"created_at": "2026-10-05T04:45:05.450664Z",
"latency_ms": 5,
"reader": null,
"answers": {
"payment_action": {
"type": "choice",
"choice": "full",
"confidence": 1,
"probabilities": {
"discount": 0,
"full": 1,
"review": 0
}
},
"payable_amount": {
"type": "number",
"number": 25000,
"confidence": 1
},
"discount_by": {
"type": "date",
"date": "2026-10-11",
"confidence": 1
}
},
"provider_usage": {
"input_tokens": 0,
"output_tokens": 0
},
"billing": {
"currency": "USD",
"estimated": false,
"complete": true,
"cost_usd": 0.000028896,
"estimated_cost_usd": 0.000028896,
"priced_cost_usd": 0.000028896,
"items": [
{
"category": "system_one",
"operation": "execution",
"status": "completed",
"token_source": "api",
"input_tokens": 688,
"output_tokens": 1117,
"usage_complete": true,
"provider_calls": 0,
"input_usd_per_million": 0.042,
"output_usd_per_million": 0,
"cost_usd": 0.000028896,
"estimated_cost_usd": 0.000028896,
"includes_execution": false
}
],
"balance": {
"currency": "USD",
"balance_usd": 9.976565312,
"reserved_usd": 0,
"available_usd": 9.976565312
}
},
"call_usage": {
"input_tokens": 688,
"output_tokens": 1117
},
"usage": {
"input_tokens": 688,
"output_tokens": 1117
}
},
"cache_hit": false,
"provider_usage": {
"input_tokens": 0,
"output_tokens": 0
},
"usage": {
"input_tokens": 688,
"output_tokens": 1117
},
"billing": {
"currency": "USD",
"estimated": false,
"complete": true,
"cost_usd": 0.000028896,
"estimated_cost_usd": 0.000028896,
"priced_cost_usd": 0.000028896,
"items": [
{
"category": "system_one",
"operation": "execution",
"status": "completed",
"token_source": "api",
"input_tokens": 688,
"output_tokens": 1117,
"usage_complete": true,
"provider_calls": 0,
"input_usd_per_million": 0.042,
"output_usd_per_million": 0,
"cost_usd": 0.000028896,
"estimated_cost_usd": 0.000028896,
"includes_execution": false
}
],
"balance": {
"currency": "USD",
"balance_usd": 9.976565312,
"reserved_usd": 0,
"available_usd": 9.976565312
}
}
}This payment missed the discount cutoff by one day. The receipt records the full-payment rule that fired. Keep the complete model, original input and receipt together in your application.
How it works
Keep the complete model, send it with each case, and switch rules when your tests say it’s ready.
Inspect the draft and try a boundary case. Keep the rules that match your policy.
Download the complete model as JSON.
Your app sends that model with each new case. Get the decision, calculated values and receipt back together.
Matching JSON runs directly; text may need AI extraction.
Run the same cases against both models. Adopt the revision when the results meet your expectations; keep the original for rollback.
Your application controls which model it submits.
Use cases
Build payments, approvals and review queues around your own policy. The invoice example is recorded; the other applications are illustrative.
Finance operations · recorded example
Apply your payment terms to return the payable amount, discount deadline and approval outcome.
Test the exact cutoff and compare a new discount before it affects a payment.
Teams building AI agents
Have your agent check a proposed refund or discount against your policy before your application carries it out.
Return allow or deny, the applicable limit, and whether approval is needed.
Illustrative values, shown without the API envelope. Your policy defines the limits and outcomes.
Finance operations
Approve, reject, or route an expense to a manager using your thresholds and submission window.
Calculate cost per person and elapsed days in the model. Compare saved cases before changing a limit.
Illustrative values, shown without the API envelope. Your policy defines the limits and outcomes.
Illustrative applications. Write and test the rules from your own policy.
Calculate payouts from delay duration, cause, loyalty tier, and meal or hotel caps.
Apply time windows and capped sums as explicit rules.
Calculate qualifying rental income, debt-to-income ratio, and reserves from your policy.
Compare recorded cases across policy versions before switching.
Return the credit percentage and amount from monitoring data or an incident report.
Apply uptime calculations, maintenance exclusions, and submission deadlines together.
Already have access? Open the console examples →
Get started
Follow the invoice quickstart, or choose the starting point closest to your work.
Keep your state-and-questions format. Inspect the returned rules and review confidence behavior before using them in your app.
Coming from Jev →Attach your policy or describe the decision. Inspect and test the model it produces.
Build a model from a prompt →Write compact JSON or edit a generated model. Validate your rules before executing them.
Define a model by hand →Pricing
Use AI to build or revise your rules. Execute the reviewed model at the lower rate with matching JSON inputs.
per 1M input tokens
Send your complete model with matching JSON. Input billing includes the model and case; answers and the receipt have no output charge.
per 1M tokens, input · output
Create or revise rules, ask questions with state, or extract facts with AI. Questions-based calls use this rate even when a cached model is reused.
The recorded invoice execution cost <$0.001 with the complete model and matching JSON.
The request determines the rate: sending questions stays at System Two pricing, even on a cache hit. Sending your model with matching JSON uses System One pricing. AI input extraction adds a separate System Two charge. Each call shows its usage and charge. Prices in USD.
Integration questions
Yes, for the same decision model and validated inputs. Matching JSON runs directly on the decision engine. Text is read into typed inputs first, so the receipt separates facts you supplied from facts the AI reader extracted. You can inspect that reading as well as the rule that fired.
Yes. Build a model in the console or through System Two, read and edit its JSON or diagram, and test it with sample cases. Keep the definition you reviewed and send it with each execution. If you start by sending questions through System One, aityx creates or reuses a model and returns it with the answer so you can inspect the rules.
aityx attempts to read unresolved inputs from the data you supplied. A required fact that is absent, unsupported, or below its confidence threshold returns invalid_state before execution. Your application can ask for the missing information or route the case for review.
AI creates and revises the model, and reads text into typed inputs when needed. The aityx decision engine executes the model’s rules to produce the answer. You keep the model and a receipt of the execution, so you can check both the inputs and the decision logic.
You can keep the systemone request format and use your aityx base URL and API key. The response includes answers and usage, plus a decision model you can keep and an execution receipt. Confidence now reflects a result executed from a model and its inputs, rather than Jev’s classification signal. Review any confidence-based routing before switching. You can also add number and date questions.
Yes. System Two accepts a prompt with PDFs, images, spreadsheets, Word documents, or text files, plus an optional result format. It returns a model definition you can inspect, edit and test before your application uses it.
The tech preview returns models and receipts for you to keep. The console holds decision data during the current session; download it before refreshing or leaving. aityx may reuse generated models through a temporary cache, but that cache is not a saved-model library. Account, access and billing records are retained separately.
aityx is built by Aletyx, the team behind Aletyx Platform. It brings the team’s experience building enterprise decision systems to a focused API and console for AI applications and agents.
The tech preview is hosted. Contact the team to discuss private deployment requirements.
Tech preview
Try the worked invoice example, then test your own rules before integrating. Approved preview accounts include credits for console and API calls.