Skip to content
docs

Create decisions

POST
/systemone
curl https://api.waibee.com/v1/systemone \
-H "Authorization: Bearer $WAIBEE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "jev-latest",
"state": "Customer writes: I want my money back for order 1042",
"questions": {
"route": {
"type": "choice",
"instructions": "Which team handles this ticket?",
"criteria": {"sales": "buying", "refunds": "money back", "shipping": "delivery"}
}
}
}'

Typed decisions in the System One API format: send a state and named questions, receive one answer per question key with probabilities. Serves models of class decision only (GET /v1/models?output_modalities=decisions). A model of another class is refused with model_endpoint_mismatch (400), and waibee/auto with feature_not_supported (400). No streaming.

A model ID without a provider is a TypeSafe model: jev-latest means typesafe/jev-latest, the default of the TypeSafe SDK. The SDK works with base_url set to https://api.waibee.com.

Media typeapplication/json

Fields not listed here, at the top or in a question, are dropped, not forwarded to the model.

object
model
required

A decision model from GET /v1/models, e.g. typesafe/jev-1.13. An ID without a provider is a TypeSafe model: jev-latest means typesafe/jev-latest.

string
<= 200 characters
state
required
Any of:
string
questions
required

Question key to question. The answer comes back under the same key.

object
>= 1 properties
key
additional properties
object
type
required
string
Allowed values: choice score noul
instructions
required
Any of:
string
criteria
One of:
object
key
additional properties
Any of:
Any of:
string
plugins

Per-request plugins.

object
dlp

Data-loss-prevention scan, mask or block. Optional: a DLP policy set for your API key applies as a floor of strictness even when this object is absent, and this object can only make the check stricter. entity_types is unioned with the policy’s categories, so the scan may be wider than the list you send.

object
mode

Applies to the rules you declare yourself. Where the key’s policy declares the same rule, the stricter of the two modes wins; the policy’s own categories keep the mode the administrator set.

string
Allowed values: alert mask block
entity_types

Unioned with the categories of the key’s policy, never narrowing them.

Array<string>
report_scope

Which messages’ findings come back to you. Narrowing it does not narrow the scan: every message is still scanned, and the block decision counts every finding.

string
default: all
Allowed values: all last_message latest_user_message
stop_words

Values that are a finding on their own, whatever the categories say. Unioned with the key’s policy.

Array<object>
object
value
required
string
match
string
default: exact
Allowed values: exact fuzzy
allowlist

Exceptions, matched on the whole value only. They reach your own rules only: an exception never lifts a finding raised by a rule of the key’s policy. Within your own config a stop word beats an exception on the same value.

Array<object>
object
value
required
string
match

Exact only. A substring exception would exempt every lookalike containing it.

string
default: exact
Allowed values: exact
regexes

Named patterns, run by RE2. Unioned with the key’s policy.

Array<object>
object
name
required
string
pattern
required
string
injected_context_names

Marks a message as inserted by the platform rather than typed by a person, by the value of its name field, and takes it out of the scan. Ignored while a policy applies to your key: on this path the same caller supplies both the marker and the content, so it would be a way to opt out of the check.

Array<string>
acknowledged

Reserved, and currently changes nothing: alert reports the findings and forwards the request, so there is no hold to confirm.

boolean
keep_masks

Keep masks in the response text, reasoning and tool call arguments instead of revealing them, the same with and without streaming. Under block a finding in message text is masked instead of rejecting the request. On its own this field does not turn DLP on.

boolean

One answer per question.

Media typeapplication/json
object
model

The model version that answered.

string
answers

One answer per question key, as the model returned it.

object
key
additional properties
object
key
additional properties
any
usage
object
input_tokens
integer
output_tokens
integer
plugins

Present when DLP in mask or alert mode found something. On /v1/embeddings and /v1/systemone a finding’s location is the path of the element (input[1], state.customer.email) and its message_index is -1.

object
dlp
Array<object>
object
category
string
entity_type
string
message_index
integer
location
string
start
integer
end
integer
confidence
number
Example
{
"model": "typesafe/jev-1.13-20260917",
"answers": {
"route": {
"type": "choice",
"choice": "refunds",
"probabilities": {
"sales": 0,
"refunds": 0.97,
"shipping": 0.03
},
"confidence": 0.96
}
},
"usage": {
"input_tokens": 394,
"output_tokens": 55
}
}

Invalid request. Codes: invalid_model, feature_not_supported, model_endpoint_mismatch, provider_bad_request, provider_context_length_exceeded.

Media typeapplication/json

OpenAI-format error envelope.

