Docs / Decision models

Decision models

A decision model answers typed questions about a piece of text or JSON. It picks one option, scores on a scale, or answers yes or no, with a probability for every option. It does not generate text. The first one in the catalog is Laya, an open model under the Apache-2.0 licence. In the dashboard these are listed as RLCD.

Laya runs in your own cloud account, like every deployment, behind one HTTPS endpoint with its own keys. The endpoint speaks a TypeSafe-compatible API, so the TypeSafe Python and JavaScript clients work with it.

What ships

One pinned download (1.7 GB) with two checkpoints that both stay loaded on one GPU:

Laya answers English only. A request in another language gets a clear error instead of a poor answer.

Deploy it

  1. Start a new deployment and choose RLCD on the first step, then Laya.
  2. Pick the hardware. Laya needs one GPU with 8 GB or more.
  3. Set the budget cap and deletion timer, and a schedule if you want one.
  4. Review the summary and confirm. The summary lists the engine, the API, the routing policy and both checkpoints.
ProviderHardwareStatus
RunPod1 × L4 24 GBDeployed and tested end to end on 2026-09-25
AWSg6.xlarge, 1 × L4 24 GBOffered, not yet booted by us
Verda1 × A100 80 GB, FIN-03Offered, not yet booted by us

Decision models run on-demand on the node-local gateway. Weight staging, spot capacity, edge gateways and idle auto-stop are not available for them yet. Stop them with the deletion timer, the budget cap, a schedule, or the Stop button.

Call it

The base URL is the endpoint itself, without /v1: the clients add /v1/systemone. The deployment's Connect tab shows these snippets filled in with your endpoint and key.

curl

curl https://abc12345.gw.llmhangar.com/v1/systemone \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "laya",
    "state": {"message": "My account was charged twice. Please refund it."},
    "questions": {
      "team": {
        "type": "choice",
        "instructions": "Which team should handle this request?",
        "criteria": {"billing": "Payments and refunds", "support": "Product help"}
      },
      "urgency": {
        "type": "score",
        "instructions": "How urgently does this need attention?",
        "criteria": ["Routine", "Soon", "Immediate"]
      },
      "refund_requested": {
        "type": "noul",
        "instructions": "Does the customer request a refund?"
      }
    }
  }'

Python

pip install typesafe-sdk

import typesafe_sdk as ts

client = ts.TypeSafeClient(
    api_key="YOUR_API_KEY",
    base_url="https://abc12345.gw.llmhangar.com",
)

result = client.system_one(
    {"message": "My account was charged twice. Please refund it."},
    {
        "team": {
            "type": "choice",
            "instructions": "Which team should handle this request?",
            "criteria": {"billing": "Payments and refunds", "support": "Product help"},
        },
        "refund_requested": {
            "type": "noul",
            "instructions": "Does the customer request a refund?",
        },
    },
    model="laya",
)
print(result.choices["team"].choice)
print(result.nouls["refund_requested"].noul)

JavaScript

npm i @typesafe-ai/sdk

import { TypeSafeClient } from "@typesafe-ai/sdk";

const client = new TypeSafeClient({
  apiKey: "YOUR_API_KEY",
  baseURL: "https://abc12345.gw.llmhangar.com",
});

const result = await client.systemOne({
  model: "laya",
  state: { message: "My account was charged twice. Please refund it." },
  questions: {
    refund_requested: { type: "noul", instructions: "Does the customer request a refund?" },
  },
});
console.log(result.answers.refund_requested.noul);

Environment variables

Both clients read these, so the code above needs no arguments once they are set:

export TYPESAFE_BASE_URL="https://abc12345.gw.llmhangar.com"
export TYPESAFE_API_KEY="YOUR_API_KEY"
export TYPESAFE_DEFAULT_MODEL="laya"

Requests and answers

Confidence for choice and score is (k × p_max − 1) / (k − 1) over k options, and 1 for a single option. It reproduces the confidence examples in TypeSafe's public documentation, but TypeSafe does not publish its formula, so treat it as an approximation. Treat every probability as the model's estimate, not a calibrated likelihood: check it against your own examples before you rely on a threshold.

Model names

NameAnswers with
layaAutomatic routing: the English checkpoint
laya-englishThe English checkpoint
laya-typed-decisionsThe typed-decisions specialist
convaiinnovations/layaSame as laya
convaiinnovations/laya-typed-decisionsSame as laya-typed-decisions

GET /v1/models lists these names.

Limits

Errors

StatusWhen
401No key, or a key this deployment does not accept
404Any path other than POST /v1/systemone and GET /v1/models
413A body over 1 MB
422A request that does not validate, an unknown model name, a language other than English, or an input over the limits. detail lists every problem with its location.
503The service is starting or stopping, or its GPU failed. Retry after the Retry-After seconds.
529Too many requests are queued. Retry after the Retry-After seconds.

Every response carries an x-request-id header. Quote it when you ask us about a request.

Health

LLM Hangar checks the running service every minute. If its GPU fails, the service stops answering (503) and restarts. If it keeps failing after a few minutes of retries, the deployment is stopped and held, so a schedule cannot start it again. The deployment page then offers Retry runtime.

Measured

Before we release a Laya image we check its accuracy against fixed question sets: 0.875 on 48 hand-written English questions and 0.882 on 306 questions from the typed-decisions test split. These are regression checks, not a quality claim for your data.