# Mouse Decision API (mouse-1) — Full LLM & Coding Agent Reference > `mouse-1` is a fast (~100ms) single-pass decision model for agent harnesses. Instead of generating text token by token, it reads a `state` and evaluates up to 128 typed `questions` (`choice`, `noul`, `score`) in parallel, returning calibrated probability distributions with Zero Data Retention (`Mouse-Data-Retention: none`) and $0 output token cost. ## Machine-Readable Endpoints - **Index (`llms.txt`)**: https://www.mouse.dev/llms.txt - **Complete Docs (`llms-full.txt`)**: https://www.mouse.dev/llms-full.txt - **Agent Bundle (`llm.txt` / `llm.text`)**: https://mouse.dev/llm.txt · https://mouse.dev/llm.text - **OpenAPI 3.1 Spec**: https://www.mouse.dev/openapi.json (also served at `https://api.mouse.dev/openapi.json`) - **Interactive API Reference**: https://mouse.dev/docs/api-reference - **Per-Page Raw Markdown**: Append `.md` to any docs URL (e.g. `https://mouse.dev/docs/quickstart.md`, `https://mouse.dev/docs/agents.md`) ## Quick Start for Coding Agents (Cursor, Claude Code, Codex, OpenCode) - **Base URL**: `https://api.mouse.dev` - **Primary Endpoint**: `POST https://api.mouse.dev/v1/decisions` (wire-compatible alias: `POST https://api.mouse.dev/v1/systemone`) - **Authentication**: `Authorization: Bearer $MOUSE_API_KEY` (keys start with `sk_mouse_`; create keys with $5 free starter credits at `https://www.mouse.dev/console/keys`). - **Primary Model Alias**: `mouse-1` (or `mouse`), currently resolving to immutable snapshot `mouse-preview-2026-10-13` (65,536 max `state` tokens). - **Zero Data Retention**: Every response sends `Mouse-Data-Retention: none` and `Cache-Control: no-store`. Request `state` and `questions` are never logged or stored. - **Pricing**: `$0.10` / 1M input tokens, `$0.02` / 1M cached input tokens (5-minute prefix cache on repeated `state`), `$0.00` output tokens. `4xx` errors are never billed. - **Wire Compatibility**: Wire-compatible with TypeSafe System One (`@typesafe-ai/sdk` / `typesafe-sdk`) and accepts OpenAI Decisions (`POST /v1/decisions`) field names directly. ### Why Agent Harnesses Use `mouse-1` (The Cost & Latency Lever) Every turn in an agent harness requires narrow control-flow judgments before and after the main reasoning model runs: 1. **Pre-tool safety gating & auto-approval**: Score `safe` and `destructive` `noul` predicates in ~40–100ms before executing `Bash`/`Write`/`MCP` calls. Safe calls run without interrupting the human; destructive calls return `deny` with a reason so the main model re-plans immediately. 2. **Tool & skill routing**: Score candidate MCP tools or skills with a `choice` question so you only load the relevant tool schemas into your frontier model's context window. 3. **Post-tool verification & stall detection**: Score whether test/build output actually supports the agent's completion claim before finishing a turn or burning another frontier model retry. 4. **Prompt-injection defense**: `mouse-1` treats `state` strictly as data (0% decision flip rate on planted instructions vs 65.4% on Jev). ### Endpoints | Method & Path | Auth | Description | | --- | --- | --- | | `POST /v1/decisions` (alias `/v1/systemone`) | `Bearer sk_mouse_...` | Evaluate 1 to 128 typed `choice`, `noul`, or `score` questions in parallel against `state` in a single forward pass (~100ms). | | `POST /v1/calibrations` | `Bearer sk_mouse_...` | Fit a signed confidence cutoff profile (`calp1..`) on 200 to 5,000 labeled examples (50+ per question signature) using 5-fold cross-fitting. | | `GET /v1/models` | `Bearer sk_mouse_...` | List active immutable model snapshots and alias mappings (`mouse-1`, `mouse`). | | `GET /healthz` | None | Unauthenticated liveness and region check (`{ ok: true, region: "us", engine: "modal" }`). | | `GET /openapi.json` | None | OpenAPI 3.1 specification (also served at `https://www.mouse.dev/openapi.json`). | ### Question Primitives (`POST /v1/decisions`) 1. **`choice`** — Pick one of up to 1,024 named options: - Request: `{ "type": "choice", "instructions": "Optional prompt", "criteria": { "edit": "Modify source file", "search": "Search repo", "ask": null } }` - Answer: `{ "type": "choice", "choice": "edit", "confidence": 0.865, "probabilities": { "edit": 0.91, "search": 0.07, "ask": 0.02 }, "mouse": { "calibrated": false, "p_top": 0.91, "abstain": null } }` 2. **`noul`** — Binary yes/no predicate (probability of `true` in `0.0..1.0`): - Request: `{ "type": "noul", "instructions": "Can this call run without asking the user?" }` - Answer: `{ "type": "noul", "noul": 0.03, "probabilities": { "false": 0.97, "true": 0.03 }, "mouse": { "calibrated": false, "p_top": 0.97, "abstain": null } }` 3. **`score`** — Ordered rubric of 2 to 10 concrete levels (indexed `"0"` to `"N-1"`): - Request: `{ "type": "score", "instructions": "How well does the diff satisfy the objective?", "criteria": ["Tests fail or build breaks", "Partial fix", "Addresses requirement and all checks pass"] }` - Answer: `{ "type": "score", "score": 1.88, "confidence": 0.85, "legend": { "0": "...", "1": "...", "2": "..." }, "probabilities": { "0": 0.02, "1": 0.08, "2": 0.90 }, "mouse": { "calibrated": false, "p_top": 0.90, "abstain": null } }` ### Drop-in TypeScript Client (Zero Dependencies) ```ts export async function decide>( state: unknown, questions: Q, opts?: { apiKey?: string; calibration?: string; timeoutMs?: number }, ) { const apiKey = opts?.apiKey ?? process.env.MOUSE_API_KEY; if (!apiKey) return null; const res = await fetch("https://api.mouse.dev/v1/decisions", { method: "POST", headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json", }, body: JSON.stringify({ model: "mouse-1", state, questions, ...(opts?.calibration ? { calibration: opts.calibration } : {}), }), signal: AbortSignal.timeout(opts?.timeoutMs ?? 3000), }); if (!res.ok) return null; return (await res.json()) as { id: string; object: "systemone.response"; model: string; answers: Record; usage: { input_tokens: number; state_tokens: number; question_tokens: number; framing_tokens: number; cached_tokens: number; output_tokens: number; cost_usd: number; }; latency_ms: number; }; } ``` ### Published Limits & Error Codes - **Limits**: `state` <= 65,536 tokens (never truncated; over limit returns `422 state_too_long`), `questions` <= 128 per request, `criteria` options <= 1,024 per question, body <= 4 MB, 200 RPS per key (burst 400), 20M input tokens/min per key. - **Error Envelope**: `{ "error": { "type": "...", "code": "...", "message": "...", "param": "..." } }` - `400`: `invalid_calibration_profile` - `401`: `missing_api_key`, `invalid_api_key` - `402`: `insufficient_credits` - `404`: `model_not_found` - `409`: `profile_model_mismatch` - `413`: `request_too_large` - `422`: `invalid_schema`, `state_too_long`, `too_many_questions`, `too_many_options`, `too_few_examples`, `too_many_examples`, `too_few_examples_per_question` - `429`: `rate_limited`, `token_rate_limited` (honour `Retry-After` header) - `503`: `engine_timeout` (honour `Retry-After` header) ## Copy-Paste Prompt for Coding Agents (Cursor, Claude Code, Codex) ```text Integrate the Mouse Decision API (mouse-1) into this codebase or agent harness to cut LLM decision costs and latency. Full documentation & schemas (fetch if needed, or use the specification below): - Full LLM docs: https://www.mouse.dev/llms-full.txt (also https://www.mouse.dev/llm.txt) - Docs index: https://www.mouse.dev/llms.txt - OpenAPI 3.1 spec: https://www.mouse.dev/openapi.json ## 1. Why mouse-1 in Agent Harnesses Agent harnesses make dozens of narrow control-flow decisions per run (tool/skill routing, pre-execution safety gating, prompt-injection checks, and post-tool verification). Using a generative model (Haiku, Sonnet, GPT) for these costs $1.25–$6.50 per 1,000 decisions and adds 500–2,000ms of token-generation latency per step. `mouse-1` evaluates up to 128 typed questions (`choice`, `noul`, `score`) against a `state` in a single forward pass in ~40–100ms at $0.10/1M input tokens ($0.02/1M cached within 5m, $0 output, Zero Data Retention). ## 2. Wire Contract (`POST https://api.mouse.dev/v1/decisions`, alias `/v1/systemone`) - Headers: `Authorization: Bearer $MOUSE_API_KEY` (`sk_mouse_...` from https://www.mouse.dev/console/keys, $5 free starter credits), `Content-Type: application/json` - Request body: ```json { "model": "mouse-1", "state": { "task": "Rename parseToken to verifyToken in src/auth.ts", "proposed_command": "pnpm test" }, "questions": { "next_tool": { "type": "choice", "instructions": "Which tool should handle `task` next?", "criteria": { "edit_file": "Modify source code in a file", "grep_search": "Search for symbols across the repository", "ask_user": "Ask the user for clarification" } }, "safe_to_run": { "type": "noul", "instructions": "Is `proposed_command` safe to execute without human approval?" } } } ``` - Question primitives: - `choice`: pick one of up to 1,024 named options -> `{ type: "choice", choice, confidence, probabilities, mouse: { calibrated, p_top, abstain } }` - `noul`: binary yes/no predicate -> `{ type: "noul", noul, probabilities: { false, true }, mouse }` where `noul` is P(true) in `0..1` - `score`: ordered 2–10 level rubric -> `{ type: "score", score, confidence, legend, probabilities, mouse }` ## 3. Two Ways to Integrate (Pick What Matches This Repo) ### Path A: Custom Agent Harness / Application Code (Replace LLM Classifiers & Gate Tool Loops) If this repository has an agent loop, router, classifier, or tool executor: 1. Add a zero-dependency `decide(state, questions)` client (`fetch` in TS/JS or `httpx`/`requests` in Python) calling `POST https://api.mouse.dev/v1/decisions` with `MOUSE_API_KEY` and a 3s timeout. 2. Replace slow generative classification/routing/verification prompts or wire `mouse-1` into tool routing (pruning irrelevant tools before calling the frontier model), pre-tool action gating (`allow` / `ask` / `deny`), and post-tool verification. 3. Batch independent questions for the same `state` into a single `/v1/decisions` call (`state` tokens are billed once). ### Path B: Coding Agent Lifecycle Hooks (Cursor, Claude Code, OpenCode) If the user wants to gate and auto-approve tool calls in their coding agent: - **Cursor** (`.cursor/hooks.json` `version: 1`, `beforeShellExecution` or `preToolUse`): read stdin JSON (`command` / `tool_name`), score `safe` and `destructive` `noul` questions on `mouse-1`, and print `{ "permission": "allow" | "deny" | "ask", "user_message": "...", "agent_message": "..." }`. - **Claude Code** (`.claude/settings.json`, `PreToolUse`): read stdin JSON (`tool_name`, `tool_input`, `cwd`), score on `mouse-1`, and print `{ "hookSpecificOutput": { "hookEventName": "PreToolUse", "permissionDecision": "allow" | "deny" | "ask", "permissionDecisionReason": "..." } }`. - **OpenCode** (`.opencode/plugins/mouse-gate.ts`): export a plugin function with `tool.execute.before` (throw on high `destructive` probability) and `tool.execute.after`. ## 4. Your Task Inspect this repository, implement the highest-leverage `mouse-1` integration with graceful fallback when `MOUSE_API_KEY` is unset, document `MOUSE_API_KEY` in `.env.example`, and run a test or verification check. ``` ## One-Line CLI Commands ### Claude Code ```bash claude "Fetch https://www.mouse.dev/llms-full.txt and integrate mouse-1 (POST https://api.mouse.dev/v1/decisions) into this repository to replace slow LLM classification/routing calls or gate agent tool execution, with graceful fallback and a verification test." ``` ### OpenAI Codex CLI ```bash codex "Fetch https://www.mouse.dev/llms-full.txt and integrate mouse-1 (POST https://api.mouse.dev/v1/decisions) into this repository to replace slow LLM classification/routing calls or gate agent tool execution, with graceful fallback and a verification test." ``` ### Cursor Rule (`.cursor/rules/mouse-api.mdc`) ```markdown --- description: Mouse Decision API (mouse-1) contract for agent harness routing, gating, and classification globs: "**/*" alwaysApply: false --- # Mouse Decision API (`mouse-1`) - **Docs & Full LLM Context**: https://www.mouse.dev/llms-full.txt (Index: https://www.mouse.dev/llms.txt, OpenAPI: https://www.mouse.dev/openapi.json) - **Endpoint**: `POST https://api.mouse.dev/v1/decisions` (alias `POST /v1/systemone`) with `Authorization: Bearer $MOUSE_API_KEY` (`sk_mouse_...`) - **Model**: `"mouse-1"` (immutable snapshot `mouse-preview-2026-10-13`, 65,536 max state tokens, Zero Data Retention) - **Primitives**: - `choice`: `{ type: "choice", instructions?: string, criteria: { [option]: description | null } }` -> `{ choice, confidence, probabilities, mouse }` - `noul`: `{ type: "noul", instructions: string, criteria?: { true?: string, false?: string } }` -> `{ noul, probabilities, mouse }` (`noul` in `0..1` is P(true)) - `score`: `{ type: "score", instructions?: string, criteria: string[] }` (2-10 concrete ordered levels) -> `{ score, confidence, legend, probabilities, mouse }` - **Harness Rules**: 1. **Speculative fan-out**: Batch all independent questions for the same `state` into one `/v1/decisions` request (`state` is billed once at $0.10/1M input, $0.02/1M cached within 5m, $0 output). 2. **Three-band gating**: Auto-allow when `safe >= 0.85` and `destructive < 0.50`; deny (with an agent reason so the model re-plans) when `destructive >= 0.50`; otherwise prompt the human (`ask`). ``` ## Documentation Index - [Overview](https://mouse.dev/docs) ([raw .md](https://mouse.dev/docs.md)) — mouse-1 scores agent options in one forward pass (~100ms) and returns calibrated probabilities with zero data retention. - [API reference](https://mouse.dev/docs/api-reference) ([raw .md](https://mouse.dev/docs/api-reference.md)) — Complete HTTP API reference for mouse-1 — POST /v1/systemone, POST /v1/calibrations, GET /v1/models, and GET /healthz. - [Agent harness integration](https://mouse.dev/docs/agents) ([raw .md](https://mouse.dev/docs/agents.md)) — Save up to 65x on decision tokens and cut loop latency by wiring mouse-1 into Cursor, Claude Code, OpenCode, or your own agent harness. - [Quickstart](https://mouse.dev/docs/quickstart) ([raw .md](https://mouse.dev/docs/quickstart.md)) — Make your first mouse-1 decision call in under a minute. - [Authentication](https://mouse.dev/docs/authentication) ([raw .md](https://mouse.dev/docs/authentication.md)) — Bearer authentication, CRC32 checksum validation, SHA-256 storage, and key lifecycle. - [SDKs and compatibility](https://mouse.dev/docs/compatibility) ([raw .md](https://mouse.dev/docs/compatibility.md)) — Use standard HTTP clients or existing System One SDKs in TypeScript and Python by changing the base URL. - [Question types](https://mouse.dev/docs/concepts/questions) ([raw .md](https://mouse.dev/docs/concepts/questions.md)) — How choice, noul, and score primitives work, how confidence is calculated, and how to use structured criteria. - [State and fan-out](https://mouse.dev/docs/concepts/state) ([raw .md](https://mouse.dev/docs/concepts/state.md)) — Structure your state as text or JSON, reference nested paths in backticks, and evaluate up to 128 independent questions in one forward pass. - [Calibration and abstain](https://mouse.dev/docs/concepts/calibration) ([raw .md](https://mouse.dev/docs/concepts/calibration.md)) — Fit out-of-fold confidence cutoffs on your own labeled data with POST /v1/calibrations and branch on mouse.abstain. - [Models and versioning](https://mouse.dev/docs/concepts/versions) ([raw .md](https://mouse.dev/docs/concepts/versions.md)) — Immutable model snapshots, the mouse-1 alias, and version pinning. - [Tool routing](https://mouse.dev/docs/guides/tool-routing) ([raw .md](https://mouse.dev/docs/guides/tool-routing.md)) — Route agent turns across tools, MCP servers, and skills in one forward pass with speculative fan-out. - [Action gating](https://mouse.dev/docs/guides/gating) ([raw .md](https://mouse.dev/docs/guides/gating.md)) — Gate shell commands, git pushes, and external connector writes using risk-scaled confidence bands. - [Verifying tool results](https://mouse.dev/docs/guides/verification) ([raw .md](https://mouse.dev/docs/guides/verification.md)) — Check whether diffs and test logs satisfy task requirements using atomic noul and composite score questions. - [Prompt injection resistance](https://mouse.dev/docs/guides/injection) ([raw .md](https://mouse.dev/docs/guides/injection.md)) — Keep untrusted web pages, GitHub issues, emails, and tool outputs from hijacking agent control flow. - [Calibrating on your labels](https://mouse.dev/docs/guides/calibrate) ([raw .md](https://mouse.dev/docs/guides/calibrate.md)) — Fit a signed calibration profile on 200+ labeled examples and automate decisions at a guaranteed target error rate. - [Migrate from TypeSafe or OpenAI](https://mouse.dev/docs/guides/migrate) ([raw .md](https://mouse.dev/docs/guides/migrate.md)) — Side-by-side API comparison and migration guide from TypeSafe Jev (System One), OpenAI Decisions (gpt-6-luna), and LLM classifiers. - [Errors](https://mouse.dev/docs/reference/errors) ([raw .md](https://mouse.dev/docs/reference/errors.md)) — Single error envelope, status codes, ZDR error handling, and retry policy. - [Rate limits](https://mouse.dev/docs/reference/limits) ([raw .md](https://mouse.dev/docs/reference/limits.md)) — Published payload limits, token-bucket rate limits, and x-ratelimit-* headers. - [Pricing and billing](https://mouse.dev/docs/reference/pricing) ([raw .md](https://mouse.dev/docs/reference/pricing.md)) — Transparent single price list, exact token accounting formula, prefix caching, and prepaid billing. - [Data retention and security](https://mouse.dev/docs/reference/security) ([raw .md](https://mouse.dev/docs/reference/security.md)) — Enforced zero data retention (ZDR) by default, in-memory prefix cache architecture, and key security. - [Changelog](https://mouse.dev/docs/changelog) ([raw .md](https://mouse.dev/docs/changelog.md)) — Releases and updates for mouse-1 and the Mouse API. - [Jaggedness and limitations](https://mouse.dev/docs/concepts/jaggedness) ([raw .md](https://mouse.dev/docs/concepts/jaggedness.md)) — Where mouse-1 excels, its known failure modes on arithmetic and counting, and when a supervised fixed-label classifier is a better fit. --- # Overview Source: https://mouse.dev/docs (https://mouse.dev/docs.md) > mouse-1 scores agent options in one forward pass (~100ms) and returns calibrated probabilities with zero data retention. `mouse-1` is a decision model built for agent harnesses and AI-powered software. Instead of generating text token by token and parsing prose back into control flow, it reads your `state` and evaluates up to 128 typed `questions` in a single non-autoregressive forward pass—returning a calibrated probability distribution across your options in ~40–100 ms. Keep control flow, deterministic rules, and side effects in your application code. Call `mouse-1` at narrow decision points where your system needs programmable common sense over unstructured text or structured program state. ## Primitives Every question in a request uses one of three primitives, and every answer returns a constrained, schema-valid distribution: | Primitive | Question asks | Answer fields | Maps in code to | | --- | --- | --- | --- | | [`choice`](/docs/concepts/questions#choice) | Which of these named options (up to 1,024)? | `choice`, `probabilities`, `confidence`, `mouse` | `switch` / router | | [`noul`](/docs/concepts/questions#noul) | Is this binary condition true? | `noul` (`0.0` to `1.0`), `mouse` | `if` / gate | | [`score`](/docs/concepts/questions#score) | Which of these 2–10 ordered rubric levels applies? | `score`, `legend`, `probabilities`, `confidence`, `mouse` | threshold / rank key | Every question in a single `POST /v1/decisions` (or `POST /v1/systemone`) call is evaluated **in parallel and in isolation** against the same `state`: - **Speculative fan-out is nearly free:** `state` tokens are billed once per request regardless of how many questions you attach. Ask every question a downstream branch might need and let your code ignore the rest. - **No cross-question contamination:** Adding or removing a question never shifts another question's probabilities. - **5-minute prefix caching:** Repeating the same `state` within 5 minutes bills `state_tokens` at the cached rate (**$0.02 / 1M** instead of **$0.10 / 1M**). - **Calibrated abstention:** Fit a signed `calp1.` profile on 200+ of your own labeled examples via `POST /v1/calibrations` so every answer includes `mouse.abstain` (`true` when top probability falls below the out-of-fold cutoff for your target error rate). - **Zero data retention by default:** Every request sends `Mouse-Data-Retention: none` and `Cache-Control: no-store`. Request states, questions, answers, and calibration examples are never logged or stored. ## Endpoints Base URL: `https://api.mouse.dev` (US-East) | Method & path | Description | | --- | --- | | [`POST /v1/decisions`](/docs/api-reference#post-v1systemone) | Evaluate `choice`, `noul` (yes/no), and `score` questions in parallel against a `state` (`POST /v1/systemone` is served as an identical alias for TypeSafe System One SDKs). | | [`POST /v1/calibrations`](/docs/api-reference#post-v1calibrations) | Fit a signed confidence cutoff profile (`calp1.`) on 200–5,000 labeled examples using 5-fold out-of-fold cross-fitting. | | [`GET /v1/models`](/docs/api-reference#get-v1models) | List immutable model snapshots (`mouse-preview-2026-10-13`) and active aliases (`mouse-1`, `mouse`). | | [`GET /healthz`](/docs/api-reference#get-healthz) | Unauthenticated liveness and region probe. | ## Example request This single request routes an agent turn across four tools (`choice`) and checks whether a proposed shell command is safe to run without human approval (`noul`): ```bash curl https://api.mouse.dev/v1/decisions \ -H "Authorization: Bearer $MOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "mouse-1", "state": { "task": "Rename exported function `parseToken` to `verifyToken` in src/auth.ts.", "proposed_command": "pnpm --filter @mouse/relay test" }, "questions": { "next_tool": { "type": "choice", "instructions": "Which tool should handle `task` next?", "criteria": { "edit_file": "Modify source code in a file", "grep_search": "Search for symbols across the repository", "run_tests": "Execute the test suite", "ask_user": "Ask the user for clarification" } }, "safe_to_run": { "type": "noul", "instructions": "Is `proposed_command` safe to run without human approval?" } } }' ``` ## Example response ```json { "id": "dec_8f92a1c04e1b902d", "object": "systemone.response", "model": "mouse-preview-2026-10-13", "answers": { "next_tool": { "type": "choice", "choice": "edit_file", "confidence": 0.88, "probabilities": { "edit_file": 0.91, "grep_search": 0.06, "run_tests": 0.02, "ask_user": 0.01 }, "mouse": { "calibrated": false, "p_top": 0.91, "abstain": null } }, "safe_to_run": { "type": "noul", "noul": 0.98, "mouse": { "calibrated": false, "p_top": 0.98, "abstain": null } } }, "usage": { "input_tokens": 74, "state_tokens": 26, "question_tokens": 26, "framing_tokens": 22, "image_tokens": 0, "cached_tokens": 0, "output_tokens": 0, "cost_usd": 0.0000074 }, "latency_ms": 38.2 } ``` ## Next steps - **[Quickstart](/docs/quickstart)** — Create an API key and run your first multi-question call in 60 seconds. - **[Build with coding agents](/docs/agents)** — Copy one prompt to deploy `mouse-1` using Cursor, Claude Code, or Codex, or point your agent at [`/llms-full.txt`](/llms-full.txt) and [`/llm.txt`](/llm.txt). - **[API Reference](/docs/api-reference)** — Complete request schemas, answer shapes, headers, and status codes. - **[Question types](/docs/concepts/questions)** — Learn how `choice`, `noul`, and `score` map to control flow and how `confidence` is calculated. - **[Migrate from Jev or OpenAI Decisions](/docs/guides/migrate)** — Side-by-side comparison and migration recipes. - **[Console Playground](/console/playground)** — Test states and questions interactively in your browser. # API reference Source: https://mouse.dev/docs/api-reference (https://mouse.dev/docs/api-reference.md) > Complete HTTP API reference for mouse-1 — POST /v1/systemone, POST /v1/calibrations, GET /v1/models, and GET /healthz. Evaluate a `state` against a map of typed `questions` (`choice`, `noul`, `score`) in a single forward pass (~40–100 ms) and receive structured `answers` with calibrated probability distributions. - **Base URL:** `https://api.mouse.dev` (US-East) - **Authentication:** `Authorization: Bearer sk_mouse_...` ([create an API key](/console/keys)) - **Data retention:** Zero data retention by default on every request (`Mouse-Data-Retention: none`, `Cache-Control: no-store`) - **OpenAPI 3.1 spec:** [`/openapi.json`](/openapi.json) · **Interactive Playground:** [`/console/playground`](/console/playground) | Method & endpoint | Auth | Description | | --- | --- | --- | | [`POST /v1/decisions`](#post-v1systemone) | `Bearer sk_mouse_...` | Evaluate 1 to 128 typed `choice`, `noul` (yes/no), and `score` questions in parallel against a `state` (`POST /v1/systemone` is served as an identical alias). | | [`POST /v1/calibrations`](#post-v1calibrations) | `Bearer sk_mouse_...` | Fit a signed confidence cutoff profile (`calp1.`) on 200–5,000 labeled examples using 5-fold out-of-fold cross-fitting. | | [`GET /v1/models`](#get-v1models) | `Bearer sk_mouse_...` | List immutable model versions (`mouse-preview-2026-10-13`) and current aliases (`mouse-1`, `mouse`). | | [`GET /healthz`](#get-healthz) | None | Unauthenticated liveness and region probe. | --- ## `POST /v1/systemone` Evaluate up to 128 typed `questions` in parallel and in isolation against a shared `state`. ```http POST https://api.mouse.dev/v1/systemone Authorization: Bearer Content-Type: application/json ``` ### Request body | Property | Type | Required | Default | Description | | --- | --- | --- | --- | --- | | `state` | `string \| object \| array \| number \| boolean` | **Required** | — | The content to evaluate (up to **65,536 tokens**). Pass a string for a single message or passage, or a JSON object/array for structured application state, tool proposals, and records. Never truncated; states over 65,536 tokens return `422 state_too_long`. | | `questions` | `Record` | **Required** | — | Non-empty map of 1 to **128** question IDs you choose to typed [`ChoiceQuestion`](#choice-question), [`NoulQuestion`](#noul-question), or [`ScoreQuestion`](#score-question) objects. Question IDs are returned as keys in `answers` and are not sent to the model during inference. | | `model` | `string` | Optional | `"mouse-1"` | Model alias (`"mouse-1"`, `"mouse"`) or immutable snapshot ID (`"mouse-preview-2026-10-13"`). | | `calibration` | `string \| null` | Optional | `null` | Optional signed calibration profile token (`"calp1.."`) returned by [`POST /v1/calibrations`](#post-v1calibrations). | | `order_invariant` | `boolean` | Optional | `false` | Score every multi-option `choice` question a second time with its options reversed and average the two distributions, removing option-order sensitivity. The reversed questions are billed again (their `question_tokens` and `framing_tokens` roughly double); the `state` prefix is shared and billed once. `noul` and `score` are never permuted. | Unknown top-level fields (for example `"temperature"`) are ignored and listed in the response's `warnings` array. Unknown fields inside a question object are refused with `422 invalid_schema`. #### Accepted aliases So that a migration is a base-URL change, the request parser also accepts, and normalizes before validation: | You send | Read as | | --- | --- | | `input` | `state` | | `questions` as an array of objects carrying `id` or `name` | `questions` map keyed by that `id`/`name` | | `type: "predicate"` or `type: "boolean"` | `type: "noul"` | | `text` | `instructions` | | `options: ["a", "b"]` | `criteria: { "a": null, "b": null }` | | `choices: [{ value, description }]` | `criteria: { [value]: description }` | | `levels: [{ label, description }]` | `criteria: ["