# Laya Studio > Hosted, autoscaled API for Laya — the open-source (Apache-2.0, Convai Innovations) non-autoregressive "System 1" decision model. Send a state (text/JSON) and typed questions (choice, score, noul); receive answers with probability distributions in one forward pass. Wire-compatible with TypeSafe Jev's POST /v1/systemone. Independent service; not affiliated with Convai Innovations or TypeSafe. ## API - Base URL: https://api.laya.studio (also https://laya.studio) - Auth: Authorization: Bearer lsk_live_… - POST /v1/systemone — { state, questions, model?, lang? } → { model, answers, usage, routing, id } - POST /v1/systemone/batch — { requests: [...] } (max 64) - POST /v1/ask — { prompt } in plain words; an LLM planner writes the questions, Laya answers them (MCP tool: ask) - GET /v1/models, GET /v1/usage, GET /v1/openapi - Limits: 32 questions/request, 64 options/question, 512 KB body; state read per question: 512 tokens (english) / 1,024 (multilingual, typed-decisions) - Billing: per input token, 1 credit = 1 input token (the usage.input_tokens the model encodes; the state is re-read per question, as in Jev); $0.0294 per 1M input tokens — 30% below Jev (Jev lists $0.042 per 1M input tokens); 5 free runs per new workspace; failed requests free - OpenAPI: https://laya.studio/v1/openapi ## MCP server - Endpoint: https://api.laya.studio/mcp (Streamable HTTP, JSON responses), header Authorization: Bearer lsk_live_… - Tools: decide, classify, yes_no, score, usage (billed like the REST API) - Claude Code: claude mcp add --transport http laya https://api.laya.studio/mcp --header "Authorization: Bearer lsk_live_…" - Docs: https://laya.studio/docs/mcp ## Swiss data residency - GPUs in Switzerland: Our primary inference pool runs on dedicated GPUs located in Switzerland. Every API response tells you where it was processed in the x-laya-region header. - Swiss-only mode: One switch per workspace (or the x-laya-residency: ch header per request) and requests are only ever answered in Switzerland. If the Swiss pool is unavailable you get an error, never a silent detour abroad. It is an add-on: +15% credits per request, still about 20% below Jev. - Zero content retention: The text and questions you send are processed in memory and discarded when the answer is returned. They are never written to a database or log, and never used to train anything. One exception to know about: the optional chat agent (POST /v1/ask, the MCP ask tool, dashboard Chat) first passes your prompt to a third-party language model to plan the questions, in the US by default and in Switzerland under Swiss-only mode. - Account data in Zurich: Accounts, API keys (stored only as SHA-256 hashes), credit balances and usage metadata live in a Postgres database in the AWS Zurich region (eu-central-2). - Minimal metadata, 30 days: For billing and debugging we keep request metadata only — time, status, number of questions, latency — for 30 days. Daily totals are kept for invoicing. - Encrypted end to end in transit: All traffic uses TLS. The API gateway runs on Cloudflare’s network, which forwards requests encrypted and does not store their content; the GPU servers accept requests only from our gateway. - Designed to support compliance with the Swiss Federal Act on Data Protection (nFADP, in force since 1 September 2023) and the EU GDPR. You remain responsible for your legal basis to process personal and health data. Laya Studio holds no formal certification (such as ISO 27001) today and does not sign HIPAA BAAs. - Page: https://laya.studio/swiss-data-residency ## Docs - Quickstart: https://laya.studio/docs - Questions & answers: https://laya.studio/docs/questions - Errors & retries: https://laya.studio/docs/errors - Migrate from Jev: https://laya.studio/docs/jev-migration - Pricing: https://laya.studio/pricing ## Explainers - What is Laya? The open-source AI model for fast, calibrated decisions: https://laya.studio/learn/what-is-laya - What is Jev? TypeSafe's decision model, explained in plain English: https://laya.studio/learn/what-is-jev - System 1 vs System 2 AI: when to decide fast and when to reason: https://laya.studio/learn/system-1-vs-system-2-ai - Non-autoregressive models: how AI can decide in a single pass: https://laya.studio/learn/non-autoregressive-models - Calibrated probabilities: when can you trust an AI model's confidence?: https://laya.studio/learn/calibrated-probabilities - Typed decisions: asking a model for a value, not a paragraph: https://laya.studio/learn/typed-decisions - Choice, score and noul: three primitives for typed decisions: https://laya.studio/learn/choice-score-noul - Proper scoring rules: rewarding a model for honest probabilities: https://laya.studio/learn/proper-scoring-rules - RLCD: reinforcement learning for calibrated decisions: https://laya.studio/learn/rlcd-reinforcement-learning-calibrated-decisions - Encoder vs decoder models: which architecture should make your decisions?: https://laya.studio/learn/encoder-vs-decoder-models - ModernBERT: a modern encoder for fast classification: https://laya.studio/learn/modernbert - mmBERT: the multilingual encoder behind Laya's global checkpoint: https://laya.studio/learn/mmbert - Option-marker scoring: how Laya reads a question and its answers together: https://laya.studio/learn/option-marker-scoring - Act or escalate: routing decisions by calibrated confidence: https://laya.studio/learn/act-escalate-routing - Multilingual classification: one decision, many languages: https://laya.studio/learn/multilingual-classification - Zero-shot vs fine-tuned: when is a general model good enough?: https://laya.studio/learn/zero-shot-vs-fine-tuned - The real cost of using an LLM as a classifier: https://laya.studio/learn/llm-as-classifier-cost - Hallucination-free decisions: what a non-generative model rules out: https://laya.studio/learn/hallucination-free-decisions - Latency budgets for AI agents: https://laya.studio/learn/latency-budgets-for-agents - Temperature scaling: the one-parameter fix for over-confidence: https://laya.studio/learn/temperature-scaling - Expected calibration error: measuring whether 80% means 80%: https://laya.studio/learn/expected-calibration-error - Language routing: picking the checkpoint that can read the input: https://laya.studio/learn/language-routing - Decision models for AI agents: fast judgements around a slow planner: https://laya.studio/learn/decision-models-for-ai-agents ## Comparisons - Laya vs TypeSafe Jev: which decision model should you use?: https://laya.studio/compare/laya-vs-jev - Laya vs GPT and Claude: which should classify your text?: https://laya.studio/compare/laya-vs-llm-classifiers - Laya vs a fine-tuned BERT classifier: which should you use?: https://laya.studio/compare/laya-vs-fine-tuned-bert - Laya vs zero-shot NLI classifiers: which fits your task?: https://laya.studio/compare/laya-vs-zero-shot-nli - Laya vs embeddings + kNN: which text classifier fits your task?: https://laya.studio/compare/laya-vs-embeddings-knn - TypeSafe Jev alternatives: open-source and hosted options compared: https://laya.studio/compare/jev-alternatives ## Use cases - Support ticket triage with a calibrated decision model: https://laya.studio/use-cases/support-ticket-triage - Email routing and threat triage with typed decisions: https://laya.studio/use-cases/email-routing - Intent detection with a calibrated decision model: https://laya.studio/use-cases/intent-detection - Content moderation with calibrated, typed decisions: https://laya.studio/use-cases/content-moderation - Lead scoring from free text with calibrated confidence: https://laya.studio/use-cases/lead-scoring - Agent tool routing and model-tier selection with a decision model: https://laya.studio/use-cases/agent-tool-routing - Aspect-based sentiment analysis with calibrated confidence: https://laya.studio/use-cases/sentiment-analysis - Multilingual intake without a translation step: https://laya.studio/use-cases/multilingual-intake - Patient message triage for clinics, with data kept in Switzerland: https://laya.studio/use-cases/patient-message-triage - Invoice processing decisions with a fine-tuned decision model: https://laya.studio/use-cases/invoice-processing - Security alert triage with calibrated decisions: https://laya.studio/use-cases/security-alert-triage