LAYA / VISION
INDEPENDENTJEVAL.DEV ↗
API STATUS
●API / 05

Typed image decisions.
A clean wire contract.

A Jev-style typed-decision interface for Laya Vision. This independent project is not affiliated with Jev or TypeSafe AI.

POST/api/v1/decide

One image. One or more questions.

Provide one base64 JPEG, PNG, or WebP image and up to 16 typed questions. Remote image URLs are deliberately rejected. Requests are capped at 4 MB, decoded images at 3 MB and 16 megapixels, and the gateway times out after 25 seconds.

Live research service: the API proxies to a local RTX 3090 through an authenticated ephemeral tunnel. It requires a bearer API token and is available only while that computer is awake, online, and both backend processes are running. Open the live playground →

POST /api/v1/decide
Authorization: Bearer <token>
Content-Type: application/json

{
  "image": { "base64": "<base64 JPEG, PNG, or WebP>" },
  "context": { "ocr": "EXIT 12", "source": "camera-04" },
  "questions": [
    { "id": "q1", "type": "yes_no", "prompt": "Is a person visible?" },
    { "id": "q2", "type": "choice", "prompt": "Signal state?", "options": ["red", "amber", "green"] },
    { "id": "q3", "type": "score", "prompt": "Rate obstruction", "min": 0, "max": 4 }
  ]
}

Success response

{
  "request_id": "req_01J...",
  "model": "thaitea/laya-vision",
  "decisions": [
    { "id": "q1", "type": "yes_no", "value": true, "probability": 0.91 },
    { "id": "q2", "type": "choice", "value": "red", "probability": 0.84 },
    { "id": "q3", "type": "score", "value": 2, "probability": 0.68 }
  ]
}
●Clients

Call it from anywhere.

curl

curl -X POST https://YOUR_DOMAIN/api/v1/decide \
  -H "Authorization: Bearer $LAYA_API_KEY" \
  -H "Content-Type: application/json" \
  --data @request.json

TypeScript

const res = await fetch("https://YOUR_DOMAIN/api/v1/decide", {
  method: "POST",
  headers: { "content-type": "application/json", authorization: `Bearer ${apiKey}` },
  body: JSON.stringify(payload),
});
if (!res.ok) throw await res.json();
const result = await res.json();

Python

import requests

result = requests.post(
    "https://YOUR_DOMAIN/api/v1/decide",
    headers={"Authorization": f"Bearer {api_key}"},
    json=payload,
    timeout=30,
)
result.raise_for_status()
print(result.json())
401 / UNAUTHORIZED

Token required

The public gateway rejects missing or invalid bearer tokens before any GPU work.

413 / PAYLOAD_TOO_LARGE

Request too large

The gateway rejects bodies larger than 4 MB before parsing.

429 / BUSY

GPU occupied

Inference concurrency is one. Retry with backoff if another request is running.

Research/non-commercial notice: model weights are CC BY-NC-SA 4.0. This personal deployment has no uptime SLA and must not be used for safety-critical decisions.