Skip to content

TypeSafe Jev Decision Model ​

Submit content together with a set of questions to receive structured probabilities, choices, or scores. Use cases include intent classification, ticket routing, content moderation, and quality scoring. All questions in a request share the same state.

Endpoint ​

MethodEndpoint
POSThttps://neolink.com/api/v1/decisions

Compatibility path: https://neolink.com/api/v1/systemone, with the same request and response format. Use /v1/decisions for new integrations.

Authentication ​

MethodDescription
Bearer TokenInclude Authorization: Bearer <API Key> in the request header. Use an API Key created on this platform.

Request Headers ​

ParameterTypeRequiredDescription
Content-TypestringYesSet to application/json
AuthorizationstringYesBearer <API Key> for account authentication

Model Capabilities ​

  • Supports noul (binary judgment), choice (selection), and score (rating). Different question types can be combined in one request.
  • Returns a complete JSON response. Streaming is not supported; do not set stream: true.
  • Image input (assets) and box localization questions are not currently supported by this endpoint.

Model ID: Examples use jev-latest. Available models and access permissions depend on your platform configuration.

Request Body ​

ParameterTypeRequiredDefaultDescription
modelstringYes-Model ID, such as jev-latest
statestring/object/arrayYes-Text, conversation history, data records, or application state to evaluate, shared by all questions
questionsobjectYes-Non-empty question map. Caller-defined keys identify entries in answers and do not participate in model reasoning
questions.<key>.typestringYes-Question type: noul, choice, or score
questions.<key>.instructionsstring/object/arrayYes-Question description. Objects or arrays can separate the question from reference data; refer to fields in text using backticks
questions.<key>.criteriaobject/arrayConditional-Evaluation criteria. See the formats and limits below
streambooleanNofalseOmit or set to false

criteria Parameters ​

Question TypeTypeRequiredDescription
noulobjectNoUse true and false keys to describe the two outcomes. Descriptions accept strings, objects, or arrays. Example: {"true": "Explicitly time-sensitive", "false": "No urgency expressed"}
choiceobjectYes1–255 options. Keys are the possible returned choices; descriptions accept strings, objects, arrays, or null. Example: {"billing": "Payments and refunds", "technical": null}
scorearray[string]Yes2–10 rating levels ordered from low to high, indexed from 0. Example: ["Calm", "Frustrated", "Very angry"]

Request Example ​

This example evaluates urgency, selects a department, and rates frustration for the same customer message. You can also submit just one of these questions.

bash
curl --location --request POST 'https://neolink.com/api/v1/decisions' \
     --header 'Authorization: Bearer <API Key>' \
     --header 'Content-Type: application/json' \
     --data-raw '{
    "model": "jev-latest",
    "state": "Help! My payouts have been failing for 3 days.",
    "questions": {
        "is_urgent": {
            "type": "noul",
            "instructions": "Does this convey urgency?",
            "criteria": {
                "true": "Explicitly time-sensitive",
                "false": "No urgency expressed"
            }
        },
        "department": {
            "type": "choice",
            "instructions": "Which team should handle this?",
            "criteria": {
                "billing": "Payments, invoicing, refunds",
                "technical": "Bugs, outages, integrations",
                "sales": "Pricing, upgrades, new accounts"
            }
        },
        "frustration": {
            "type": "score",
            "instructions": "How frustrated is the customer?",
            "criteria": [
                "Calm",
                "Frustrated",
                "Very angry"
            ]
        }
    }
}'
python
import requests

url = "https://neolink.com/api/v1/decisions"
headers = {
    "Authorization": "Bearer <API Key>",
    "Content-Type": "application/json",
}
payload = {
    "model": "jev-latest",
    "state": "Help! My payouts have been failing for 3 days.",
    "questions": {
        "is_urgent": {
            "type": "noul",
            "instructions": "Does this convey urgency?",
            "criteria": {
                "true": "Explicitly time-sensitive",
                "false": "No urgency expressed"
            }
        },
        "department": {
            "type": "choice",
            "instructions": "Which team should handle this?",
            "criteria": {
                "billing": "Payments, invoicing, refunds",
                "technical": "Bugs, outages, integrations",
                "sales": "Pricing, upgrades, new accounts"
            }
        },
        "frustration": {
            "type": "score",
            "instructions": "How frustrated is the customer?",
            "criteria": [
                "Calm",
                "Frustrated",
                "Very angry"
            ]
        }
    }
}

response = requests.post(url, headers=headers, json=payload, timeout=60)
response.raise_for_status()
print(response.json())

Response Parameters ​

ParameterTypeDescription
modelstringModel ID in the response
answersobjectAnswer map with keys matching the request's questions
answers.<key>.typestringAnswer type: noul, choice, or score
answers.<key>.noulnumberLikelihood of “yes” for noul, from 0 to 1; not a boolean
answers.<key>.choicestringSelected option key for choice
answers.<key>.scorenumberRating for score, possibly fractional, from 0 to the number of levels minus 1
answers.<key>.legendobjectMapping of level indices to descriptions for score
answers.<key>.probabilitiesobjectProbability of each option or level for choice or score
answers.<key>.confidencenumberConfidence for choice or score; higher values indicate greater certainty
usage.input_tokensintegerInput token count for the request
usage.output_tokensintegerOutput token count for the request

Response Example ​

This illustrates the response structure. Actual results and token usage depend on the response returned by the API.

json
{
    "model": "jev-latest",
    "answers": {
        "is_urgent": {
            "type": "noul",
            "noul": 0.95
        },
        "department": {
            "type": "choice",
            "choice": "billing",
            "probabilities": {
                "billing": 0.88,
                "technical": 0.12,
                "sales": 0
            },
            "confidence": 0.81
        },
        "frustration": {
            "type": "score",
            "score": 1.05,
            "legend": {
                "0": "Calm",
                "1": "Frustrated",
                "2": "Very angry"
            },
            "probabilities": {
                "0": 0,
                "1": 0.95,
                "2": 0.05
            },
            "confidence": 0.92
        }
    },
    "usage": {
        "input_tokens": 450,
        "output_tokens": 72
    }
}

Usage Notes ​

  • Choose a noul threshold for your application, for example flagging a message as urgent when noul >= 0.8. The caller determines the threshold.
  • In the score example, 0, 1, and 2 correspond to the three frustration levels. 1.05 is a rating, not a percentage.
  • Billing uses the returned token counts and the platform's configured rates. Refer to the prices displayed on the platform.
  • For failed requests, see the Error Code Guide.