Skip to content
laya /api

Free open beta, Jev-compatible request format

state & questions
→ typed answers

Ask your software a question in plain words. Laya API sends back JSON your code can branch on: a yes/no probability, a picked option, or a score. Every answer comes with a confidence value. No free text to parse.

live demo

team · Which team should handle this message?

  • billing Invoices, payments, refunds
  • support Bugs, errors, how-to questions
  • sales Plans, pricing, upgrades
  • feedback Praise, ideas, feature requests

Edit the message, pick a question type, then send it.

Same primitives as Jev

Three answer types, one request format.

noul
yes/no, as a probability
choice
one option from your list, with a probability each
score
a value between levels you describe

You ask. It picks.

Send a text and a question with the answers you allow. You get back the pick, how likely every option was, and how sure the model is.

request
POST /api/v1/systemone?wait=10

{
  "state": "I was charged twice for March.",
  "model": "laya-latest",
  "questions": {
    "team": {
      "type": "choice",
      "instructions": "Which team handles this?",
      "criteria": {
        "billing": "Payments and refunds",
        "support": "Bugs and errors",
        "sales": "Plans and pricing"
      }
    }
  }
}
response · 200 OK
{
  "status": "completed",
  "result": {
    "answers": {
      "team": {
        "type": "choice",
        "choice": "billing",
        "probabilities": {
          "billing": 0.91,
          "support": 0.06,
          "sales": 0.03
        },
        "confidence": 0.93
      }
    },
    "usage": { "input_tokens": 41 }
  }
}

Why Laya API

Laya is an open model. You could run it yourself, if your server can handle it.

No Python, no model on your server

Running Laya means Python, PyTorch and around 800 MB of model files. Most web hosting can't do that. With Laya API it's one HTTPS request from PHP, JavaScript or anything else.

Open to everyone, Jev-compatible

Jev is still in early access. Laya API is open to everyone in the free beta, with the same request format. Moving between the two is a change of URL and model name.

Your data stays in Germany

We run Laya API in Germany, under the GDPR. Need a data processing agreement (Art. 28 GDPR)? We'll sign one with you.

What happens to a request

Requests run as jobs. That keeps your app responsive: wait for the answer in the same call with ?wait=10, or fire and forget and fetch the job later. Every job also shows up in your dashboard.

  1. 1 queued You POST a state and your questions. We store the request and give it a job id.
  2. 2 processing A Laya worker picks up the job and runs the typed decisions model on it.
  3. 3 completed The answers come back as JSON that matches your questions, key for key.
  4. 4 failed The job ends with an error type and message instead of answers. Temporary worker problems are retried first, up to three attempts.

Already using Jev? Change two lines.

Same request body, same answers object. The only difference: the answer arrives inside a job object, and ?wait=10 returns it in the same call.

endpoint
https://www.laya-api.de/api/v1/systemone
model
laya-latest

Free while we’re in open beta

Create an account, generate a key and start sending requests. No credit card. Beta keys are limited to 60 requests per minute.

After the beta: input tokens only

Output tokens are free. An answer is a handful of numbers, not paragraphs of text, so you’ll only ever be billed for what you send. Pricing will be published before the beta ends.