Skip to content
Get API key

API reference

Evaluate a state against a map of typed questions (choice, noul, score) in one request (~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)
  • Data retention: Zero data retention by default on every request (Mouse-Data-Retention: none, Cache-Control: no-store)
  • OpenAPI 3.1 spec: /openapi.json · Interactive Playground: /console/playground
Method & endpointAuthDescription
POST /v1/decisionsBearer sk_mouse_...Evaluate 1 to 128 typed choice, noul (yes/no), and score questions in parallel against a state.
POST /v1/safeguardsBearer sk_mouse_...Judge proposed tool calls against plain-English hard_deny / soft_deny / allow rules and return Claude Code's safeguard_results (flagged, not_flagged, or unavailable).
POST /v1/calibrationsBearer sk_mouse_...Fit a signed confidence cutoff profile (calp1.) on 200–400 labeled examples using 5-fold out-of-fold cross-fitting.
POST /v1/tuningsBearer sk_mouse_...Tune the base model on 200+ labeled examples and get a tenant model id (mouse-1:ft-<suffix>-<id>); dry_run: true returns a quote.
GET /v1/tuningsBearer sk_mouse_...List the account's tunings.
GET /v1/tunings/{id}Bearer sk_mouse_...One tuning with its held-out before/after report.
DELETE /v1/tunings/{id}Bearer sk_mouse_...Remove the adapter and stop hosting.
GET /v1/modelsBearer sk_mouse_...List immutable model versions (mouse-preview-2026-10-13), current aliases (mouse-1, mouse), and the account's tuned models.
GET /healthzNoneUnauthenticated liveness and region probe.

Evaluate up to 128 typed questions in parallel and in isolation against a shared state. TypeSafe SDKs that call /v1/systemone reach the same handler; see SDKs and compatibility.

POST https://api.mouse.dev/v1/decisions
Authorization: Bearer <MOUSE_API_KEY>
Content-Type: application/json
PropertyTypeRequiredDefaultDescription
statestring | object | array | number | booleanRequired—The content to evaluate (up to 16,384 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 16,384 tokens return 422 state_too_long.
questionsRecord<string, Question>Required—Non-empty map of 1 to 128 question IDs you choose to typed ChoiceQuestion, NoulQuestion, or ScoreQuestion objects. Question IDs are returned as keys in answers and are not sent to the model during inference.
modelstringOptional"mouse-1"Model alias ("mouse-1", "mouse"), immutable snapshot ID ("mouse-preview-2026-10-13"), a tuned model id ("mouse-1:ft-acme-7f3a2c"), or a tuned alias ("mouse-1:ft-acme", the newest published tuning with that suffix). See POST /v1/tunings.
calibrationstring | nullOptionalnullOptional signed calibration profile token ("calp1.<kid>.<blob>") returned by POST /v1/calibrations.
imagesstring[]Optional[]Up to 8 still images every question sees, as base64 data URLs (data:image/png;base64,...; PNG, JPEG or WebP; animated files are refused). Placed before state in the prompt, in array order; resized to 0.07–1.6 MP (an image under 65,536 pixels is accepted with a warnings entry); billed once per request as usage.image_tokens. EXIF orientation is not applied. See Images.
storebooleanOptionalfalseKeep this request's state and questions (AES-256-GCM, 30 days) under the response id, so you can post what happened to POST /v1/decisions/{id}/outcome and tune on it. The response then carries stored: { expires_at } and Mouse-Data-Retention: 30d. Text only: refused with images.
episodestringOptionalnullYour task or session id (up to 128 characters), kept with a stored decision. A tuning holds out whole episodes, so near-identical decisions from one task never sit on both sides of its held-out check.
order_invariantbooleanOptionalfalseScore 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, as is every image under 65,536 pixels. Unknown fields inside a question object are refused with 422 invalid_schema.

So that a migration is a base-URL change, the request parser also accepts, and normalizes before validation:

You sendRead as
inputstate
questions as an array of objects carrying id or namequestions map keyed by that id/name
type: "predicate" or type: "boolean"type: "noul"
textinstructions
options: ["a", "b"]criteria: { "a": null, "b": null }
choices: [{ value, description }]criteria: { [value]: description }
levels: [{ label, description }]criteria: ["<label>: <description>", ...]

Aliases change only how the request is read; the response is always the Mouse shape documented below.

Example request (cURL, TypeScript, Python)

Section titled “Example request (cURL, TypeScript, Python)”
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?"
},
"blast_radius": {
"type": "score",
"instructions": "What is the impact of `proposed_command`?",
"criteria": [
"Read-only inspection or local test execution",
"Reversible local workspace edit",
"Irreversible deletion, remote git push, or external mutation"
]
}
}
}'
const res = 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: {
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?",
},
blast_radius: {
type: "score",
instructions: "What is the impact of `proposed_command`?",
criteria: [
"Read-only inspection or local test execution",
"Reversible local workspace edit",
"Irreversible deletion, remote git push, or external mutation",
],
},
},
}),
});
const data = await res.json();
console.log(data.answers.next_tool.choice, data.answers.safe_to_run.noul);
import os
import requests
res = requests.post(
"https://api.mouse.dev/v1/decisions",
headers={"Authorization": f"Bearer {os.environ['MOUSE_API_KEY']}"},
json={
"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?",
},
"blast_radius": {
"type": "score",
"instructions": "What is the impact of `proposed_command`?",
"criteria": [
"Read-only inspection or local test execution",
"Reversible local workspace edit",
"Irreversible deletion, remote git push, or external mutation",
],
},
},
},
timeout=5.0,
)
print(res.json()["answers"])

