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.

167 projects

laya-server

nvkudva

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

0·GitHub repo

laya-api

sriramkasyap

Provides a self-hosted, Jev-compatible HTTP API for Laya typed decisions

0·GitHub repo

laya-docker-api

ksalk

Packages the local Laya decision engine as a GPU-enabled Docker HTTP API

0·GitHub repo

laya-local-service

uibuckets

Provides a local HTTP inference service and Python client for Laya

0·GitHub repo

docker-laya-api

TheNerdMan

Packages the Laya decision model as a containerized HTTP API with an optional browser demo

0·GitHub repo

sample-laya-mlx-http

daisuzz

Serves Laya MLX decisions through a local System One API with a Kotlin client

0·GitHub repo

verdict

NakliTechie

Serves typed decisions on macOS through Apple Foundation Models or an optional Laya backend

0·GitHub repo

laya

Yahia-Raouf

Provides a self-hosted Laya inference API, key management, and an administration portal

0·GitHub repo

laya-server

falk-werner

Serves Laya predictions through a local web server with prepared-question support

0·GitHub repo

LayaWatch

BLANCO-11

Runs Laya in-process and provides a self-hosted console for traces, metrics, access control, and model management

0·GitHub repo

layad

rcwsr

Keeps the Laya decision model resident and serves it over HTTP with MLX or PyTorch

0·GitHub repo

rest-laya

wdonega

Serves the Laya model over REST with optional Jev-compatible endpoints for non-Python clients

0·GitHub repo

laya-mcp

WayneCommand

Wraps the Laya decision model in an MCP server and REST API for agent integrations

0·GitHub repo

laya-agent

ahmadfreijeh

A support-action agent combines a Python Laya prediction service with a Node.js customer-facing server

0·GitHub repo

laya-railway

nomideusz

Deploys Laya on Railway behind a Jev-compatible HTTP API

0·GitHub repo

laya-fastapi

remominor

Serves Laya typed decisions through a local FastAPI and ONNX Runtime deployment

0·GitHub repo

laya.cpp

kyr0

Implements native C++ inference and a JEV-compatible server for Laya typed decisions

0·GitHub repo

laya-serve

ouijan

Serves Laya decisions over HTTP with a typed TypeScript client

0·GitHub repo

laya-api

yrodrigez

A FastAPI service loads the Laya model and serves typed-decision predictions

0·GitHub repo

laya-server

r2d-ai

Serves Laya's multilingual checkpoint through CUDA-backed REST and MCP interfaces

0·GitHub repo

laya-service

xiaobai1017

Exposes Laya through a FastAPI service with a Jev-compatible System One API

0·GitHub repo

oido-laya

Djancyp

Wraps the Laya decision model in a Dockerized HTTP API for typed predictions

0·GitHub repo

agentify-laya

hongyaok

Serves local Laya classifications through an OpenAI-shaped HTTP API and usage dashboard

0·GitHub repo

laya-jv

TimTan1234

Packages a self-hosted Laya decision model as a Docker HTTP service for Luna

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.

More ways to use Laya