# TypeSafe Jev 1.13

> TypeSafe Jev 1.13: fast, inexpensive typed decisions for classification, routing, triage and guardrails.

TypeSafe Jev 1.13 is a System One decision model for fast, inexpensive classification, routing, triage, enum extraction and guardrail checks. Give it text or JSON state and named, typed questions: Choice selects one of your options, Noul returns a yes probability from 0 to 1, and Score returns an expected index over ordered levels (0 to N-1). It evaluates bounded decisions without generating prose or long reasoning, keeping latency and token cost low. Route a support ticket to billing/technical/sales, gate a workflow on refund eligibility, or label a lead hot/warm/cold. Answers include probabilities and, for Choice/Score, optional confidence. Use explicit criteria and review uncertain results. Text input only, 32K context; no free-form writing, arbitrary JSON-schema generation, code, media, explanations or long reasoning.

## Choose the right question

| Need | Question | Result |
| --- | --- | --- |
| Route a support ticket or extract a fixed enum | `choice`, named `criteria` map | `choice` plus optional probabilities and confidence |
| Yes/no gate or guardrail check | `noul` | `noul`, a probability from 0 to 1; your code chooses the threshold |
| Triage urgency or score a lead | `score`, ordered criteria list | `score` plus optional probabilities and confidence |

Questions in one request share the state and are evaluated independently. This is enum-based extraction, not arbitrary JSON Schema generation. Include relevant facts and criteria; a confidence value is not a guarantee of correctness. Use a reasoning or writing model for explanations, code and open-ended text.

## Request and response

Use your FlyMyAI API key; no personal OpenRouter key is required.

```bash
curl "$FLYMYAI_BACKEND_URL/api/v1/agents/models/typesafe/jev-1.13/decisions/" \
  -H "X-API-Key: $FLYMYAI_API_KEY" -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: support-ticket-1042-team-v1' \
  -d '{"state":"I was charged twice. Please refund the duplicate payment.","questions":{"team":{"type":"choice","instructions":"Which team should handle this ticket?","criteria":{"billing":null,"technical":null,"sales":null}}}}'
```

Illustrative response (token counts and answers vary):

```json
{"model":"typesafe/jev-1.13","answers":{"team":{"type":"choice","choice":"billing"}},"usage":{"input_tokens":100,"output_tokens":0},"request_id":"support-ticket-1042-team-v1","charge_usd":"0.00000483"}
```

Get current pricing and complete schemas with `GET /api/v1/agents/models/typesafe/jev-1.13/`.

## Agent and MCP

The agent discovers `typesafe_jev` and calls `custom--typesafe_jev--decide` when a task needs a bounded decision. It should not call Jev for free-form answers, long reasoning, code, images, video or audio. Both FlyMyAI MCP servers expose `make_typed_decision`; pass the same `state`, `questions` and optional `request_id`. The model MCP also supports `run_model` with endpoint `flymyai/typesafe-jev-1_13`.

## Pricing and retries

The provider price is $0.042 per million input tokens and $0 per output token, and FlyMyAI charges exactly that, with 0% markup. Current pricing is authoritative; admins can update the rate. The request reserves up to the 32,000-token cost ($0.001344 at this rate), then charges only actual upstream usage. One input token costs $0.000000042 and remains representable in the ledger.

Reusing `request_id` (or the matching `Idempotency-Key` on REST) returns the same result without another charge. Different input with that ID returns 409. On the Agents MCP, `make_typed_decision` and `run_model` also take `operation_key`, sent as `Idempotency-Key`: the same key and input return the first answer without a second charge, and the same key with other input is refused before anything runs (409 `idempotency_key_reused`). Insufficient balance returns 402 before upstream dispatch. Failed, malformed and timed-out upstream responses do not charge. Upstream 429 is retried at most twice with bounded delay; a persistent rate limit returns 429.

## Limits

Text or JSON context only; 32,000 tokens. FlyMyAI caps JSON request size at 128KB, questions at 64 and choices/score levels at 256. No chat messages, streaming, sampling parameters, free-form output or arbitrary JSON schemas. The OpenRouter Decisions API is alpha.

## Sources

- [OpenRouter model and pricing](https://openrouter.ai/typesafe/jev-1.13)
- [Official OpenRouter Decisions SDK contract](https://github.com/OpenRouterTeam/python-sdk/blob/main/src/openrouter/decisions.py)
- [TypeSafe question primitives](https://docs.typesafe.ai/primitives)
