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

# TypeSafe Jev API

> Call TypeSafe Jev System One on Omniall AI — structured decisions with probabilities, not free-form text.

# TypeSafe Jev API

Jev is TypeSafe’s System One model. It does **not** generate text: you send content and typed questions, and get answers with probabilities (and confidence where applicable). Programs can branch on those scores without parsing prose.

| Action | Method | Path |
| - | - | - |
| System One (TypeSafe official) | `POST` | `/typesafe/v1/systemone` |
| Decisions (OpenAI-compatible) | `POST` | `/v1/decisions` |

**Host:** `https://api.omniall.ai` · Auth `Authorization: Bearer sk-...`\
**Models:** `jev-1.14.0` · `jev-preview` · `jev-latest`

Full schemas and playground: **API Reference → Chat → TypeSafe / Jev**.

## Question types

| TypeSafe | OpenAI Decisions | Returns |
| - | - | - |
| `noul` | `predicate` | P(yes) in `[0, 1]` |
| `choice` | `choice` | Top option + per-option probabilities + confidence |
| `score` | `score` | Weighted score + per-level probabilities + confidence |

One request can mix types. Extra questions do not change other answers — each question is independent over the same content.

## Quick start (TypeSafe official)

```bash theme={null}
curl -X POST 'https://api.omniall.ai/typesafe/v1/systemone' \
  -H 'Authorization: Bearer sk-...' \
  -H 'Content-Type: application/json' \
  -d '{
    "state": "Help! My payouts have been failing for 3 days.",
    "model": "jev-1.14.0",
    "questions": {
      "department": {
        "type": "choice",
        "instructions": "Which team should handle this?",
        "criteria": {
          "billing": "Payments, invoicing, refunds",
          "technical": "Bugs, outages, integrations",
          "sales": "Pricing, upgrades, new accounts"
        }
      },
      "is_urgent": {
        "type": "noul",
        "instructions": "Does this convey urgency?"
      }
    }
  }'
```

TypeSafe SDK: set `base_url` to `https://api.omniall.ai/typesafe` (key = your Omniall API key).

## Quick start (OpenAI Decisions)

```bash theme={null}
curl -X POST 'https://api.omniall.ai/v1/decisions' \
  -H 'Authorization: Bearer sk-...' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "jev-1.14.0",
    "input": "I was charged twice for my order.",
    "questions": [
      {
        "type": "predicate",
        "name": "refund_requested",
        "instructions": "Is the customer asking for money back?"
      }
    ]
  }'
```

OpenAI SDK (`openai` Python ≥ 3.26 / JS ≥ 7.30): `base_url=https://api.omniall.ai/v1`, then `client.decisions.create(...)`.

## When to use it

* Ticket / form routing (team or next action)
* Priority and risk scoring
* Moderation / output checks (compliance, grounded citations)
* Agent control (which tool to call, whether to escalate)

Use probability and confidence thresholds: high confidence → automate; low → human review.

## Limits & tips

* Default context: **64k** tokens; `state`/`input` + longest question ≤ **32k**. Optional header `TypeSafe-Danger-Zone-Long-Context: true` raises both to **262k** (preview; slower / less accurate).
* Images: TypeSafe official needs `TypeSafe-Danger-Zone-Images: true` + `assets`; Decisions can send `input_image` (auto-enables images). PNG/JPEG only; 256–1568 px per side; ≤ 16 MiB each.
* English works best; other languages are usable but less accurate — validate on your data.
* Probabilities are rounded to two decimals; sums may be `0.99` instead of `1.0` — no need to renormalize.

Admin channel setup: create a **TypeSafe** channel (type `68`), Base URL `https://api.ephone.ai` (or your upstream), and enable `jev-*` models for the user group.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.