object
error
required
object
code
string
message
string
extra

Additional error data; fields depend on the error code.

object
key
additional properties
any
Examples

Unknown model

{
"error": {
"code": "invalid_model",
"message": "Model 'foo' is not available",
"extra": {}
}
}

Missing or invalid API key: authentication_required or invalid_api_key.

Media typeapplication/json

OpenAI-format error envelope.

object
error
required
object
code
string
message
string
extra

Additional error data; fields depend on the error code.

object
key
additional properties
any
Examples

No Authorization header

{
"error": {
"code": "authentication_required",
"message": "Authorization header is required",
"extra": {}
}
}

Not enough credits for the request (insufficient_funds).

Media typeapplication/json

OpenAI-format error envelope.

object
error
required
object
code
string
message
string
extra

Additional error data; fields depend on the error code.

object
key
additional properties
any
Example
{
"error": {
"code": "insufficient_funds",
"message": "Insufficient credits",
"extra": {}
}
}

Request blocked by an access policy (policy_violation) or by DLP (dlp_violation). A DLP block is about the content of the request, not about the key’s permissions: branch on error.code, not on the status alone.

Media typeapplication/json

OpenAI-format error envelope.

object
error
required
object
code
string
message
string
extra

Additional error data; fields depend on the error code.

object
key
additional properties
any
Examples

Model not allowed for this group

{
"error": {
"code": "policy_violation",
"message": "Request blocked by policy",
"extra": {}
}
}

Model not in the catalog (model_not_found).

Media typeapplication/json

OpenAI-format error envelope.

object
error
required
object
code
string
message
string
extra

Additional error data; fields depend on the error code.

object
key
additional properties
any
Example
{
"error": {
"code": "model_not_found",
"message": "Model 'nonexistent/model' is not available. Check the model name and try again.",
"extra": {}
}
}

Upstream took too long, including a stream that went silent (provider_timeout).

Media typeapplication/json

OpenAI-format error envelope.

object
error
required
object
code
string
message
string
extra

Additional error data; fields depend on the error code.

object
key
additional properties
any
Example
{
"error": {
"code": "provider_timeout",
"message": "Provider timed out",
"extra": {}
}
}

Request body, a file or the aggregate text exceeds the limit: payload_too_large, file_too_large, text_content_too_large.

Media typeapplication/json

OpenAI-format error envelope.

object
error
required
object
code
string
message
string
extra

Additional error data; fields depend on the error code.

object
key
additional properties
any
Example
{
"error": {
"code": "payload_too_large",
"message": "Request body too large",
"extra": {}
}
}

Request failed validation (validation_error): model not in <provider>/<model> form, or a missing field.

Media typeapplication/json

OpenAI-format error envelope.

object
error
required
object
code
string
message
string
extra

Additional error data; fields depend on the error code.

object
key
additional properties
any
Example
{
"error": {
"code": "validation_error",
"message": "Invalid request: body.model: Value error, model must be in format \"<provider>/<model>\"",
"extra": {
"errors": [
{
"type": "value_error",
"loc": [
"body",
"model"
],
"msg": "Value error, model must be in format \"<provider>/<model>\""
}
]
}
}
}

Provider rate limit (provider_rate_limited), or the API key’s spending limit for the period (api_key_limit_exceeded, reset time in extra.reset_at).

Media typeapplication/json

OpenAI-format error envelope.

object
error
required
object
code
string
message
string
extra

Additional error data; fields depend on the error code.

object
key
additional properties
any
Example
{
"error": {
"code": "provider_rate_limited",
"message": "Rate limit exceeded",
"extra": {}
}
}

Upstream model unavailable (provider_unavailable).

Media typeapplication/json

OpenAI-format error envelope.

object
error
required
object
code
string
message
string
extra

Additional error data; fields depend on the error code.

object
key
additional properties
any
Example
{
"error": {
"code": "provider_unavailable",
"message": "Provider unavailable",
"extra": {}
}
}

Temporarily unavailable. service_unavailable means the router is under load; dlp_policy_unavailable means the DLP policy for the key could not be resolved, and the request was refused rather than run unscanned. Both carry Retry-After. An internal failure arrives as internal_service_error.

Media typeapplication/json

OpenAI-format error envelope.

object
error
required
object
code
string
message
string
extra

Additional error data; fields depend on the error code.

object
key
additional properties
any
Examples

Router under load

{
"error": {
"code": "service_unavailable",
"message": "Service temporarily unavailable due to high load",
"extra": {}
}
}
Retry-After
integer

Seconds to wait before retrying.