A Question is one of three primitives determined by its type field ("choice", "noul", or "score").

All three primitives accept instructions as a string, a structured object, an array, or null. Point a question at a specific nested field inside state (or inside a structured instructions object) using backticks, such as "Does `ticket.messages[0].text` request a refund?".

Picks one option from a set of 1 to 255 named options and returns the full probability distribution.

PropertyTypeRequiredDescription
type"choice"RequiredAlways "choice".
criteriaRecord<string, string | object | array | null>RequiredMap of option keys to rubric descriptions. Use null when an option key needs no extra detail. Passing an array instead of an object returns 422 invalid_schema.
instructionsstring | object | array | nullOptionalWhat the model should decide.
{
"department": {
"type": "choice",
"instructions": "Which team should handle this ticket?",
"criteria": {
"billing": "Payments, invoices, duplicate charges, or refunds",
"technical": "Bugs, outages, or API integration problems",
"sales": "Pricing, upgrades, or new accounts"
}
}
}

Evaluates a yes/no predicate and returns the probability (0.0 to 1.0) that the statement is true (yes).

PropertyTypeRequiredDescription
type"noul"RequiredAlways "noul".
instructionsstring | object | array | nullOptionalThe yes/no question or statement to evaluate against state. Phrase positively so a value near 1.0 means yes.
criteria{ "true"?: JSONContent, "false"?: JSONContent } | nullOptionalOptional descriptions clarifying what "true" (yes, near 1.0) and "false" (no, near 0.0) mean. Only "true" and "false" keys are allowed.
{
"is_urgent": {
"type": "noul",
"instructions": "Does this message convey time-sensitive urgency?",
"criteria": {
"true": "Production outage, blocked customers, or explicit deadline",
"false": "Routine question, feature request, or non-blocking issue"
}
}
}

Rates the state along an ordered rubric of 2 to 10 concrete levels (0 to N - 1).

PropertyTypeRequiredDescription
type"score"RequiredAlways "score".
criteriaArray<string | object | array>RequiredOrdered array of 2 to 10 level descriptions from lowest (0) to highest (N - 1). Describe concrete situations rather than bare numbers.
instructionsstring | object | array | nullOptionalWhat dimension the model should rate.
{
"frustration": {
"type": "score",
"instructions": "How frustrated does the customer appear?",
"criteria": [
"Calm, stating facts",
"Frustrated but civil",
"Very angry or threatening to leave"
]
}
}

