Private Agentic AI for European Enterprises

Laya cURL examples

Call the AI Empower Labs Laya HTTP API with cURL: typed decisions, mixed questions, health checks, and common errors. No API key required on this host.

Quick answer

POST JSON to https://laya.aiempowerlabs.com/v1/systemone. Send model, state, and a questions object. No Authorization header is required. Use GET /health to confirm the service is up.

cURL is the fastest way to see the real JSON. Application code should still use an HTTP client with retries rather than shell loops.

Laya vs TypeSafe Jev

Both are System One decision models: they read a state and return typed choice, score, and noul answers with probabilities — not generated text. They share the same POST /v1/systemone wire shape, so most clients only change the base URL.

This host runs open-source Laya under AI Empower Labs. Jev remains TypeSafe’s closed, hosted API. Neither wins on every axis.

TopicLaya (this host)TypeSafe Jev
License & weights Open weights, Apache-2.0; self-hostable Closed; self-hosting not publicly documented
Where it runs Your infrastructure (here: AI Empower Labs) TypeSafe hosted API (api.typesafe.ai)
API contract POST /v1/systemone (Jev-compatible) POST /v1/systemone (original)
Auth on this demo None required Bearer API key
Context per question ~512 tokens (English) / ~1,024 (multilingual) Up to ~32k tokens of state
Large choice sets Weaker on many labels (keep choices small, ~<20) Stronger; up to 255 options per choice
Languages Router picks English / multilingual / typed-decisions English-primary; other languages vary
Fine-tuning Yes — open checkpoints No per-customer fine-tuning
Data residency Stays on the host you control TypeSafe cloud; residency details not fully public

Pick Laya when you need private / on-prem inference, open weights, multilingual routing, or short decision payloads. Pick Jev when you need long states or large label taxonomies. You can run both side by side and route each question to the model that fits.

Migrate a Jev client: change the base URL to https://laya.aiempowerlabs.com and drop the Authorization header for this host. Keep "model": "jev-latest" if you like — Laya accepts it and routes to its own checkpoint.

Endpoint

POST https://laya.aiempowerlabs.com/v1/systemone
Content-Type: application/json

Laya speaks the same POST /v1/systemone contract as TypeSafe Jev. Point any Jev-compatible client at this base URL.

Minimal noul

curl -sS https://laya.aiempowerlabs.com/v1/systemone \
  -H "Content-Type: application/json" \
  -d '{
    "model": "jev-latest",
    "state": "Please refund the duplicate charge on order A-104 today.",
    "questions": {
      "refund_requested": {
        "type": "noul",
        "instructions": "Does the customer ask for money back?"
      }
    }
  }' | jq .

Mixed questions

Choice, score, and noul in one request:

curl -sS -X POST https://laya.aiempowerlabs.com/v1/systemone \
  -H "Content-Type: application/json" \
  -d @- <<'EOF' | jq .
{
  "state": "Hi, I have been trying to connect my Stripe account for 3 days and the integration keeps failing. I am losing sales. Please help ASAP.",
  "model": "jev-latest",
  "questions": {
    "department": {
      "type": "choice",
      "instructions": "Which team should handle this",
      "criteria": {
        "billing": "Payment or subscription issues",
        "technical": "Bugs or integration problems",
        "sales": "Pricing or account questions"
      }
    },
    "frustration": {
      "type": "score",
      "instructions": "How frustrated the customer appears",
      "criteria": [
        "Calm, just stating facts",
        "Frustrated but civil",
        "Very angry, strong language"
      ]
    },
    "is_urgent": {
      "type": "noul",
      "instructions": "The message conveys urgency or time-sensitivity"
    }
  }
}
EOF

Windows PowerShell users: write the JSON to a file and pass --data-binary @request.json. Here-docs are bash.

Expected output

Illustrative shape — live answers and confidences vary:

{
  "model": "laya-rl-agent",
  "answers": {
    "department": {
      "type": "choice",
      "choice": "technical",
      "confidence": 0.78,
      "probabilities": {
        "technical": 0.85,
        "sales": 0.0,
        "billing": 0.15
      }
    },
    "frustration": { "type": "score", "score": 0.72 },
    "is_urgent": { "type": "noul", "noul": 0.91 }
  },
  "usage": { "input_tokens": 120, "output_tokens": 0 },
  "routing": { "model": "english", "reason": "English Latin text" }
}

Health

curl -sS https://laya.aiempowerlabs.com/health | jq .

A healthy response lists loaded checkpoints (english, multilingual, typed-decisions) and the device (cpu on this host).

Model field

Clients may send "model": "jev-latest" for Jev compatibility. Laya’s router still selects a checkpoint from the state language/script. To pin a checkpoint, use english, multilingual, or typed-decisions.

Errors you will actually see

CodeTypical cause
422Bad type, or missing criteria on choice/score
500Transient inference failure — retry once

When to use cURL

Debugging payloads, sharing a failing request, CI smoke tests.

When not to

Production loops. Use Python, TypeScript, or any HTTP client with backoff.

Common mistakes

FAQ

What URL do I POST to?

https://laya.aiempowerlabs.com/v1/systemone

Do I need an API key?

No. This AI Empower Labs deployment is open on the public URL. Do not send secrets in the request body.

Can I pin a checkpoint from cURL?

Yes. Set "model": "english", "multilingual", or "typed-decisions" instead of jev-latest.