Quickstart
1. Create an API key
Section titled “1. Create an API key”Sign in to the Mouse API Console and create a secret key. Verified accounts start with $5.00 in free credits (~50,000 typical decisions, no credit card required).
Export your key in your shell environment:
export MOUSE_API_KEY="sk_mouse_..."2. Evaluate a state with multiple questions
Section titled “2. Evaluate a state with multiple questions”Send a state (a string, JSON object, or array) and a map of questions (choice, noul, or score) to POST https://api.mouse.dev/v1/decisions (POST /v1/systemone is also supported as an identical alias).
In the example below, we pass a support ticket and evaluate three questions in a single forward pass:
department(choice) — which team should handle the ticketfrustration(score) — where the customer falls on a 3-level rubric (0to2)is_urgent(noul) — the probability (0.0to1.0) that the issue is time-sensitive
curl https://api.mouse.dev/v1/decisions \ -H "Authorization: Bearer $MOUSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "mouse-1", "state": "Our webhook endpoint started returning 500 errors 20 minutes ago and customer orders are stuck.", "questions": { "department": { "type": "choice", "instructions": "Which team should handle this ticket?", "criteria": { "billing": "Invoices, duplicate charges, or refund requests", "technical": "Bugs, outages, or API integration failures", "sales": "Pricing, enterprise contracts, or account upgrades" } }, "frustration": { "type": "score", "instructions": "How frustrated does the customer appear?", "criteria": [ "Calm, stating facts", "Concerned or frustrated but civil", "Very angry or threatening to churn" ] }, "is_urgent": { "type": "noul", "instructions": "Does this message describe a production outage or time-sensitive blocker?" } } }'TypeScript / Node.js
Section titled “TypeScript / Node.js”const response = await fetch("https://api.mouse.dev/v1/decisions", { method: "POST", headers: { Authorization: `Bearer ${process.env.MOUSE_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ model: "mouse-1", state: "Our webhook endpoint started returning 500 errors 20 minutes ago and customer orders are stuck.", questions: { department: { type: "choice", instructions: "Which team should handle this ticket?", criteria: { billing: "Invoices, duplicate charges, or refund requests", technical: "Bugs, outages, or API integration failures", sales: "Pricing, enterprise contracts, or account upgrades", }, }, frustration: { type: "score", instructions: "How frustrated does the customer appear?", criteria: [ "Calm, stating facts", "Concerned or frustrated but civil", "Very angry or threatening to churn", ], }, is_urgent: { type: "noul", instructions: "Does this message describe a production outage or time-sensitive blocker?", }, }, }),});
if (!response.ok) { throw new Error(`Mouse API error (${response.status}): ${await response.text()}`);}
const data = await response.json();console.log("Department:", data.answers.department.choice, data.answers.department.confidence);console.log("Frustration (0..2):", data.answers.frustration.score);console.log("Urgent probability:", data.answers.is_urgent.noul);Python
Section titled “Python”import osimport requests
response = requests.post( "https://api.mouse.dev/v1/decisions", headers={"Authorization": f"Bearer {os.environ['MOUSE_API_KEY']}"}, json={ "model": "mouse-1", "state": "Our webhook endpoint started returning 500 errors 20 minutes ago and customer orders are stuck.", "questions": { "department": { "type": "choice", "instructions": "Which team should handle this ticket?", "criteria": { "billing": "Invoices, duplicate charges, or refund requests", "technical": "Bugs, outages, or API integration failures", "sales": "Pricing, enterprise contracts, or account upgrades", }, }, "frustration": { "type": "score", "instructions": "How frustrated does the customer appear?", "criteria": [ "Calm, stating facts", "Concerned or frustrated but civil", "Very angry or threatening to churn", ], }, "is_urgent": { "type": "noul", "instructions": "Does this message describe a production outage or time-sensitive blocker?", }, }, }, timeout=5.0,)response.raise_for_status()data = response.json()
print("Department:", data["answers"]["department"]["choice"])print("Frustration (0..2):", data["answers"]["frustration"]["score"])print("Urgent probability:", data["answers"]["is_urgent"]["noul"])3. Inspect the response
Section titled “3. Inspect the response”mouse-1 returns one typed answer per question key, itemized token usage (state_tokens, question_tokens, framing_tokens, cached_tokens, cost_usd), and the exact immutable snapshot ID (mouse-preview-2026-10-13):
{ "id": "dec_4c91e02ab718d30f", "object": "systemone.response", "model": "mouse-preview-2026-10-13", "answers": { "department": { "type": "choice", "choice": "technical", "confidence": 0.97, "probabilities": { "technical": 0.98, "billing": 0.01, "sales": 0.01 }, "mouse": { "calibrated": false, "p_top": 0.98, "abstain": null } }, "frustration": { "type": "score", "score": 0.72, "confidence": 0.58, "legend": { "0": "Calm, stating facts", "1": "Concerned or frustrated but civil", "2": "Very angry or threatening to churn" }, "probabilities": { "0": 0.28, "1": 0.72, "2": 0.0 }, "mouse": { "calibrated": false, "p_top": 0.72, "abstain": null } }, "is_urgent": { "type": "noul", "noul": 0.99, "mouse": { "calibrated": false, "p_top": 0.99, "abstain": null } } }, "usage": { "input_tokens": 114, "state_tokens": 23, "question_tokens": 64, "framing_tokens": 27, "image_tokens": 0, "cached_tokens": 0, "output_tokens": 0, "cost_usd": 0.0000114 }, "latency_ms": 41.6}4. Branch on answers and confidence in code
Section titled “4. Branch on answers and confidence in code”Use the returned probabilities and confidence to decide when to act automatically and when to escalate to a human or a reasoning model:
dept = data["answers"]["department"]urgent = data["answers"]["is_urgent"]["noul"]frustration = data["answers"]["frustration"]["score"]
if dept["confidence"] < 0.60: # Distribution is spread across teams; route to manual triage route_to_human_triage(ticket)elif dept["choice"] == "technical" and urgent >= 0.85: page_oncall_engineer(ticket, high_frustration=(frustration >= 1.5))else: assign_to_queue(dept["choice"], ticket)Key guarantees
Section titled “Key guarantees”- Deploy with coding agents: Using Cursor, Claude Code, or Codex? Copy the one-shot setup prompt in Build with coding agents or point your agent at
https://www.mouse.dev/llms-full.txt. - Immutable version echo: The
modelfield in the JSON body and theMouse-Model-Versionresponse header always report the exact snapshot ID (mouse-preview-2026-10-13) even when you sendmodel: "mouse-1". - Loud validation, no silent truncation: States over 65,536 tokens return
422 state_too_long. Validation errors (4xx) are never billed and never echo your request content. - Zero data retention: Every response carries
Mouse-Data-Retention: noneandCache-Control: no-store.