PropertyTypeDescription
idstringUnique decision identifier ("dec_...").
object"systemone.response"Fixed object type string.
modelstringExact immutable model snapshot ID that evaluated the request ("mouse-preview-2026-10-13"). Also echoed in the Mouse-Model-Version HTTP header.
answersRecord<string, Answer>One typed ChoiceAnswer, NoulAnswer, or ScoreAnswer per question, keyed by the same IDs you passed in questions.
usageUsageItemized token counts and exact USD cost for the request.
latency_msnumberEnd-to-end server evaluation latency in milliseconds.
warningsstring[] (optional)Present only when unknown top-level request fields were ignored.

Every answer carries a type matching its question, the full probabilities distribution, the raw logits behind it (softmax(logits) == probabilities), and a mouse metadata object ({ calibrated, p_top, abstain, confidence_winning, confidence_normalized }). choice and score answers also carry a top-level confidence (0.0 to 1.0).

Log logits and model together if you fit thresholds or calibrators offline; probabilities alone lose the scale.

PropertyTypeDescription
type"choice"Always "choice".
choicestringThe highest-probability option key from criteria.
probabilitiesRecord<string, number>Every option key mapped to its probability (0.0 to 1.0, summing to 1.0).
logitsRecord<string, number>Every option key mapped to its raw log-score.
confidencenumberNormalized concentration score in 0.0 to 1.0: ((p_{\max} - 1/k) / (1 - 1/k)) for (k) options (0.0 for an even split, 1.0 when all probability is on one option).
mouseMouseAnswerMeta{ calibrated, p_top, abstain, confidence_winning, confidence_normalized }.
{
"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
},
"logits": {
"edit_file": 2.41,
"grep_search": -0.31,
"run_tests": -1.41,
"ask_user": -2.1
},
"mouse": {
"calibrated": false,
"p_top": 0.91,
"abstain": null,
"confidence_winning": 0.91,
"confidence_normalized": 0.88
}
}
PropertyTypeDescription
type"noul"Always "noul".
noulnumberThe yes/no probability on a scale from 0.0 (false / no) to 1.0 (true / yes). A value near 0.5 indicates equal probability for yes and no (certainty is (|2 \cdot \text{noul} - 1|), also returned as mouse.confidence_normalized).
probabilities{ "false": number, "true": number }The same distribution in the shape choice uses: { "false": 1 - noul, "true": noul }.
logits{ "false": number, "true": number }Raw log-scores for each side.
mouseMouseAnswerMeta{ calibrated, p_top, abstain, confidence_winning, confidence_normalized }, where p_top = max(noul, 1 - noul).
{
"type": "noul",
"noul": 0.98,
"probabilities": { "false": 0.02, "true": 0.98 },
"logits": { "false": -1.95, "true": 1.94 },
"mouse": {
"calibrated": false,
"p_top": 0.98,
"abstain": null,
"confidence_winning": 0.98,
"confidence_normalized": 0.96
}
}
PropertyTypeDescription
type"score"Always "score".
scorenumberProbability-weighted mean level index: (\sum_{i=0}^{k-1} i \cdot p_i), landing continuously between 0.0 and k - 1.
legendRecord<string, JSONContent>Each string level index ("0", "1", …) mapped back to its description from criteria.
probabilitiesRecord<string, number>Each string level index ("0", "1", …) mapped to its probability (summing to 1.0).
logitsRecord<string, number>Each string level index mapped to its raw log-score.
confidencenumberOrdinal concentration score in 0.0 to 1.0: (\max(0, 1 - \sum_i p_i |i - m| / \text{MAD}_{\text{unif}})), where (m) is the most likely level.
mouseMouseAnswerMeta{ calibrated, p_top, abstain, confidence_winning, confidence_normalized }.
{
"type": "score",
"score": 0.04,
"confidence": 0.94,
"legend": {
"0": "Read-only inspection or local test execution",
"1": "Reversible local workspace edit",
"2": "Irreversible deletion, remote git push, or external mutation"
},
"probabilities": {
"0": 0.96,
"1": 0.04,
"2": 0.0
},
"logits": {
"0": 3.18,
"1": 0.0,
"2": -6.9
},
"mouse": {
"calibrated": false,
"p_top": 0.96,
"abstain": null,
"confidence_winning": 0.96,
"confidence_normalized": 0.94
}
}
PropertyTypeDescription
calibratedbooleantrue when a calibration profile was passed on the request and matched this question's signature, or when a tuned model answered this question (its temperature is fitted on your held-out examples; abstain stays null without a profile). When true, probabilities (and every field derived from them) are temperature-scaled on your labels.
p_topnumberTop outcome probability ((\max_i p_i)).
abstainboolean | nullnull when uncalibrated; true when p_top is below the profile's fitted cutoff (signaling your code to escalate or fall back); false when p_top >= cutoff.
confidence_winningnumberThe winning-probability convention ((\max_i p_i)), as Cloudflare Clef reports confidence. Equal to p_top; named so a Clef threshold ports without arithmetic.
confidence_normalizednumberThe normalized convention ((p_{\max} - 1/k) / (1 - 1/k)), as TypeSafe reports confidence, on every answer type including noul.

