> ## Documentation Index
> Fetch the complete documentation index at: https://docs.branchpilot.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# REST

> Call a decision from any HTTP client.

One endpoint per decision: `POST https://api.branchpilot.ai/v1/decide/{slug}`. The full contract is in the [API reference](/en/api/authentication).

## Request

```json theme={null}
{
  "input": { "email": "anna@acme.com", "message": "Could we get a quote for 40 seats?" },
  "options": { "version": 3, "engine": "jev" }
}
```

* `input` — the payload your decision expects: an object matching the declared fields, or free text.
* `options.version` — optional; run this version instead of the live one.
* `options.engine` — optional; `"jev"` or `"llm"` to force an engine for this call.

## Response

```json theme={null}
{
  "run_id": "3f0b2c1e-…",
  "decision": "lead-routing",
  "version": 3,
  "status": "ok",
  "choice": "sales",
  "probabilities": { "sales": 0.87, "support": 0.09, "spam": 0.04 },
  "confidence": 0.87,
  "confidence_source": "calibrated",
  "engine": "jev",
  "model": "jev-1.13.0",
  "latency_ms": 212,
  "pii_redacted": 1
}
```

| Field                             | Present for   | Meaning                                              |
| --------------------------------- | ------------- | ---------------------------------------------------- |
| `status`                          | all           | `ok`, `uncertain` or `pending`                       |
| `choice`                          | route         | Selected option key, or `__uncertain__`              |
| `score`, `raw_score`, `legend`    | score         | 0–100 score, raw level position, level labels        |
| `labels`                          | classify      | Retained label keys                                  |
| `probabilities`                   | all           | Per option, level or label                           |
| `confidence`, `confidence_source` | all           | See [confidence](/en/concepts/confidence)            |
| `engine`, `model`                 | all           | `jev` or `llm_fallback`, and the exact model version |
| `fallback_reason`                 | fallback only | Why the primary engine did not answer                |
| `review_url`                      | pending only  | Where a human resolves the run                       |

## Timeouts

Give your HTTP client at least 10 seconds: a decision through Jev usually completes under one second, but a fallback after a Jev timeout can take a few seconds.
