# Jev Evaluate

Use the Jev System One structured decision endpoint.

Jev is not a chat model. Do not send Jev requests to `/v1/chat/completions` or `/v1/messages`. Use the dedicated `POST /v1/evaluate` endpoint to receive structured answers based on `state` and `questions`.

## Basic request

```bash
curl https://kaienapi.com/v1/evaluate \\
  -H "Authorization: Bearer <YOUR_API_KEY>" \\
  -H "Content-Type: application/json" \\
  -d '{
    "model": "jev",
    "state": {
      "customer_message": "I was charged twice for order ord_7429.",
      "duplicate_charge_usd": 680,
      "customer_identity_verified": true,
      "policy": "Refunds above USD 500 require human approval."
    },
    "questions": {
      "action": {
        "type": "choice",
        "instructions": "Choose the safest next action.",
        "criteria": {
          "allow": "Issue the refund immediately.",
          "review": "Require human approval before issuing the refund.",
          "deny": "Reject the refund request."
        }
      }
    }
  }'
```

## Request fields

- `model`: use `jev`.
- `state`: business context as an object, array, or text. The gateway does not interpret business fields for you.
- `questions`: a map of questions. Each key identifies an answer your application will consume.
- `questions.<name>.type`: `choice`, `score`, or `noul`.
- `questions.<name>.instructions`: what Jev should evaluate.
- `choice`: use a `criteria` object to define options and their meanings.
- `score`: use an ordered `criteria` array for score bands.
- `noul`: returns the probability that a condition is true; some compatible services call this `boolean`.

## Result example

```json
{
  "answers": {
    "action": {
      "type": "choice",
      "choice": "review",
      "confidence": 1,
      "probabilities": {
        "allow": 0,
        "confirm": 0,
        "deny": 0,
        "review": 1
      }
    }
  },
  "model": "jev",
  "usage": {
    "inputTokens": 382,
    "outputTokens": 45
  }
}
```

The `answers` keys match the question keys in the request. A `choice` answer includes the selected option, confidence, and option probabilities. A `score` answer includes a score and probabilities. A `noul` answer includes true and false probabilities. Preserve the returned usage fields for accounting.

## Billing and safety

Jev requests are billed per request rather than using Chat Completions input/output token pricing. Treat confidence and probabilities as decision signals and define your own human-review boundary. Do not place passwords, API keys, or unrelated private data in `state`. Business errors are returned as gateway errors; a failed request does not create a successful-call charge record.