Both conventions are present because the same distribution reads differently under each: (0.80, 0.15, 0.05) is 0.80 winning and 0.70 normalized, so a 0.75 threshold flips depending on which one a vendor calls confidence. Threshold on the convention your labels were fitted against, or on the full probabilities.

PropertyTypeDescription
input_tokensintegerTotal billed input tokens: state_tokens + question_tokens + framing_tokens + image_tokens.
state_tokensintegerTokens in state (counted once per request regardless of how many questions are evaluated).
question_tokensintegerTokens across all question instructions and criteria.
framing_tokensintegerStructural delimiter tokens: 4 per request + 3 per question + 2 per option (2 options per noul).
image_tokensintegerTokens across all images (0 when the request has none). Counted once per request, like state. See Images.
output_tokensintegerAlways 0 (output is free).
cost_usdnumberExact USD cost for the request (input_tokens * 0.10 / 1_000_000).

Judge one or more proposed tool calls against plain-English rules. The response uses the safeguard_results format that Claude Code reads in auto mode. See Tool-call safeguards for setup and examples.

POST https://api.mouse.dev/v1/safeguards
Authorization: Bearer <MOUSE_API_KEY>
Content-Type: application/json
PropertyTypeRequiredDefaultDescription
tool_uses{ id, name, input }[]Required—1 to 32 tool calls to judge. Ids must be unique.
messagesMessage[]Optional[]The conversation in Anthropic Messages format. Only user text and earlier tool_use blocks are read.
rulesRuleSetOptionalDefault rulesReplaces the default rules. Needs at least one hard_deny or soft_deny rule.
mode"enforce" | "audit"Optional"enforce"In audit, every call returns not_flagged and mouse.tool_uses[id].would_flag holds the real result.
timeout_msintegerOptional10000Time budget for the whole request, 200 to 30000. Calls not judged in time return unavailable.
modelstringOptional"mouse-1"Model alias or snapshot ID.

RuleSet has four optional lists: environment (up to 50 strings, 2,000 characters each), hard_deny, soft_deny and allow (up to 100 rules each). A rule is a string or an object:

