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

# Jev 1.14: decisions and image input

> Call Jev 1.14 through OmniaKey with text, Base64 images, and typed Box results.

Jev evaluates your state and typed questions in one synchronous JSON request. It returns decisions, scores, probabilities, or image coordinates. Use your OmniaKey API key.

`POST https://api.omniakey.com/v1/alpha/search`

> [!NOTE]
>
> Check `GET /v1/models` with your key before choosing a model. Model access also depends on your group and key permissions.

## Models and pricing

| Model ID | Notes |
| - | - |
| `jev-1.14.0` | Pinned version; image input and Box |
| `jev-preview` | OmniaKey alias pinned to `jev-1.14.0` |
| `jev-latest` | Existing alias; retains current behavior |

Use `jev-1.14.0` to select this version explicitly. OmniaKey pins `jev-preview` to the same version. Both use the same pricing configuration as `jev-latest`; check the Dashboard for current charges. `jev-latest` retains its existing alias behavior.

## Text input

```bash theme={null}
curl https://api.omniakey.com/v1/alpha/search \
  -H "Authorization: Bearer $OMNIAKEY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "jev-1.14.0",
    "state": "I was charged twice. Please refund the extra charge.",
    "questions": {
      "billing": {"type": "noul", "instructions": "Is this about billing?"}
    }
  }'
```

## Image input

OmniaKey supplies the TypeSafe image opt-in header on this route. Clients only send their normal authorization header and the image JSON. This route accepts JSON with Base64 assets; multipart uploads and remote image URLs are not supported. The image bytes belong in `assets`; `TypeSafe-Danger-Zone-Images` is an HTTP header, never a JSON body field.

Prepare a still PNG or JPEG before sending. Rotate its pixels upright and resize it on your side; the gateway preserves the uploaded bytes. Each asset reference must appear in `state`, question `instructions`, or `criteria`. References can occur in nested values or inside a sentence; use a UUID to avoid accidental matches.

### Image limits

| Limit | Value |
| - | - |
| Format | Still PNG/JPEG |
| Each dimension | 280–1568 pixels |
| File size | 16 MiB per image before Base64 encoding |
| JSON request body | 32 MiB, including Base64 |

Base64 must use standard encoding with padding, without a `data:` prefix or whitespace. Repeated references count the image again toward the provider’s expanded-input limit. Images and Box are experimental.

Save a prepared image as `photo.png`. This complete Python example uses only the standard library and reads `OMNIAKEY_API_KEY` from the environment.

```python theme={null}
import base64
import json
import os
import urllib.request
import uuid
from pathlib import Path

photo = Path("photo.png")
image_ref = str(uuid.uuid4())
payload = {
    "model": "jev-1.14.0",
    "state": {"photo": image_ref},
    "assets": {
        image_ref: {
            "type": "image",
            "format": "png",
            "data_base64": base64.b64encode(photo.read_bytes()).decode("ascii"),
        }
    },
    "questions": {
        "person_present": {
            "type": "noul",
            "instructions": "Is there a person in `photo`?",
        },
        "object_box": {
            "type": "box",
            "instructions": "Locate the main object in `photo`.",
        },
    },
}
request = urllib.request.Request(
    "https://api.omniakey.com/v1/alpha/search",
    data=json.dumps(payload).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {os.environ['OMNIAKEY_API_KEY']}",
        "Content-Type": "application/json",
    },
    method="POST",
)
with urllib.request.urlopen(request, timeout=60) as response:
    result = json.load(response)
print(result["model"])
print(json.dumps(result["answers"], ensure_ascii=False, indent=2))
```

## Read the response

`answers` uses your question names. Noul returns a probability; Choice returns an option; Score returns a score; Box returns normalized `top`, `bottom`, `left`, and `right` coordinates. Box requires Jev 1.14. Multiply horizontal coordinates by image width and vertical coordinates by height. `confidence` can be null. Log the returned `model` to verify the version; `usage` includes image input.

```json theme={null}
{
  "model": "jev-1.14.0",
  "answers": {
    "person_present": {"type": "noul", "noul": 0.92},
    "object_box": {
      "type": "box",
      "box": {"top": 0.2, "bottom": 0.8, "left": 0.15, "right": 0.7},
      "confidence": null
    }
  },
  "usage": {"input_tokens": 300, "output_tokens": 25}
}
```

## Errors

For 400/422, check required fields, Base64, asset references, and image format. For 413, reduce image or request size. For 401, verify the OmniaKey key. If the model is unavailable, check `/v1/models` and the key’s permissions. Retry 429/5xx with bounded backoff. Never repeatedly retry an invalid image.

## References

* [TypeSafe Images](https://docs.typesafe.ai/images)
* [TypeSafe Box](https://docs.typesafe.ai/primitives/box)
* [TypeSafe Models](https://docs.typesafe.ai/models)


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