Console

API reference

Decide

One endpoint answers every typed decision: choice, noul and score. Send state and questions, get answers with probabilities. Text generation has its own endpoint, /v1/generate.

POST/v1/systemone

Base URL https://wity-proxy-production-2c33.up.railway.app. The same endpoint is also served as /v1/system-one. Requests and responses are JSON (Content-Type: application/json).

Authentication#

Send your key as a bearer token: Authorization: Bearer wity_…. Requests without a valid key get 401. Keys belong on your server; never ship one to a browser or mobile app.

Request body#

state
string | object | arrayrequired
What the decision is about. Objects and arrays are read as JSON. At most 32,000 characters (after JSON encoding).
questions
objectrequired
Map of your question names to question objects (below). Names are up to 128 characters; answers come back under the same names.
reasoning
"auto" | "off" | "always"
Default "auto". See Reasoning.
max_latency_ms
integer
Optional latency budget, 200 to 120000. Wity thinks only as long as it allows. See Latency budget.
image
string
Optional data URL (data:image/…;base64,…) that every question sees with the state. See Images.
model
string
Optional and ignored; accepted so Jev clients work unchanged. Answers always report wity-1.

Question object

type
"choice" | "noul" | "score"required
The answer shape.
instructions
stringrequired
The question, in plain words. Up to 4,000 characters.
criteria
depends on type
choice: object mapping 2–256 option ids (≤128 chars) to descriptions (≤2,000 chars).
noul: optional object with exactly true and false descriptions.
score: array of 2–10 level descriptions, lowest first.

Note

Unknown fields in a question object are rejected with 400, so typos surface immediately.

Example#

curl https://wity-proxy-production-2c33.up.railway.app/v1/systemone \
-H "Authorization: Bearer $WITY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"state": "Hi, I was charged twice for my subscription this month. Please refund the duplicate.",
"questions": {
"intent": {
"type": "choice",
"instructions": "What does the customer want?",
"criteria": {
"billing": "A charge, refund, invoice or payment problem",
"technical_support": "Something in the product is broken",
"account_access": "Cannot log in or is locked out",
"cancellation": "Wants to cancel or downgrade"
}
}
},
"reasoning": "auto"
}'

Response#

{
"model": "wity-1",
"answers": {
"intent": {
"type": "choice",
"choice": "billing",
"probabilities": {
"billing": 0.9912,
"technical_support": 0.0031,
"account_access": 0.0019,
"cancellation": 0.0038
},
"confidence": 0.93,
"reasoning": { "mode": "auto", "thought": false, "reason": null, "forecast": false, "thought_tokens": null }
}
},
"usage": { "input_tokens": 212, "output_tokens": 0 },
"metadata": { "reasoning": "auto", "elapsed_ms": 94.1 }
}
model
string
Always wity-1.
answers
object
One answer per question, under your question names (shapes below).
usage.input_tokens
number
Billable tokens: your request, counted once. See Billing.
usage.output_tokens
number
Always 0: answers and thinking are not billed.
metadata.elapsed_ms
number
Time spent deciding on our side, in milliseconds (excludes your network).
metadata.reasoning
string
The reasoning mode used for the request.

Answer shapes

choice
answer
choice (the chosen option id), probabilities (every option id → probability, summing to 1), confidence.
noul
answer
noul: probability of yes, 0 to 1.
score
answer
score (expected level, a number), legend (level key → your description), probabilities (level key → probability), confidence.
reasoning
object
Present in auto and always modes: mode, thought, reason, forecast, thought_tokens, budget_limited (true when max_latency_ms cut the thinking short). When Wity thought, direct_probabilities / direct_noul show the answer before thinking.

Health#

GET/health

Returns {"status": "ok", "model": "wity-1"} when the service is ready to answer. No key needed.