PropertyTypeRequiredDescription
idstringRequiredLetters, digits, _, . and -, up to 64 characters. Unique across all tiers. none and user_boundary are reserved. A string rule gets the id <tier>_<index>.
instructionsstringRequiredWhat a matching call does, up to 8,000 characters.
namestringOptionalShort label shown in explanation.
thresholdnumberOptionalProbability at which the rule matches. Default 0.6 for deny tiers and 0.7 for allow.
PropertyTypeDescription
idstringUnique identifier ("sg_...").
object"safeguards.response"Fixed object type string.
modelstringModel snapshot ID that judged the request.
safeguard_resultsSafeguardResult[]One dangerous_tool_use entry. status.tool_uses maps each tool call id to { "type": "evaluated", "outcome": "flagged" | "not_flagged", "explanation"? } or { "type": "unavailable", "reason": "timeout" | "truncated" | "error" }. Return it to Claude Code unchanged.
mouseobjectmode, rules ("default" or "request"), and tool_uses: per call, the deciding tier (decision), the deciding rule, would_flag, the probability of each deny rule (deny), of explicit user intent (explicit_intent) and of each allow rule (allow), truncated, latency_ms, and unavailable.
usageUsageTokens and cost for the passes that ran. Calls that returned unavailable are not billed.
latency_msnumberServer latency in milliseconds.
warningsstring[] (optional)Unknown top-level request fields that were ignored.

Score 200 to 400 labeled examples and fit a signed confidence cutoff profile (calp1.<kid>.<blob>) using 5-fold out-of-fold cross-fitting. Examples are evaluated in memory and discarded immediately (Mouse-Data-Retention: none).

POST https://api.mouse.dev/v1/calibrations
Authorization: Bearer <MOUSE_API_KEY>
Content-Type: application/json
PropertyTypeRequiredDefaultDescription
examplesCalExample[]Required—Array of 200 to 400 labeled examples. Each distinct question signature requires 50+ labeled examples to be fitted.
modelstringOptional"mouse-1"Model alias or snapshot ID. The returned profile is cryptographically bound to the resolved snapshot ID.
target_errornumberOptional0.05Maximum acceptable error rate (0.0 < target_error < 0.5) among non-abstained predictions.

Each item in examples contains state and questions, where each question includes its ground-truth label:

  • Labeled choice (CalChoice): label is a string matching one of the option keys in criteria.
  • Labeled noul (CalNoul): label is a boolean (true or false).
  • Labeled score (CalScore): label is an integer level index in 0 .. len(criteria) - 1.
curl https://api.mouse.dev/v1/calibrations \
-H "Authorization: Bearer $MOUSE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mouse-1",
"target_error": 0.05,
"examples": [
{
"state": "Customer was charged twice for order #1042.",
"questions": {
"intent": {
"type": "choice",
"instructions": "What does the customer need?",
"criteria": {
"billing": "A charge, invoice, or refund issue",
"shipping": "Delivery status or tracking",
"account": "Login or profile settings"
},
"label": "billing"
}
}
}
]
}'
PropertyTypeDescription
object"calibration"Fixed object type string.
modelstringImmutable snapshot ID this profile was fitted against ("mouse-preview-2026-10-13").
target_errornumberTarget error rate used to select the abstention cutoff.
profilestringHMAC-SHA256 signed profile token ("calp1.<kid>.<blob>"). Pass as calibration on POST /v1/decisions.
n_examplesintegerTotal labeled examples processed.
questionsCalibrationQuestionReport[]Per-question-signature report (signature, type, question_ids, status, before, and after metrics including the fitted temperature, cutoff, and 5-fold out-of-fold coverage_at_target_error and error_when_covered).
notestringOut-of-fold methodology and zero-data-retention note.
usageUsageItemized token counts and USD cost for scoring the calibration examples.
{
"object": "calibration",
"model": "mouse-preview-2026-10-13",
"target_error": 0.05,
"profile": "calp1.k1.eyJmaXRzIjpb...",
"n_examples": 250,
"questions": [
{
"signature": "4f8c12a90e3b7104",
"type": "choice",
"question_ids": ["intent"],
"status": "fitted",
"before": {
"accuracy": 0.912,
"ece": 0.031,
"brier": 0.142,
"nll": 0.264,
"mean_confidence": 0.938,
"coverage": 1.0,
"cutoff": null,
"n": 250
},
"after": {
"accuracy": 0.912,
"ece": 0.031,
"brier": 0.142,
"nll": 0.264,
"mean_confidence": 0.938,
"coverage": 0.864,
"cutoff": 0.78,
"n": 250,
"coverage_at_target_error": 0.856,
"error_when_covered": 0.0421
}
}
],
"note": "'coverage_at_target_error' and 'error_when_covered' are 5-fold out-of-fold. Examples were not stored.",
"usage": {
"input_tokens": 14500,
"state_tokens": 3500,
"question_tokens": 7750,
"framing_tokens": 3250,
"image_tokens": 0,
"output_tokens": 0,
"cost_usd": 0.00145
}
}

