Decide from rules or a model
decideOmit model or use rules for the existing yes_no, choice and scale rule engine with probability, confidence and action. Use model clef, nimble or tev1 for noul, choice and score questions with instructions and criteria. tev1 is the smallest and fastest, tested by its maker in English only, and suits short, direct questions. Model mode processes the submitted state and questions and returns structured answers without an automatic action or rule trace. Model requests allow up to 8 KiB of JSON, 3 KiB for tev1, 4 questions and 8 choices per question, and have their own usage limit of 60 per minute and 1000 per UTC day per IP. Refusals may carry Retry-After. Do not retry automatically. state holds the facts. For rules, each rule is {"if": condition, "weight": number}, where a condition tests a field of state with eq, ne, gt, gte, lt, lte, in, exists, prefix or contains, combined with any and not. Request and answer bodies are not stored by this API. Usage counters are stored. Do not send credentials or sensitive personal data. The full format is at https://aisense.no/free-public-api-decide-api-endpoint. No API key, no account and no sign up: call it directly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Optional. rules (default), clef, nimble or tev1. Unknown models are refused. | |
| state | Yes | The facts the rules test, or the input sent to the selected model. | |
| questions | Yes | 1 to 64 named rule questions, or up to 4 model questions under the default model limits. |