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
layaas-oci
acedergren
Deploys a pinned multilingual Laya decision API as a private CPU service on Oracle Cloud
laya-api
gugaucb
Serves Laya and Laya-MLX models through OpenAI- and Anthropic-compatible APIs
laya-playground
adyoi
Provides a FastAPI playground for Laya typed decisions with redaction and guardrails
litellm-laya-demo
amkhrjee
Routes LiteLLM requests by complexity scores produced by Laya
sys1rust
kgarg2468
A Rust and MLX service runs Laya decision models locally and exposes the System 1 API
docker-ai-router
Gio53
OpenAI-compatible proxy that uses Laya difficulty scores to route requests between two LLM APIs
laya-fontaneros
doiranbl
Runs Laya's official HTTP server for typed decisions in a Docker space
trick-laya
beginbotbot
Serves Laya through an API compatible with TypeSafe Jev system-one requests
laya-hybrid-harness
Ra77Data
Runs a local Laya decision model and delegates uncertain cases to a cloud service
laya-ggml
liujp
Implements a C inference engine and HTTP service for the Laya decision model
laya-demo
mkhante
Provides a standalone Go server and client that embed native Laya inference
laya-api
moothz
Serves text and zero-shot image classification through a FastAPI backed by Laya and vision encoders
laya-service
FnSGit
Serves local Laya inference through a FastAPI endpoint compatible with the Jev protocol
laya_model
ranjithjunnu
Demonstrates a local PyTorch Laya decision service for classification and workflow planning
hybrid-classification-poc
zeachco
Provides a Python classification server with a TypeScript client that downloads and runs Laya
laya-claude-code-integration
danhnguyen-xiontechs
Installs and serves Laya locally on Windows, with an optional Claude Code MCP integration
locally-run-Convai-Laya-AI
basavaraj1997
Runs Convai Laya locally behind a REST API with interactive Swagger documentation
local-systemone
axiomantic
Provides a self-hosted System 1 decision daemon and MCP server with a native Laya backend
laya-api
Kibana21
A self-hosted HTTP API that serves Laya typed-decision checkpoints
zikai
jacobhausler
A Chinese idiom decision API offers Laya among its supported model adapters
laya
luigidemasi
Packages a configurable Laya decision API in a general-purpose container
laya
getlexora-ai
Deploys the open-source Laya decision model as a CPU service with a playground and test set
laya
bimlesharma
A Docker Compose stack that serves the Laya model through a self-hosted API
laya-scripts
minhquan2904
Python scripts for serving Laya on CPU and collecting encrypted request data
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