Train a tenant model on your stored, labelled decisions or on a file of labelled examples, and get back a model id you can send as model on POST /v1/decisions. Posted examples are the job's input and are never stored. The job's output is a model scoped to your account, plus a report. Plain-words walkthrough: Tuning on your outcomes.

POST https://api.mouse.dev/v1/tunings
Authorization: Bearer <MOUSE_API_KEY>
Content-Type: application/json
PropertyTypeRequiredDefaultDescription
outcomes{ question_ids?, since? }One of outcomes / examples—Train on your stored decisions that have outcomes (store: true plus POST /v1/decisions/{id}/outcome), newest first: up to 5,000 for readout, 20,000 for LoRA. question_ids trains only those questions; since (ISO 8601) skips older decisions. {} uses everything labelled.
examplesCalExample[]One of outcomes / examples—Labeled examples, the same shape as POST /v1/calibrations: state, questions, a label on every question, and an optional episode. 200 to 5,000 for readout, 1,000 to 20,000 for LoRA; at most 30,000,000 example tokens per job.
modelstringOptional"mouse-1"The base to tune. Only "mouse-1" (or its current snapshot) is accepted.
method"readout" | "lora"Optionalreadout up to 5,000 examples, lora abovereadout refits the decision layer and serves at the base model's latency. lora fits the readout first, then trains a low-rank adapter on top and keeps it only if it beats the readout tune on the held-out fold; it serves on the slower eager path (roughly 110–130 ms).
suffixstringOptional"model"1 to 24 lowercase letters, digits, or hyphens. Becomes part of the model id (mouse-1:ft-<suffix>-<6 hex>) and the alias (mouse-1:ft-<suffix>).
baselinestringOptionalnullA ready tuning of yours (tune_..., its model id, or its alias). The new model is published only if it beats this one on the new held-out fold, and the alias moves only then.
dry_runbooleanOptionalfalseReturn a quote instead of starting the job. Nothing is billed.
PropertyTypeDescription
methodstringThe method that would run.
examplesintegerExamples accepted.
training_tokensintegerTokens of the training fold (80% of the examples), times 2 epochs for LoRA.
gpu_seconds_est, gpu_usd_estnumberEstimated GPU time and its cost at our H100 rate. The job bills actual seconds.
fee_usdnumberThe Mouse fee: $10 per readout job, or $10 per 1M training tokens ($25 minimum) for LoRA.
total_usdnumbergpu_usd_est + fee_usd.
questionsArray<{ signature, type, count, question_ids, warning? }>Per question signature (with your question ids for it), how many labeled examples you sent, with a warning under 50, where the signature is trained and evaluated but gets no calibrated temperature of its own.
PropertyTypeDescription
idstring"tune_...".
modelstringThe tuned model id, "mouse-1:ft-<suffix>-<6 hex>". Immutable.
statusstringqueued, running, ready, rejected, failed, suspended (hosting paused for lack of credits), or deleted.
methodstringreadout or lora. A lora job that kept its readout tune shows readout once finished.
reportTuningReport | nullFilled in when the job finishes.
examples, training_tokensintegerAs quoted.
gpu_seconds_est, gpu_secondsinteger | nullEstimated, then measured on the job (the GPU line settles to the measured seconds).
cost{ fee_usd, gpu_usd_est }The fee and the GPU estimate debited at acceptance.
baselinestring | nullThe tuning this one had to beat.
created_at, finished_atstring | nullISO 8601.

