Self-host a Laya API server

Most Laya servers implement the same `POST /v1/systemone` wire format as TypeSafe's hosted Jev API. An existing Jev client can often switch to a self-hosted Laya by changing its base URL. The answers then come from Laya, a different and smaller model.

361 projects

laya-console

biyyl234

Provides a local web console and REST API for Laya inference and intent classification

1·GitHub repo

laya-decision-api

bmw8080

An HTTP service wraps local Laya with OpenAPI documentation and Java, TypeScript, and Python SDKs

1·GitHub repo

laya-pi

trinacria-tech

Runs Laya decision APIs and demos on a Raspberry Pi 4 using ONNX Runtime or PyTorch

1·GitHub repo

laya-agent

inboxxobni

Runs Laya typed decisions locally on Apple Silicon and provides an HTTP server and agent integrations

1·GitHub repo

laya-rk3588-turingpi-rk1

elepedus

Runs Laya inference on RK3588 Turing Pi RK1 modules through Mali GPU and Rockchip NPU backends

1·GitHub repo

laya-decision-gateway

harshad-jadav

Serves Laya model decisions through a documented API gateway

1·GitHub repo

Laya-Dockerized

sseeyyeedd

A local FastAPI service runs the multilingual Laya decision model and exposes prediction endpoints

1·GitHub repo

laya-router

Gjusev

Routes prompts between inexpensive and frontier models through an OpenAI-compatible proxy using Laya

1·GitHub repo

sys1rust

krishhgg

Runs Laya decision models on Apple Silicon with a Rust and MLX server compatible with the upstream API

1·GitHub repo

Laya-Go-Launcher

Ling0727-ai

Loads Laya models and launches inference services through TensorRT or ONNX Runtime

1·GitHub repo

mesh-decisions-playground

michaelneale

Provides a local web interface for making Laya decisions through Mesh LLM

1·GitHub repo
D

laya-engine

devinblaze

A Gradio API and interface for multilingual Laya decisions

1·HF Space

edge-decision-laya-system1-demo

skdwriting

Demonstrates low-latency edge decisions using the Laya System 1 model and safety guardrails

1·GitHub repo

laya_dart

lohanidamodar

Serves the Laya decision model through a Jev-compatible HTTP API

1·GitHub repo

laya-mlx-http

noahwaldner

Serves laya-mlx decisions over HTTP and provides a Vercel AI SDK adapter

1·GitHub repo

dsh-router-laya-deploy

kaijin1448

Deploys and patches a local Laya decision service and its OpenCode integration on Windows

1·GitHub repo

laya-mlx-jev-endpoint

rezhajulio

Serves laya-mlx through a FastAPI endpoint compatible with the JEV decision API

1·GitHub repo

llm-decision-api

OpenAurora

Provides a Qwen-powered semantic decision API and compares its results with Laya and Jev

1·GitHub repo

Laya-Engine

Ydjin1984

Runs local Laya typed-decision models through Go and ONNX Runtime with a plugin and ZCode skill

1·GitHub repo
S

laya-api

saleejkuruniyan

Provides a hosted and self-hosted API for Laya decision and routing inference

1·HF Space

pi-laya-server

sklearnin

Serves Laya prompt classifications to a pi extension for routing prompts by effort and security level

1·GitHub repo

meldecision

meldltd

Serves Laya decision models through a GoFiber API using ONNX Runtime

0·GitHub repo

laya-rs

codesoda

A planned Rust runtime for local Laya decisions with Metal acceleration and a Jev-compatible HTTP API

0·GitHub repo

laya-playground

marcosnovaesq

Runs Laya locally behind a TypeSafe-compatible API and provides a web UI for testing requests

0·GitHub repo

Official: laya-serve

From the core README:

pip install "laya[serve]"
LAYA_DEVICE=cuda LAYA_PRELOAD=1 laya-serve   # binds 0.0.0.0:8000, preloads all 3 checkpoints
curl -s localhost:8000/v1/systemone -H 'content-type: application/json' -d '{
  "state": {"body": "billed twice, refund please or we cancel"},
  "questions": {"dept": {"type": "choice", "instructions": "which team?",
                "criteria": {"billing": "refunds", "tech": "bugs"}}}
}'

Set LAYA_API_KEY to require a bearer token. Other settings are LAYA_HOST, LAYA_PORT, LAYA_MODELS and LAYA_THREADS. A Nix flake and a NixOS module are included.

ollaya

ollaya works like Ollama for decision models:

curl -fsSL https://ollaya.dev/install.sh | sh
ollaya run laya --preset triage "I was charged twice for my subscription this month and want a refund."

It serves /v1/systemone, and the README says the official TypeSafe SDK works unchanged with TYPESAFE_BASE_URL=http://localhost:11435.

Docker

LAYA SERVER adds a web console and API-key management:

docker run -d --name laya-server --init --restart unless-stopped \
  -p 8080:8080 \
  -v laya-data:/data \
  -e LAYA_ADMIN_USERNAME=admin \
  -e LAYA_ADMIN_PASSWORD='change-this-admin-password' \
  1panel/laya-server:latest

docker-laya publishes ghcr.io/chneau/laya for amd64 and arm64. Its README reports roughly 0.35 s per predict on CPU.

Native servers

laya.cpp (C++, CUDA, Vulkan and Core ML), sys1 (Rust on candle) and laya-apple (MLX plus Neural Engine) all serve /v1/systemone.

Differences from Jev

The core README lists three for client ports. Options share a token budget instead of Jev's 255-option cap. Every score level needs a description. confidence is computed differently, so a threshold tuned on Jev does not transfer; gate on answer_confidence instead. laya-rs uses /v1/system-one with a hyphen and is not a drop-in replacement.

Hosted Laya APIs

If you would rather not run a server at all, some services host Laya behind the same /v1/systemone wire format, among them layahost (EU, run by the makers of laya.tools) and Laya Studio (Switzerland). A one-click Railway template sits in between: still self-hosting, on Railway's machines. What to compare between them and your own server: Hosted Laya API: when not to self-host.

More ways to use Laya