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
| Method | Endpoint |
|---|---|
| POST | https://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
| Method | Description |
|---|---|
| Bearer Token | Include Authorization: Bearer <API Key> in the request header. Use an API Key created on this platform. |
Request Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
Content-Type | string | Yes | Set to application/json |
Authorization | string | Yes | Bearer <API Key> for account authentication |
Model Capabilities
- Supports
noul(binary judgment),choice(selection), andscore(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) andboxlocalization 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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | - | Model ID, such as jev-latest |
state | string/object/array | Yes | - | Text, conversation history, data records, or application state to evaluate, shared by all questions |
questions | object | Yes | - | Non-empty question map. Caller-defined keys identify entries in answers and do not participate in model reasoning |
questions.<key>.type | string | Yes | - | Question type: noul, choice, or score |
questions.<key>.instructions | string/object/array | Yes | - | Question description. Objects or arrays can separate the question from reference data; refer to fields in text using backticks |
questions.<key>.criteria | object/array | Conditional | - | Evaluation criteria. See the formats and limits below |
stream | boolean | No | false | Omit or set to false |
criteria Parameters
| Question Type | Type | Required | Description |
|---|---|---|---|
noul | object | No | Use true and false keys to describe the two outcomes. Descriptions accept strings, objects, or arrays. Example: {"true": "Explicitly time-sensitive", "false": "No urgency expressed"} |
choice | object | Yes | 1–255 options. Keys are the possible returned choices; descriptions accept strings, objects, arrays, or null. Example: {"billing": "Payments and refunds", "technical": null} |
score | array[string] | Yes | 2–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.
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"
]
}
}
}'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
| Parameter | Type | Description |
|---|---|---|
model | string | Model ID in the response |
answers | object | Answer map with keys matching the request's questions |
answers.<key>.type | string | Answer type: noul, choice, or score |
answers.<key>.noul | number | Likelihood of “yes” for noul, from 0 to 1; not a boolean |
answers.<key>.choice | string | Selected option key for choice |
answers.<key>.score | number | Rating for score, possibly fractional, from 0 to the number of levels minus 1 |
answers.<key>.legend | object | Mapping of level indices to descriptions for score |
answers.<key>.probabilities | object | Probability of each option or level for choice or score |
answers.<key>.confidence | number | Confidence for choice or score; higher values indicate greater certainty |
usage.input_tokens | integer | Input token count for the request |
usage.output_tokens | integer | Output 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.
{
"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
noulthreshold for your application, for example flagging a message as urgent whennoul >= 0.8. The caller determines the threshold. - In the
scoreexample,0,1, and2correspond to the three frustration levels.1.05is 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.