A TuningReport is { method, published, reasons, questions, canary, baseline, fit }: questions maps each signature to { type, keys, question_ids, n_train, n_holdout, before: { accuracy, ece, nll, brier }, after: { ... }, temperature, passed }, measured on the held-out 20%; canary is { passed, failed: [...], injection, order }: how often answers on your held-out examples flipped under a planted instruction or reversed options, mouse-1 (before) vs the tuned model (after); reasons explains a published: false in plain words; fit.escalation (LoRA jobs) compares the readout tune and the LoRA and names the one kept. The report contains metrics, question ids and signatures only, never example text.

{
"id": "tune_01j9x3k8m2v7",
"object": "tuning",
"model": "mouse-1:ft-acme-7f3a2c",
"status": "running",
"method": "readout",
"examples": 1840,
"training_tokens": 412000,
"gpu_seconds_est": 516,
"gpu_seconds": null,
"cost": { "fee_usd": 10.0, "gpu_usd_est": 0.57 },
"baseline": null,
"created_at": "2026-10-19T14:02:11Z",
"finished_at": null,
"report": null
}

A rejected job is billed (the report is the deliverable); a failed job is refunded. One job runs per account at a time (409 tune_in_progress).


curl https://api.mouse.dev/v1/tunings -H "Authorization: Bearer $MOUSE_API_KEY"
{ "object": "list", "data": [ { "id": "tune_01j9x3k8m2v7", "model": "mouse-1:ft-acme-7f3a2c", "status": "ready", "...": "..." } ] }

One tuning, with report once the job has finished. Returns 404 tuning_not_found for an id that is not yours or was deleted.


Removes the adapter, stops hosting, and sets status to deleted. Requests that name the model id afterwards return 404 model_not_found; an alias whose newest ready tuning was deleted falls back to the next newest, or 404 if none remains. Posted examples were never stored. Stored decisions are separate: delete them with DELETE /v1/outcomes.

You sendResolves to
mouse-1:ft-acme-7f3a2cExactly that tuning. Immutable.
mouse-1:ft-acmeThe newest ready tuning on your account with suffix acme. Moves when a later job with suffix: "acme" publishes.

Both forms are accepted everywhere model is: POST /v1/decisions and POST /v1/calibrations. The response's model field and the Mouse-Model-Version header always carry the full tuned id. Tuned ids are visible only to the account that created them; another account's id returns 404 model_not_found.


Record what actually happened for a decision sent with store: true. id is the response's id (dec_...).

curl https://api.mouse.dev/v1/decisions/dec_4f1a.../outcome \
-H "Authorization: Bearer $MOUSE_API_KEY" -H "Content-Type: application/json" \
-d '{"labels": {"safe_to_run": true, "next_tool": "run"}}'
PropertyTypeDescription
labelsRecord<string, boolean | string | integer>Per question id: true/false for noul, an option key for choice, a level index for score. Any subset of the decision's questions. Posting again merges, so a later label replaces an earlier one for that question.

Returns { id, object: "outcome", labels } with every label recorded so far. 404 decision_not_found when the decision was not stored, has expired (30 days) or was deleted, or belongs to another account; 422 invalid_label when a label does not fit its question. Free.


Counts for your stored decisions, never their contents.

{
"object": "outcomes.summary",
"stored": 4210,
"labelled": 1873,
"retention_days": 30,
"questions": [
{ "signature": "9c1e4b2f7a03d851", "type": "noul", "question_ids": ["safe_to_run"], "stored": 4210, "labelled": 1873 }
]
}

Deletes every stored decision and label on your account at once: { "object": "outcomes", "deleted": 4210 }. Tuned models already trained on them are not affected; delete those with DELETE /v1/tunings/{id}.


List active immutable model versions, alias mappings (mouse-1, mouse), and the tuned models on your account.

