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

0·GitHub repo

laya-api

gugaucb

Serves Laya and Laya-MLX models through OpenAI- and Anthropic-compatible APIs

0·GitHub repo

laya-playground

adyoi

Provides a FastAPI playground for Laya typed decisions with redaction and guardrails

0·GitHub repo

litellm-laya-demo

amkhrjee

Routes LiteLLM requests by complexity scores produced by Laya

0·GitHub repo

sys1rust

kgarg2468

A Rust and MLX service runs Laya decision models locally and exposes the System 1 API

0·GitHub repo

docker-ai-router

Gio53

OpenAI-compatible proxy that uses Laya difficulty scores to route requests between two LLM APIs

0·GitHub repo
D

laya-fontaneros

doiranbl

Runs Laya's official HTTP server for typed decisions in a Docker space

0·HF Space
B

trick-laya

beginbotbot

Serves Laya through an API compatible with TypeSafe Jev system-one requests

0·HF Space

laya-hybrid-harness

Ra77Data

Runs a local Laya decision model and delegates uncertain cases to a cloud service

0·GitHub repo

laya-ggml

liujp

Implements a C inference engine and HTTP service for the Laya decision model

0·GitHub repo

laya-demo

mkhante

Provides a standalone Go server and client that embed native Laya inference

0·GitHub repo

laya-api

moothz

Serves text and zero-shot image classification through a FastAPI backed by Laya and vision encoders

0·GitHub repo

laya-service

FnSGit

Serves local Laya inference through a FastAPI endpoint compatible with the Jev protocol

0·GitHub repo

laya_model

ranjithjunnu

Demonstrates a local PyTorch Laya decision service for classification and workflow planning

0·GitHub repo

hybrid-classification-poc

zeachco

Provides a Python classification server with a TypeScript client that downloads and runs Laya

0·GitHub repo

laya-claude-code-integration

danhnguyen-xiontechs

Installs and serves Laya locally on Windows, with an optional Claude Code MCP integration

0·GitHub repo

locally-run-Convai-Laya-AI

basavaraj1997

Runs Convai Laya locally behind a REST API with interactive Swagger documentation

0·GitHub repo

local-systemone

axiomantic

Provides a self-hosted System 1 decision daemon and MCP server with a native Laya backend

0·GitHub repo

laya-api

Kibana21

A self-hosted HTTP API that serves Laya typed-decision checkpoints

0·GitHub repo

zikai

jacobhausler

A Chinese idiom decision API offers Laya among its supported model adapters

0·GitHub repo

laya

luigidemasi

Packages a configurable Laya decision API in a general-purpose container

0·GitHub repo

laya

getlexora-ai

Deploys the open-source Laya decision model as a CPU service with a playground and test set

0·GitHub repo

laya

bimlesharma

A Docker Compose stack that serves the Laya model through a self-hosted API

0·GitHub repo

laya-scripts

minhquan2904

Python scripts for serving Laya on CPU and collecting encrypted request data

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