> ## 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 System One

> Official TypeSafe System One request.

Send `state` (shared content) and a map of questions (`noul` / `choice` / `score`).
Each question is answered independently against the same `state`.

Context limit: 64k tokens total; `state` + the longest single question ≤ 32k
(or 262k with `TypeSafe-Danger-Zone-Long-Context: true`).


## Question types

| `type` | `criteria` | Answer fields |
| - | - | - |
| `noul` | optional `{ true, false }` | `noul` = P(yes) |
| `choice` | required option map (≤ 255) | `choice`, `probabilities`, `confidence` |
| `score` | required ordered array (2–10) | `score`, `legend`, `probabilities`, `confidence` |

`state` and `instructions` may be string, object, or array. Keys in `questions` are echoed in `answers`.

How-to: [TypeSafe Jev API](https://docs.omniall.ai/typesafe-jev-api.md).


## OpenAPI

````yaml openapi/typesafe-jev.yaml POST /typesafe/v1/systemone
openapi: 3.1.0
info:
  title: Omniall AI — TypeSafe Jev (System One)
  version: 1.14.0
  description: >
    TypeSafe Jev System One decision APIs on Omniall AI.


    Jev does **not** generate text. You send content (`state` / `input`) and
    typed questions;

    it returns answers with probabilities (and confidence where applicable).


    **Two call styles:**


    - TypeSafe official: `POST /typesafe/v1/systemone`

    - OpenAI Decisions: `POST /v1/decisions`


    **Models:** `jev-1.14.0`, `jev-preview` (alias of current preview),
    `jev-latest`.


    **Host:** `https://api.omniall.ai` · Auth `Authorization: Bearer sk-...`


    Preview headers (optional):


    - `TypeSafe-Danger-Zone-Images: true` — allow images in TypeSafe official
    requests

    - `TypeSafe-Danger-Zone-Long-Context: true` — raise context limit to 262k
    tokens
servers:
  - url: https://api.omniall.ai
security: []
tags:
  - name: TypeSafe System One
    description: TypeSafe official System One format
  - name: OpenAI Decisions
    description: OpenAI Decisions-compatible format
paths:
  /typesafe/v1/systemone:
    post:
      tags:
        - TypeSafe System One
      summary: TypeSafe System One
      description: >
        Official TypeSafe System One request.


        Send `state` (shared content) and a map of questions (`noul` / `choice`
        / `score`).

        Each question is answered independently against the same `state`.


        Context limit: 64k tokens total; `state` + the longest single question ≤
        32k

        (or 262k with `TypeSafe-Danger-Zone-Long-Context: true`).
      operationId: typeSafeSystemOne
      parameters:
        - $ref: '#/components/parameters/Authorization'
        - name: TypeSafe-Danger-Zone-Images
          in: header
          required: false
          schema:
            type: string
            enum:
              - 'true'
          description: >-
            Preview — allow image assets in `state` / `instructions` /
            `criteria`.
        - name: TypeSafe-Danger-Zone-Long-Context
          in: header
          required: false
          schema:
            type: string
            enum:
              - 'true'
          description: >-
            Preview — raise context limits to 262k tokens (slower, lower
            accuracy).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TypeSafeSystemOneRequest'
            examples:
              ticket_routing:
                summary: Ticket routing (choice + score + noul)
                value:
                  model: jev-1.14.0
                  state: Help! My payouts have been failing for 3 days.
                  questions:
                    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
                    is_urgent:
                      type: noul
                      instructions: Does this convey urgency?
      responses:
        '200':
          description: Answers for each question
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TypeSafeSystemOneResponse'
              examples:
                ticket_routing:
                  value:
                    model: jev-1.14.0
                    answers:
                      department:
                        type: choice
                        choice: billing
                        probabilities:
                          billing: 0.88
                          technical: 0.12
                          sales: 0
                        confidence: 0.81
                      frustration:
                        type: score
                        score: 1.05
                        legend:
                          '0': Calm
                          '1': Frustrated
                          '2': Very angry
                        probabilities:
                          '0': 0
                          '1': 0.95
                          '2': 0.05
                        confidence: 0.92
                      is_urgent:
                        type: noul
                        noul: 0.95
                    usage:
                      input_tokens: 318
                      output_tokens: 34
        '400':
          $ref: '#/components/responses/TypeSafeError'
        '401':
          $ref: '#/components/responses/TypeSafeError'
        '403':
          $ref: '#/components/responses/TypeSafeError'
        '429':
          $ref: '#/components/responses/TypeSafeError'
components:
  parameters:
    Authorization:
      name: Authorization
      in: header
      required: true
      schema:
        type: string
        example: Bearer sk-...
      description: Bearer API key, e.g. `Bearer sk-...`.
  schemas:
    TypeSafeSystemOneRequest:
      type: object
      required:
        - model
        - state
        - questions
      properties:
        model:
          type: string
          description: Model id. Use `jev-1.14.0`, or aliases `jev-preview` / `jev-latest`.
          example: jev-1.14.0
        state:
          description: Shared content to judge (string, object, or array).
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
            - type: array
              items: {}
          example: Help! My payouts have been failing for 3 days.
        questions:
          type: object
          description: Map of question id → question. Keys are echoed in `answers`.
          additionalProperties:
            $ref: '#/components/schemas/TypeSafeQuestion'
          minProperties: 1
        assets:
          type: object
          description: >
            Preview — image assets keyed by UUID/reference string used inside
            `state` /

            `instructions` / `criteria`. Requires header
            `TypeSafe-Danger-Zone-Images: true`.
          additionalProperties:
            $ref: '#/components/schemas/TypeSafeAsset'
    TypeSafeSystemOneResponse:
      type: object
      properties:
        model:
          type: string
          example: jev-1.14.0
        answers:
          type: object
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/TypeSafeNoulAnswer'
              - $ref: '#/components/schemas/TypeSafeChoiceAnswer'
              - $ref: '#/components/schemas/TypeSafeScoreAnswer'
        usage:
          type: object
          properties:
            input_tokens:
              type: integer
            output_tokens:
              type: integer
    TypeSafeQuestion:
      type: object
      required:
        - type
        - instructions
      properties:
        type:
          type: string
          enum:
            - noul
            - choice
            - score
          description: |
            - `noul` — yes/no, returns P(yes)
            - `choice` — pick one option (≤ 255)
            - `score` — score on 2–10 ordered levels
        instructions:
          description: Question text (string, object, or array).
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
            - type: array
              items: {}
        criteria:
          description: >
            Required for `choice` (option map) and `score` (ordered level
            array).

            Optional for `noul` as `{ "true": "...", "false": "..." }`.
          oneOf:
            - type: object
              additionalProperties: true
            - type: array
              items: {}
    TypeSafeAsset:
      type: object
      required:
        - type
        - data_base64
      properties:
        type:
          type: string
          enum:
            - image
        format:
          type: string
          enum:
            - png
            - jpg
          description: Image format. Dimensions 256–1568 px per side, ≤ 16 MiB.
        data_base64:
          type: string
          description: Raw base64 without `data:` prefix.
    TypeSafeNoulAnswer:
      type: object
      properties:
        type:
          type: string
          enum:
            - noul
        noul:
          type: number
          minimum: 0
          maximum: 1
          description: Probability that the answer is yes.
    TypeSafeChoiceAnswer:
      type: object
      properties:
        type:
          type: string
          enum:
            - choice
        choice:
          type: string
          description: Highest-probability option.
        probabilities:
          type: object
          additionalProperties:
            type: number
        confidence:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            How peaked the distribution is (not the same as the top option
            probability).
    TypeSafeScoreAnswer:
      type: object
      properties:
        type:
          type: string
          enum:
            - score
        score:
          type: number
          description: Probability-weighted score (may fall between levels).
        legend:
          type: object
          additionalProperties:
            type: string
        probabilities:
          type: object
          additionalProperties:
            type: number
        confidence:
          type: number
          minimum: 0
          maximum: 1
  responses:
    TypeSafeError:
      description: TypeSafe-style error
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: object
                properties:
                  error_type:
                    type: string
                    example: validation_error
                  message:
                    type: string
                    example: >-
                      questions.refund.type: expected one of 'noul', 'choice',
                      'score'

````

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