> For the complete documentation index, see [llms.txt](https://docs.aimlapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aimlapi.com/api-references/decision-models/typesafe/jev-1.13.md).

# Jev 1.13

{% columns %}
{% column width="66.66666666666666%" %}
{% hint style="info" %}
This documentation is valid for the following list of our models:

* `typesafe/jev-1.13`
  {% endhint %}
  {% endcolumn %}

{% column width="33.33333333333334%" %} <a href="https://aimlapi.com/app/typesafe/jev-1.13" class="button primary">Try in Playground</a>
{% endcolumn %}
{% endcolumns %}

## Model Overview

Jev is a "System One" decision model from TypeSafe: instead of generating text it returns typed answers — yes/no, choice, score — with calibrated probabilities. It is built for routing, classification, triage and other in-app decision points where a fast, predictable verdict matters more than prose, and it answers in well under a second.

**Version 1.13** is the previous release, kept available under its own id so an integration can stay on it. It also reads experimental images. Context window is 262,144 tokens.

Pin this id when you need the behaviour to stay put. [Jev 1.14](/api-references/decision-models/typesafe/jev-1.14.md) is the current version — it improves across the board, most of all in languages other than English, and adds the `box` question type, which this version does not have.

{% hint style="success" %}
[Create AI/ML API Key](https://aimlapi.com/app/keys)
{% endhint %}

<details>

<summary>How to make the first API call</summary>

**1️⃣ Required setup (don’t skip this)**\
▪ **Create an account:** Sign up on the AI/ML API website (if you don’t have one yet).\
▪ **Generate an API key:** In your account dashboard, create an API key and make sure it’s **enabled** in the UI.

**2️ Copy the code example**\
At the bottom of this page, pick the snippet for your preferred programming language (Python / Node.js) and copy it into your project.

**3️ Update the snippet for your use case**\
▪ **Insert your API key:** replace `<YOUR_AIMLAPI_KEY>` with your real AI/ML API key.\
▪ **Select a model:** set the `model` field to `typesafe/jev-1.13`.\
▪ **Provide input:** put the content to evaluate in `state` and describe what to decide in `questions`.

**4️ (Optional) Tune the request**\
See the API schema below for the three question types (`noul`, `choice`, `score`) and their `criteria`.

**5️ Run your code**\
Run the updated code in your development environment.

{% hint style="success" %}
For a detailed walkthrough, use our [Quickstart guide](https://docs.aimlapi.com/quickstart/setting-up).
{% endhint %}

</details>

## API Schema

## POST /v1/decisions

>

```json
{"openapi":"3.0.0","info":{"title":"AIML API","version":"1.0.0"},"servers":[{"url":"https://api.aimlapi.com"}],"paths":{"/v1/decisions":{"post":{"operationId":"_v1_decisions","requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"model":{"type":"string","enum":["typesafe/jev-1.13"]},"state":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}}],"description":"The content to evaluate: a string, a JSON object, or an array of texts."},"questions":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["noul"],"description":"A yes/no question; the answer is the probability of \"yes\"."},"instructions":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}}],"description":"What to decide about the state. A plain question, or structured guidance as a JSON object/array (the question in one field, data it refers to in others)."},"criteria":{"type":"object","properties":{"true":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}}],"description":"When the answer is \"yes\"."},"false":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}}],"description":"When the answer is \"no\"."}},"description":"Optional descriptions of what \"true\" and \"false\" mean for this question: text, or a JSON object/array."}},"required":["type","instructions"]},{"type":"object","properties":{"type":{"type":"string","enum":["choice"],"description":"Pick exactly one option from `criteria`."},"instructions":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}}],"description":"What to decide about the state. A plain question, or structured guidance as a JSON object/array (the question in one field, data it refers to in others)."},"criteria":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}},{"nullable":true}]},"description":"Option key → description: text, a JSON object/array, or `null` when the key says it all. The answer is one of these keys plus a probability for each.","minProperties":1,"maxProperties":255}},"required":["type","instructions","criteria"]},{"type":"object","properties":{"type":{"type":"string","enum":["score"],"description":"Rate the state against an ordered scale of levels."},"instructions":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}}],"description":"What to decide about the state. A plain question, or structured guidance as a JSON object/array (the question in one field, data it refers to in others)."},"criteria":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}}]},"minItems":2,"maxItems":10,"description":"Ordered level descriptions (text or a JSON object/array each), lowest first. The answer is an expected level index (may be fractional) plus a probability per level."}},"required":["type","instructions","criteria"]}]},"description":"Map of question key → typed question. Every key comes back in `answers` with a typed result.","minProperties":1},"images":{"type":"array","items":{"nullable":true},"maxItems":0,"description":"Not supported: This model takes images in `assets` (TypeSafe’s format), not in `images`. A non-empty list is refused."},"assets":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["image"],"description":"The kind of asset. Optional; when sent, `image`."},"format":{"type":"string","enum":["png","jpg","jpeg"],"description":"The image format, lowercase; `jpeg` is `jpg`."},"data_base64":{"type":"string","minLength":1,"description":"The PNG or JPEG file, base64-encoded: the standard alphabet with `=` padding, no line breaks or whitespace, no `data:` prefix."}},"required":["format","data_base64"]},"description":"Images, keyed by a reference string (a new UUID per image is safest). Write the reference wherever the image belongs — as a whole string value, or inside a longer string of the state, an instruction or a criterion — and the model reads the image there; refer to an image in the state by its path in backticks, e.g. `photo`. Every asset must be referenced; each use adds the image again. PNG or JPEG stills, 256–1568 pixels a side, at most 16 MiB each; image tokens are billed as input tokens. Experimental (TypeSafe: not production-ready yet)."}},"required":["model","state","questions"],"title":"typesafe/jev-1.13"},{"type":"object","properties":{"model":{"type":"string","enum":["typesafe/jev-1.13"]},"state":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}}],"description":"The content to evaluate: a string, a JSON object, or an array of texts."},"questions":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["noul"],"description":"A yes/no question; the answer is the probability of \"yes\"."},"instructions":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}}],"description":"What to decide about the state. A plain question, or structured guidance as a JSON object/array (the question in one field, data it refers to in others)."},"criteria":{"type":"object","properties":{"true":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}}],"description":"When the answer is \"yes\"."},"false":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}}],"description":"When the answer is \"no\"."}},"description":"Optional descriptions of what \"true\" and \"false\" mean for this question: text, or a JSON object/array."}},"required":["type","instructions"]},{"type":"object","properties":{"type":{"type":"string","enum":["choice"],"description":"Pick exactly one option from `criteria`."},"instructions":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}}],"description":"What to decide about the state. A plain question, or structured guidance as a JSON object/array (the question in one field, data it refers to in others)."},"criteria":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}},{"nullable":true}]},"description":"Option key → description: text, a JSON object/array, or `null` when the key says it all. The answer is one of these keys plus a probability for each.","minProperties":1,"maxProperties":255}},"required":["type","instructions","criteria"]},{"type":"object","properties":{"type":{"type":"string","enum":["score"],"description":"Rate the state against an ordered scale of levels."},"instructions":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}}],"description":"What to decide about the state. A plain question, or structured guidance as a JSON object/array (the question in one field, data it refers to in others)."},"criteria":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}}]},"minItems":2,"maxItems":10,"description":"Ordered level descriptions (text or a JSON object/array each), lowest first. The answer is an expected level index (may be fractional) plus a probability per level."}},"required":["type","instructions","criteria"]}]},"description":"Map of question key → typed question. Every key comes back in `answers` with a typed result.","minProperties":1},"images":{"type":"array","items":{"nullable":true},"maxItems":0,"description":"Not supported: This model takes images in `assets` (TypeSafe’s format), not in `images`. A non-empty list is refused."},"assets":{"type":"object","additionalProperties":{"nullable":true},"description":"Not supported here: Images in `assets` reach this model only through its own provider’s API, and this request reached a fallback that would drop them. Retry shortly. A non-empty map is refused."}},"required":["model","state","questions"],"title":"typesafe/jev-1.13"}]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Resolved model version that answered."},"answers":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["noul"]},"noul":{"type":"number","description":"Probability that the answer is \"yes\" (0–1)."}},"required":["type","noul"]},{"type":"object","properties":{"type":{"type":"string","enum":["choice"]},"choice":{"type":"string","description":"The selected option key from `criteria`."},"confidence":{"type":"number","description":"Calibrated confidence in the choice (0–1)."},"probabilities":{"type":"object","additionalProperties":{"type":"number"},"description":"Probability of each option; sums to 1."}},"required":["type","choice","confidence","probabilities"]},{"type":"object","properties":{"type":{"type":"string","enum":["score"]},"score":{"type":"number","description":"Expected level on the ordered scale (may be fractional, e.g. 1.34)."},"confidence":{"type":"number","description":"Calibrated confidence in the score (0–1)."},"legend":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"nullable":true}}]},"description":"Level index → level description, as the request gave it (text, or a JSON object/array)."},"probabilities":{"type":"object","additionalProperties":{"type":"number"},"description":"Probability of each option; sums to 1."}},"required":["type","score","confidence","legend","probabilities"]},{"type":"object","properties":{"type":{"type":"string","enum":["box"]},"box":{"type":"object","properties":{"top":{"type":"number"},"bottom":{"type":"number"},"left":{"type":"number"},"right":{"type":"number"}},"required":["top","bottom","left","right"],"description":"The edges of the box around the target, each a fraction (0–1) from the top-left corner: `left` and `right` of the width, `top` and `bottom` of the height."},"confidence":{"type":"number","description":"How sure the model is of the box (0–1)."}},"required":["type","box","confidence"]}]},"description":"One typed answer per question key from the request."},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}},"required":["input_tokens","output_tokens"],"description":"Token usage reported by the provider."}},"required":["model","answers","usage"]}}}}}}}}}
```

## Code Example

{% tabs %}
{% tab title="Python" %}
{% code overflow="wrap" %}

```python
import requests
import json

response = requests.post(
    "https://api.aimlapi.com/v1/decisions",
    headers={
        # Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
        "Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
        "Content-Type": "application/json",
    },
    json={
        "model": "typesafe/jev-1.13",
        "state": "Help! My payments have been failing for 3 days and nobody answers support.",
        "questions": {
            "is_urgent": {
                "type": "noul",
                "instructions": "Does this convey urgency?",
            },
            "department": {
                "type": "choice",
                "instructions": "Which team should handle this?",
                "criteria": {
                    "billing": "Payments, invoicing, refunds",
                    "technical": "Bugs, outages, integrations",
                    "sales": "Pricing, upgrades, new accounts",
                },
            },
            "frustration": {
                "type": "score",
                "instructions": "How frustrated is the customer?",
                "criteria": ["Calm", "Frustrated", "Very angry"],
            },
        },
    },
)

print(json.dumps(response.json(), indent=2, ensure_ascii=False))
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript" %}
{% code overflow="wrap" %}

```javascript
async function main() {
  const response = await fetch('https://api.aimlapi.com/v1/decisions', {
    method: 'POST',
    headers: {
      // insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>
      'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      model: 'typesafe/jev-1.13',
      state: 'Help! My payments have been failing for 3 days and nobody answers support.',
      questions: {
        is_urgent: {
          type: 'noul',
          instructions: 'Does this convey urgency?',
        },
        department: {
          type: 'choice',
          instructions: 'Which team should handle this?',
          criteria: {
            billing: 'Payments, invoicing, refunds',
            technical: 'Bugs, outages, integrations',
            sales: 'Pricing, upgrades, new accounts',
          },
        },
        frustration: {
          type: 'score',
          instructions: 'How frustrated is the customer?',
          criteria: ['Calm', 'Frustrated', 'Very angry'],
        },
      },
    }),
  });

  console.log(JSON.stringify(await response.json(), null, 2));
}

main();
```

{% endcode %}
{% endtab %}
{% endtabs %}

<details>

<summary>Response</summary>

{% code overflow="wrap" %}

```json
{
  "model": "jev-1.13.0",
  "answers": {
    "is_urgent": {
      "type": "noul",
      "noul": 0.96
    },
    "department": {
      "type": "choice",
      "choice": "billing",
      "confidence": 0.97,
      "probabilities": {
        "billing": 0.98,
        "technical": 0.02,
        "sales": 0
      }
    },
    "frustration": {
      "type": "score",
      "score": 1.32,
      "confidence": 0.52,
      "legend": {
        "0": "Calm",
        "1": "Frustrated",
        "2": "Very angry"
      },
      "probabilities": {
        "0": 0,
        "1": 0.68,
        "2": 0.32
      }
    }
  },
  "usage": {
    "input_tokens": 406,
    "output_tokens": 73
  },
  "meta": {
    "model": "typesafe/jev-1.13",
    "provider": "typesafe",
    "usage": {
      "credits_used": 45,
      "usd_spent": 0.0000225
    }
  }
}
```

{% endcode %}

</details>

Every key you send under `questions` comes back under `answers` with the matching type. The top-level `model` is the exact build that answered (`jev-1.13.0`); `meta.model` is the id you called.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.aimlapi.com/api-references/decision-models/typesafe/jev-1.13.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