curl https://api.mouse.dev/v1/models \
-H "Authorization: Bearer $MOUSE_API_KEY"
{
"object": "list",
"alias": {
"mouse-1": "mouse-preview-2026-10-13",
"mouse": "mouse-preview-2026-10-13"
},
"data": [
{
"id": "mouse-preview-2026-10-13",
"released": "2026-10-13",
"status": "preview",
"base": "mouse-1",
"max_state_tokens": 16384,
"modalities": ["text", "image"],
"retire_after": null
}
],
"today": "2026-10-14"
}

Unauthenticated liveness probe returning serving region and engine status.

curl https://api.mouse.dev/healthz
{
"ok": true,
"region": "us",
"engine": "modal"
}

Every response from https://api.mouse.dev includes these HTTP headers:

HeaderExampleDescription
Mouse-Request-Idreq_8f92a1c04e1b902d73c104abUnique request identifier (req_ + 24 hex chars).
Mouse-Model-Versionmouse-preview-2026-10-13Exact immutable snapshot ID that scored the request (POST /v1/decisions, POST /v1/safeguards, and POST /v1/calibrations), or the full tuned id (mouse-1:ft-acme-7f3a2c) when the request named a tuned model or alias.
Mouse-RegionusServing region (us).
Mouse-Data-RetentionnoneEnforced zero data retention on every response.
Cache-Controlno-storePrevents intermediary caching.
x-ratelimit-limit-requests10Sustained requests-per-second limit (10 standard, 5 playground).
x-ratelimit-remaining-requests19Remaining requests in the burst bucket (20 capacity).
x-ratelimit-reset-requests1Seconds until the request bucket resets (1).
x-ratelimit-limit-tokens1000000Input-tokens-per-minute limit (1,000,000).
x-ratelimit-remaining-tokens999926Remaining input tokens in the 60-second bucket.
x-ratelimit-reset-tokens60Seconds until the token bucket resets (60).
Retry-After2Present on 429 and 503 responses; integer seconds to wait before retrying.

All non-2xx responses use a single JSON error envelope. Messages name the limit or offending field and never echo request content:

{
"error": {
"type": "invalid_request_error",
"code": "state_too_long",
"message": "state is 18,204 tokens; mouse-preview-2026-10-13 reads at most 16,384. Nothing was truncated or billed.",
"param": "state"
}
}
Statuserror.typeerror.codeMeaning
400invalid_request_errorinvalid_calibration_profileMalformed, altered, or retired calibration profile token.
401authentication_errormissing_api_key, invalid_api_keyMissing Authorization: Bearer sk_mouse_... header, bad CRC32 checksum, or revoked/expired key.
402billing_errorinsufficient_creditsPrepaid credit balance is $0.00. Add credits at /console/billing.
404invalid_request_errormodel_not_foundUnknown model name, or a tuned model id or alias that is not on this account or was deleted. See GET /v1/models.
409invalid_request_errorprofile_model_mismatchcalibration profile was fitted on a different model snapshot than the one serving the request.
409invalid_request_errortune_in_progressA tuning job is already queued or running on this account. Wait for it or delete it.
413invalid_request_errorrequest_too_largeRequest body exceeds 4,000,000 bytes (4 MB).
422invalid_request_errorinvalid_schema, state_too_long, question_too_long, too_much_work, too_many_questions, too_many_options, too_few_examples, too_many_examples, too_few_examples_per_question, invalid_label, too_many_storedRequest failed schema validation or exceeded a published payload limit. On POST /v1/tunings, too_few_examples / too_many_examples mean the count is outside the method's range (readout 200 to 5,000, LoRA 1,000 to 20,000), and too_much_work means over 30M example tokens, a LoRA over 8M training tokens, or the $250 job cap. invalid_label means a label on /v1/decisions/{id}/outcome does not fit its question; too_many_stored means 100,000 unexpired stored decisions. Never billed.
429rate_limit_errorrate_limited, token_rate_limited, work_rate_limited, auth_rate_limitedExceeded 10 RPS (burst 20), 1M TPM, the account's 300k work tokens per minute, or too many invalid keys from one client. Honor the Retry-After header.
503api_errorengine_timeoutInference worker timed out (30s), usually while the model starts after an idle period. Honor the Retry-After header.