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

# Jev API

> Classify text, score it against a rubric, or evaluate statements with TypeSafe's Jev model.

Jev evaluates text or JSON against a set of questions and returns a structured
answer for each question. Questions in one request share the same `state`.

| Run field | Value |
| - | - |
| `provider` | `typesafe` |
| `endpoint` | `/v1/systemone` |

Send these fields with `input` to [Create a Run](/docs/api-reference/runs/create).
Use [Inspect](/docs/api-reference/endpoints/inspect) for the current input schema and
Price. See [API overview](/docs/api-reference/overview) for authentication and Run handling.

## Input

| Field | Description |
| - | - |
| `state` | The content to evaluate: text, a JSON object, or a JSON array. |
| `questions` | An object containing one or more questions, each with a nonempty ID. |
| `model` | Optional model name. Defaults to `jev-latest`; use `jev-1.13.0` to select that version. |

Each question has a `type`, `instructions` that describe what to evaluate, and
`criteria` where required:

| Type | Purpose | `criteria` |
| - | - | - |
| `choice` | Select an option | An object with 2–255 options |
| `score` | Assign a score | An ordered array with 2–10 levels |
| `noul` | Evaluate a yes/no statement | Optional |

Answers are returned in `output.answers`, keyed by the question IDs. See the
[TypeSafe API reference](https://docs.typesafe.ai/api) for question and answer formats.

## Example

This request evaluates two statements about the same support ticket:

```json wrap theme={null}
{
  "provider": "typesafe",
  "endpoint": "/v1/systemone",
  "input": {
    "model": "jev-1.13.0",
    "state": "The customer was charged twice and asks for a refund.",
    "questions": {
      "duplicate_charge": {
        "type": "noul",
        "instructions": "The customer was charged twice."
      },
      "refund": {
        "type": "noul",
        "instructions": "The customer asks for a refund."
      }
    }
  }
}
```

## Token limits

Batch size depends on the content in `state` and the questions. Jev 1.13 checks
both limits:

| Content | Limit |
| - | - |
| `state` + all questions | 64k tokens |
| `state` + the longest question | 32k tokens |

Question content includes `instructions` and `criteria`. Token counts differ
from character counts. See [TypeSafe's model limits](https://docs.typesafe.ai/models)
for other model versions and current rate limits.

## Provider errors

Read Jev's HTTP status from `provider_response.http_status` and its error body
from `provider_response.error`. A token-limit rejection has HTTP status `400`
and this body:

```json theme={null}
{"detail":{"error_type":"max_tokens_exceeded"}}
```

The error does not identify which limit was exceeded. Shorten `state` or the
longest question to meet the 32k limit; shorten or split the questions to meet
the 64k total limit. Use a new `Idempotency-Key` for the revised request.

Jev returns `429` for rate limits and `529` for temporary overload. Back off
before creating a new Run. See [Run response handling](/docs/api-reference/overview#read-the-result)
for status fields and retries.

## Pricing

Jev charges for input tokens; output tokens are free. Each batch includes and
bills `state` again. Token-limit rejections with no token usage have no Charge.

Inspect the Endpoint for Glasser's current Price. The Run's `charge_usd` field
contains its actual Charge.


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