# TypeSafe Jev


Loads the bundled offline spec (`fastdecisions/specs/jev.json`) for `POST /v1/systemone` and registers `jev_provider` (`TYPESAFE_API_KEY`, default model `jev-1.14.0`). [`prep_jev_state`](#prep_jev_state) lowers `Msg` histories and lifts PNG or JPEG `InputImage` parts (280 to 1568 px, auto-resized) into a content-hashed `assets` map; non-image media raise `ValueError`.

Requests automatically attach `TypeSafe-Danger-Zone-Images: true` when `assets` or a [`box`](types.html#box) question is present, and `TypeSafe-Danger-Zone-Long-Context: true` when `long_context=True` (raising the context limit from 64k to 262k tokens). Jev is the only provider supporting [`box`](types.html#box) questions.

## prep_jev_state

``` python
def prep_jev_state(
    state, # String, JSON dict/list, `Msg`, `list[Msg]`, `InputImage`, or nested combination
    assets:dict=None, # Optional caller-supplied Jev `assets` dict to merge into
    max_sz:int=1568, # Maximum long-edge pixels for lifted `InputImage` assets
)->tuple:
```

*Normalize `state` for Jev using [`lower_state`](types.html#lower_state), returning `(state_json, assets_dict)`.*
