Define a model by hand
Write and validate the compact JSON yourself, then submit it with each execution.
A model is readable JSON. You can write one from scratch, or take a generated one and edit it.
curl https://api.aityx.ai/v1/systemtwo/models \
-H "Authorization: Bearer $AITYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"output": {
"is_urgent": { "type": "noul", "instructions": "Does this ticket need priority review?" }
},
"content": {
"name": "ticket triage",
"inputs": {
"issue ongoing": { "type": "boolean", "desc": "Is the problem still happening?", "from": "tense and time words" },
"business impact": {
"type": "none|degraded|blocked",
"desc": "How much of normal operation is affected?",
"options": { "none": "no effect", "degraded": "slower or partial", "blocked": "a core operation cannot complete" },
"from": "what the customer says they cannot do"
}
},
"decisions": {
"is_urgent": {
"type": "boolean",
"desc": "Priority review is needed when an ongoing issue blocks a core operation.",
"table": [
["issue ongoing", "business impact", "=> boolean", "# why"],
["true", "blocked", "true", "an ongoing incident is blocking a core operation"],
["-", "-", "false", "nothing indicates an ongoing, blocking incident"]
]
}
}
}
}'
The definition passes the same checks a generated one does: format, strict lint, the question contract against
output, expansion, validation and compilation. The validation response reports valid and the result
of each stage. Inspect its errors and warnings before executing the definition.
Manual validation uses the same endpoint with content and output, without a prompt or files. It is
free and returns a stage report rather than saving a model. Check valid even when the HTTP status is
200. When valid, package the definition and the question contract you supplied as {content, questions}.
For execution, submit that complete object in model and the case in state to POST /v1/systemone:
const model = { content: checkedContent, questions: output };
const body = JSON.stringify({ model, state });
Matching JSON uses System One pricing. The code guide shows a complete client.
The format is specified in Model format. The console’s editor works on the current session definition. Keep your original file and download the edited one; no server-managed version is created.