# API reference

> Every API operation with the scope it needs. The same contract drives the web, the CLI, the SDKs and MCP.

Prompt for your AI: Read https://mousemouse.ai/docs/api.md first. Use the MouseMouse API for me. Read the operations you need first, and name the scope each one needs. Ask me before anything that costs money or moves a robot.

The open infrastructure for Physical AI. One REST API serves the web app, the CLI, the MCP server and the generated SDKs.

## Conventions

**IDs**: every resource has a stable, prefixed id that sorts lexicographically: `{prefix}_{26-char Crockford-base32 ULID}` (e.g. `repo_01J8ZC9EXAMPLE0000000000EX`). Prefixes: `user_`, `org_`, `member_`, `key_`, `repo_`, `file_`, `run_`, `rollout_`, `audit_`, `ledger_`, `dev_`, `dreq_`, `appr_`, `devt_`, `ep_`, `esess_`, `rchk_` and `dchk_`. URLs address repos by `{owner}/{repo}` (handles) and jobs by id.

**Pagination**: cursor-based everywhere. Pass `limit` and the opaque `cursor` from the previous page. Responses are `{items: [...], next_cursor: string|null}`. `next_cursor: null` means the list is exhausted. Cursors are opaque, so do not construct them.

**Errors**: RFC 9457 `application/problem+json` with the body `{type, title, status, detail?, instance?, errors?}`. Validation failures use status 422 with per-field `errors[]`.

**Auth**: `Authorization: Bearer <token>`. The token is either a Clerk session JWT (web) or a scoped API key `lucen_sk_...` (CLI/MCP/SDK). Scopes form a strict hierarchy: `read` ⊂ `write` ⊂ `train`. `key:read` covers read and download. `key:write` covers all data mutations: repos, files, meta, orgs. `key:train` covers compute and money: submitting training runs and rollouts. It implies `write`. Data and money are separate scopes. An agent-held key can be allowed to browse and push data and still be unable to spend GPU dollars. A session token carries the user's full powers. Every operation declares its minimum programmatic scope in `x-auth-scope` (`none` | `key:read` | `key:write` | `key:train` | `session`). `none` means anonymous calls work for public resources. Private resources still require auth and access. `session` means **no API key is ever sufficient**: only a Clerk session may call it. Two families are `session` in v0. The first is API key management, so a leaked `write`-scoped agent key cannot mint itself a `train`-scoped one. The second is **device approvals**, so no key of any scope, and therefore no agent, can put a policy on a robot. An agent may only *request* one.

**Visibility**: private resources are invisible to a caller without access. On read paths that caller gets `404`. The API does not answer `403` there, because a `403` would confirm the resource exists. `403` is reserved for a caller who can see the resource but lacks the scope or membership to act on it.

**Rate limits**: anonymous callers are limited per client IP. A credential-less `GET`/`HEAD` gets 300 requests/minute (a page view is several reads). Other anonymous requests get 60/minute: unsafe methods, and any request whose credential failed to verify. Authenticated callers get 600/minute, per session user or per API key. Every `/v1` response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` (unix seconds). Exceeding the limit yields `429` with `Retry-After` and a problem body. `429` is an infrastructure response, so operations do not list it one by one.

**Timestamps**: RFC 3339 UTC (`2026-08-31T12:00:00Z`).

## Operations

257 operations. The contract itself is [/openapi.yaml](/openapi.yaml).

### meta

Every operation in full: [/docs/api/meta.md](/docs/api/meta.md)

- `GET /healthz` (`healthz`, scope `none`): Liveness probe
- `GET /healthz/worker` (`workerHealth`, scope `none`): Background worker liveness
- `GET /v1/capabilities` (`getCapabilities`, scope `none`): What this deployment can do

### install

Every operation in full: [/docs/api/install.md](/docs/api/install.md)

- `GET /install.sh` (`getInstallScript`, scope `none`): The installer for this hub's clients

### auth

Every operation in full: [/docs/api/auth.md](/docs/api/auth.md)

- `GET /v1/auth/me` (`getMe`, scope `key:read`): Who am I
- `PATCH /v1/auth/me` (`updateMe`, scope `session`): Change my handle or my welcome answers
- `DELETE /v1/auth/key` (`revokeOwnApiKey`, scope `key:read`): Revoke the API key that calls
- `POST /v1/desktop-sign-ins` (`authorizeDesktopApp`, scope `session`): Let a desktop app on this computer act as you
- `POST /v1/desktop-sign-ins/token` (`exchangeDesktopCode`, scope `none`): The desktop app turns its code into a key
- `POST /v1/desktop-sign-ins/refresh` (`refreshDesktopKey`, scope `none`): Renew a desktop app's key

### keys

Every operation in full: [/docs/api/keys.md](/docs/api/keys.md)

- `GET /v1/keys` (`listApiKeys`, scope `session`): List my API keys
- `POST /v1/keys` (`createApiKey`, scope `session`): Create an API key
- `POST /v1/keys/child` (`createChildApiKey`, scope `key:read`): Mint a short-lived child of this key
- `DELETE /v1/keys/{key_id}` (`revokeApiKey`, scope `session`): Revoke an API key
- `POST /v1/keys/{key_id}/rotate` (`rotateApiKey`, scope `session`): Rotate an API key
- `GET /v1/keys/{key_id}/activity` (`listApiKeyActivity`, scope `session`): What one API key did

### users

Every operation in full: [/docs/api/users.md](/docs/api/users.md)

- `GET /v1/users/{username}` (`getUser`, scope `none`): Public user profile
- `GET /v1/handles/{handle}` (`checkHandle`, scope `key:read`): Check whether a handle is free

### orgs

Every operation in full: [/docs/api/orgs.md](/docs/api/orgs.md)

- `GET /v1/orgs` (`listMyOrgs`, scope `key:read`): List my organizations
- `POST /v1/orgs` (`createOrg`, scope `key:write`): Create an organization
- `GET /v1/orgs/{org}` (`getOrg`, scope `none`): Get an organization
- `PATCH /v1/orgs/{org}` (`updateOrg`, scope `key:write`): Update an organization
- `GET /v1/orgs/{org}/members` (`listOrgMembers`, scope `key:read`): List organization members
- `PUT /v1/orgs/{org}/members/{username}` (`putOrgMember`, scope `session`): Add or update a member
- `DELETE /v1/orgs/{org}/members/{username}` (`removeOrgMember`, scope `key:write`): Remove a member
- `GET /v1/orgs/{org}/invites` (`listOrgInvites`, scope `key:read`): List an organization's invites
- `POST /v1/orgs/{org}/invites` (`createOrgInvite`, scope `session`): Invite someone to an organization by e-mail
- `DELETE /v1/orgs/{org}/invites/{invite_id}` (`revokeOrgInvite`, scope `key:write`): Revoke an invite
- `GET /v1/org-invites/{token}` (`getOrgInvite`, scope `none`): Read an invite through its link
- `POST /v1/org-invites/{token}/accept` (`acceptOrgInvite`, scope `session`): Accept an invite and join the organization

### repos

Every operation in full: [/docs/api/repos.md](/docs/api/repos.md)

- `GET /v1/repos` (`listRepos`, scope `none`): List / search repos
- `POST /v1/repos` (`createRepo`, scope `key:write`): Create a repo
- `GET /v1/repos/{owner}/{repo}` (`getRepo`, scope `none`): Get a repo
- `PATCH /v1/repos/{owner}/{repo}` (`updateRepo`, scope `key:write`): Update a repo
- `DELETE /v1/repos/{owner}/{repo}` (`deleteRepo`, scope `key:write`): Delete a repo
- `PUT /v1/repos/{owner}/{repo}/like` (`setRepoLike`, scope `session`): Like or unlike a repo
- `POST /v1/repos/{owner}/{repo}/fork` (`forkRepo`, scope `key:write`): Copy a repo into your account
- `POST /v1/repos/{owner}/{repo}/mirrors` (`pushRepoMirror`, scope `session`): Push a policy or a dataset to Hugging Face
- `POST /v1/repos/{owner}/{repo}/imports` (`importRepoFromHuggingface`, scope `session`): Copy a Hugging Face repo into this policy or dataset

### files

Every operation in full: [/docs/api/files.md](/docs/api/files.md)

- `GET /v1/repos/{owner}/{repo}/tree` (`getRepoTree`, scope `none`): List repo files
- `POST /v1/repos/{owner}/{repo}/files/presign-upload` (`presignUpload`, scope `key:write`): Presign a batch multipart upload
- `POST /v1/repos/{owner}/{repo}/files/complete` (`completeUpload`, scope `key:write`): Complete a batch multipart upload
- `POST /v1/repos/{owner}/{repo}/files/presign-download` (`presignDownload`, scope `none`): Presign downloads
- `POST /v1/repos/{owner}/{repo}/files/delete` (`deleteFiles`, scope `key:write`): Delete files (batch unlink)

### datasets

Every operation in full: [/docs/api/datasets.md](/docs/api/datasets.md)

- `GET /v1/datasets/{owner}/{repo}/episodes` (`listDatasetEpisodes`, scope `none`): List dataset episodes
- `GET /v1/datasets/{owner}/{repo}/episodes/{episode_index}/frames-index` (`getEpisodeFramesIndex`, scope `none`): Frames index for one episode
- `GET /v1/datasets/{owner}/{repo}/episodes/{episode_index}/series` (`getEpisodeSeries`, scope `none`): Playable payload for one episode
- `GET /v1/datasets/{owner}/{repo}/episodes/{episode_index}/rows` (`getEpisodeRows`, scope `none`): One page of an episode's rows
- `PUT /v1/datasets/{owner}/{repo}/meta` (`putDatasetMeta`, scope `key:write`): Set dataset meta
- `GET /v1/datasets/{owner}/{repo}/exclusions` (`listDatasetExclusions`, scope `none`): List the episodes kept out of training
- `POST /v1/datasets/{owner}/{repo}/exclusions` (`proposeDatasetExclusions`, scope `key:write`): Propose episodes to keep out of training
- `POST /v1/datasets/{owner}/{repo}/exclusions/decide` (`decideDatasetExclusions`, scope `session`): Confirm, reject or undo keeping episodes out of training
- `POST /v1/dataset-checks` (`createDatasetCheck`, scope `key:write`): Queue a check of a dataset repo's files
- `GET /v1/dataset-checks/{check_id}` (`getDatasetCheck`, scope `none`): Get a dataset check
- `GET /v1/external-datasets` (`listExternalDatasets`, scope `none`): List the datasets listed from Hugging Face

### models

Every operation in full: [/docs/api/models.md](/docs/api/models.md)

- `PUT /v1/models/{owner}/{repo}/meta` (`putModelMeta`, scope `key:write`): Set model meta
- `GET /v1/external-models` (`listExternalModels`, scope `none`): List the policies listed from Hugging Face

### methods

Every operation in full: [/docs/api/methods.md](/docs/api/methods.md)

- `GET /v1/methods` (`listMethods`, scope `none`): The training methods and base models
- `GET /v1/methods/{method_id}` (`getMethod`, scope `none`): One training method

### robots

Every operation in full: [/docs/api/robots.md](/docs/api/robots.md)

- `GET /v1/robots/{owner}/{repo}/card` (`getRobotCard`, scope `none`): Get a robot card
- `PUT /v1/robots/{owner}/{repo}/card` (`putRobotCard`, scope `key:write`): Set a robot card
- `GET /v1/robots/{owner}/{repo}/interface.json` (`getRobotInterfaceFile`, scope `none`): Download the robot's interface as the file its fingerprint hashes
- `POST /v1/robots/{owner}/{repo}/validate` (`validateRobot`, scope `key:read`): Validate a robot card against the repo's MJCF, without writing
- `GET /v1/robots/{owner}/{repo}/routes` (`getTrainingRoutes`, scope `key:read`): The ways this robot could learn a goal, ranked
- `GET /v1/robot-checks` (`listRobotChecks`, scope `key:read`): List hosted robot checks
- `POST /v1/robot-checks` (`createRobotCheck`, scope `key:write`): Queue a hosted check of a robot repo's model
- `GET /v1/robot-checks/{check_id}` (`getRobotCheck`, scope `key:read`): Get a hosted robot check
- `POST /v1/robot-checks/{check_id}/claim` (`claimRobotCheck`, scope `key:write`): Claim a queued check (robot check worker protocol)
- `POST /v1/robot-checks/{check_id}/artifacts` (`presignRobotCheckArtifacts`, scope `key:write`): Presign uploads for a running check's artifacts
- `POST /v1/robot-checks/{check_id}/report` (`reportRobotCheck`, scope `key:write`): Report progress or the result of a claimed check
- `POST /v1/robot-checks/{check_id}/publish` (`publishRobotCheck`, scope `key:write`): Publish a check's draft card into the robot repo, as the caller
- `POST /v1/robot-checks/{check_id}/cancel` (`cancelRobotCheck`, scope `key:write`): Cancel a hosted robot check

### skills

Every operation in full: [/docs/api/skills.md](/docs/api/skills.md)

- `GET /v1/robots/{owner}/{repo}/skills` (`listRobotSkills`, scope `none`): List what a robot can be asked to do
- `GET /v1/robots/{owner}/{repo}/skills/{skill}` (`getRobotSkill`, scope `none`): Get one skill with its version history
- `POST /v1/robots/{owner}/{repo}/skills/{skill}/versions` (`proposeRobotSkillVersion`, scope `key:write`): Propose a policy as the next version of a skill
- `POST /v1/robots/{owner}/{repo}/skills/{skill}/versions/{version}/install` (`installRobotSkillVersion`, scope `session`): Install a skill version (web session only)
- `POST /v1/robots/{owner}/{repo}/skills/{skill}/versions/{version}/decline` (`declineRobotSkillVersion`, scope `session`): Decline a proposed skill version (web session only)

### runs

Every operation in full: [/docs/api/runs.md](/docs/api/runs.md)

- `GET /v1/runs` (`listRuns`, scope `key:read`): List training runs
- `POST /v1/runs` (`createRun`, scope `key:train`): Create a training run
- `POST /v1/jobs/snapshots` (`createJobSnapshot`, scope `key:write`): Upload a project folder for a job
- `GET /v1/jobs/snapshots/{sha256}` (`getJobSnapshot`, scope `key:read`): Look up an uploaded project
- `POST /v1/runs/import` (`importRun`, scope `key:write`): Import a training run trained off-platform
- `POST /v1/runs/estimate` (`estimateRun`, scope `key:train`): Price a training run before submitting it
- `POST /v1/runs/recommend` (`recommendRun`, scope `key:read`): Recommend a GPU tier for a training run (deterministic planner)
- `GET /v1/runs/{run_id}` (`getRun`, scope `key:read`): Get a training run
- `GET /v1/runs/{run_id}/logs` (`streamRunLogs`, scope `key:read`): Stream run logs (SSE)
- `GET /v1/runs/{run_id}/logs/download` (`downloadRunLogs`, scope `key:read`): Download a run's whole log as text
- `POST /v1/runs/{run_id}/cancel` (`cancelRun`, scope `key:train`): Cancel a training run
- `POST /v1/runs/{run_id}/stop` (`stopRun`, scope `key:train`): Stop a training run early and keep its checkpoints
- `POST /v1/runs/{run_id}/move` (`moveRun`, scope `key:train`): Move a queued run to hosted compute
- `GET /v1/runs/{run_id}/config` (`getRunConfig`, scope `key:read`): A run's resolved config, flattened, and its diff against the parent
- `POST /v1/runs/{run_id}/code` (`putRunCode`, scope `key:write`): Record the code a run trained from, and archive it
- `GET /v1/runs/{run_id}/code/diff` (`getRunCodeDiff`, scope `key:read`): What changed in the code between this run and another
- `GET /v1/runs/{run_id}/code/files` (`getRunCodeFile`, scope `key:read`): Read a file, or list a folder, of the code a run trained from
- `GET /v1/runs/{run_id}/curves` (`getRunCurves`, scope `key:read`): A run's learning curves, decimated, with its parent's and a summary of each
- `GET /v1/runs/{run_id}/evals` (`getRunEvals`, scope `key:read`): A run's offline evaluation on its held-out episodes
- `POST /v1/runs/{run_id}/fork` (`forkRun`, scope `key:train`): Start a child of a run with one declared change
- `POST /v1/runs/{run_id}/promote` (`promoteCheckpoint`, scope `key:write`): Publish one of a run's checkpoints as its policy
- `GET /v1/runs/{run_id}/compare` (`compareCheckpoints`, scope `key:read`): Two checkpoints side by side, as the hub measured them
- `GET /v1/runs/{run_id}/checkpoints` (`listRunCheckpoints`, scope `key:read`): List a run's checkpoints
- `GET /v1/runs/{run_id}/job` (`getRunJobInputs`, scope `key:write`): The inputs a runner needs to start a claimed job
- `POST /v1/runs/{run_id}/claim` (`claimRun`, scope `key:train`): Claim a queued worker run (self-hosted runner protocol)
- `POST /v1/runs/{run_id}/report` (`reportRun`, scope `key:train`): Report progress or a terminal state for a claimed run
- `GET /v1/hardware_tiers` (`listHardwareTiers`, scope `none`): GPU tiers and what an hour on each costs
- `GET /v1/github/commits` (`searchGithubCommits`, scope `key:read`): Search a connected GitHub repo's commits

### rollouts

Every operation in full: [/docs/api/rollouts.md](/docs/api/rollouts.md)

- `GET /v1/rollouts` (`listRollouts`, scope `none`): List sim rollouts
- `POST /v1/rollouts` (`createRollout`, scope `key:train`): Create a sim rollout
- `GET /v1/rollouts/{rollout_id}` (`getRollout`, scope `none`): Get a sim rollout
- `POST /v1/rollouts/{rollout_id}/claim` (`claimRollout`, scope `key:train`): Claim a queued rollout (rollout worker protocol)
- `POST /v1/rollouts/{rollout_id}/artifacts` (`presignRolloutArtifacts`, scope `key:train`): Presign uploads for a running rollout's artifacts
- `POST /v1/rollouts/{rollout_id}/report` (`reportRollout`, scope `key:train`): Report progress or the result of a claimed rollout
- `POST /v1/rollouts/{rollout_id}/cancel` (`cancelRollout`, scope `key:train`): Cancel a sim rollout
- `POST /v1/rollouts/{rollout_id}/render` (`renderRollout`, scope `key:train`): Render an earlier rollout's videos
- `GET /v1/rollouts/{rollout_id}/score` (`scoreRollout`, scope `none`): Score a finished sim test, optionally with custom thresholds
- `PUT /v1/rollouts/{rollout_id}/publish` (`publishRollout`, scope `key:write`): Publish or unpublish a sim rollout
- `GET /v1/runs/{run_id}/gates` (`getRunGates`, scope `key:read`): The sim gates a run's checkpoints got while it trained
- `GET /v1/runs/{run_id}/scan` (`getRunScan`, scope `key:read`): A band scan's table
- `POST /v1/runs/{run_id}/scan` (`scanRun`, scope `key:train`): Band-scan a run's checkpoints in simulation

### devices

Every operation in full: [/docs/api/devices.md](/docs/api/devices.md)

- `GET /v1/devices/signing-key` (`getDeviceSigningKey`, scope `none`): The hub's approval verification key
- `GET /v1/devices` (`listDevices`, scope `key:read`): List devices
- `POST /v1/devices` (`registerDevice`, scope `key:write`): Register a robot-side runner
- `POST /v1/device-pairings` (`createDevicePairing`, scope `key:write`): Start pairing a robot from the platform
- `POST /v1/device-pairings/claim` (`claimDevicePairing`, scope `none`): Declare this robot to a pairing: with a code, or to get one
- `GET /v1/device-pairings/{pairing}` (`getDevicePairing`, scope `key:read`): Get a pairing: has the robot joined, and what did it declare?
- `DELETE /v1/device-pairings/{pairing}` (`rejectDevicePairing`, scope `key:write`): Drop a pairing: "Not my robot"
- `POST /v1/device-pairings/{pairing}/confirm` (`confirmDevicePairing`, scope `session`): Confirm the robot that claimed a pairing (web session only)
- `POST /v1/device-pairings/{pairing_id}/collect` (`collectDevicePairing`, scope `none`): The robot picks up what a person confirmed
- `GET /v1/devices/{device_id}` (`getDevice`, scope `key:read`): Get a device
- `POST /v1/devices/{device_id}/disconnect` (`disconnectDevice`, scope `key:write`): Disconnect a device: revoke its credential
- `POST /v1/devices/{device_id}/trust-mode` (`setDeviceTrustMode`, scope `key:write`): The robot changes its own trust mode
- `GET /v1/devices/{device_id}/approval-requests` (`listApprovalRequests`, scope `key:read`): List a device's approval requests
- `POST /v1/devices/{device_id}/approval-requests` (`createApprovalRequest`, scope `key:write`): Ask for a policy to be put on a device
- `GET /v1/devices/{device_id}/approval-requests/{request_id}` (`getApprovalRequest`, scope `key:read`): Get an approval request
- `POST /v1/devices/{device_id}/approval-requests/{request_id}/deny` (`denyApprovalRequest`, scope `session`): Deny an approval request (web session only)
- `GET /v1/devices/{device_id}/approvals` (`listApprovals`, scope `key:read`): List a device's approvals
- `POST /v1/devices/{device_id}/approvals` (`createApproval`, scope `session`): Approve a pending request and mint the signed token (web session only)
- `GET /v1/devices/{device_id}/approvals/{approval_id}` (`getApproval`, scope `key:read`): Get an approval
- `POST /v1/devices/{device_id}/approvals/{approval_id}/stop` (`stopApproval`, scope `session`): Stop a deployment now (web session only)
- `POST /v1/devices/{device_id}/approvals/{approval_id}/rungs/{n}` (`tickRung`, scope `session`): Tick a rung of the bring-up ladder (web session only)
- `GET /v1/devices/{device_id}/approvals/{approval_id}/shadow` (`getApprovalShadow`, scope `key:read`): The shadow run's trace and stats
- `POST /v1/devices/{device_id}/slots/{slot}/restore` (`restoreSlot`, scope `session`): Put a slot's previous policy back (web session only)
- `GET /v1/devices/{device_id}/events` (`listDeviceEvents`, scope `key:read`): List a device's events
- `POST /v1/devices/{device_id}/events` (`postDeviceEvent`, scope `key:write`): Record a telemetry summary from the driver
- `GET /v1/approval-requests/{request_id}` (`getApprovalRequestById`, scope `key:read`): Get an approval request by its id alone
- `POST /v1/devices/{device_id}/bridge-tickets` (`createBridgeTicket`, scope `session`): Get a ticket that pairs a web page with the robot's bridge

### live-control

Every operation in full: [/docs/api/live-control.md](/docs/api/live-control.md)

- `GET /v1/devices/{device_id}/live-control` (`listLiveControl`, scope `key:read`): List a device's live-control requests and grants
- `POST /v1/devices/{device_id}/live-control` (`requestLiveControl`, scope `key:write`): Ask a person to arm live control of a robot
- `GET /v1/live-control/{grant_id}` (`getLiveControl`, scope `key:read`): Get a live-control request by its id
- `POST /v1/live-control/{grant_id}/grant` (`grantLiveControl`, scope `session`): Arm live control (web session only)
- `POST /v1/live-control/{grant_id}/deny` (`denyLiveControl`, scope `session`): Deny a live-control request (web session only)
- `POST /v1/live-control/{grant_id}/stop` (`stopLiveControl`, scope `key:read`): Stop a live session from the hub
- `GET /v1/devices/{device_id}/live-control/stops` (`listLiveControlStops`, scope `key:read`): Wait for a stop from the hub
- `POST /v1/live-control/{grant_id}/report` (`reportLiveControl`, scope `key:write`): The bridge reports that it armed, refused or ended a grant

### endpoints

Every operation in full: [/docs/api/endpoints.md](/docs/api/endpoints.md)

- `GET /v1/endpoints` (`listEndpoints`, scope `key:read`): List inference endpoints
- `POST /v1/endpoints` (`createEndpoint`, scope `key:train`): Create an inference endpoint for a skill-layer model
- `POST /v1/endpoints/estimate` (`estimateEndpoint`, scope `key:train`): Price an endpoint before creating it
- `GET /v1/endpoints/{endpoint_id}` (`getEndpoint`, scope `key:read`): Get an inference endpoint
- `DELETE /v1/endpoints/{endpoint_id}` (`stopEndpoint`, scope `key:train`): Stop an inference endpoint
- `POST /v1/endpoints/{endpoint_id}/claim` (`claimEndpoint`, scope `key:train`): Claim a queued worker endpoint (`lucen serve` protocol)
- `POST /v1/endpoints/{endpoint_id}/report` (`reportEndpoint`, scope `key:train`): Report sessions, metering and state for a claimed endpoint
- `GET /v1/endpoints/{endpoint_id}/sessions` (`listEndpointSessions`, scope `key:read`): List an endpoint's sessions (metering)
- `POST /v1/endpoints/{endpoint_id}/sessions` (`openEndpointSession`, scope `key:write`): Open a session on an endpoint (a device, with a human's approval)
- `POST /v1/endpoints/{endpoint_id}/sessions/{session_id}/report` (`reportEndpointSession`, scope `key:write`): The device's own metering for a session

### coach

Every operation in full: [/docs/api/coach.md](/docs/api/coach.md)

- `GET /v1/coach/doctrine` (`getCoachDoctrine`, scope `none`): The coach's doctrine (numbered methodology rules)
- `GET /v1/coach/cards` (`searchExperienceCards`, scope `none`): Search the experience corpus
- `GET /v1/coach/cards/{card_id}` (`getExperienceCard`, scope `none`): Get one experience card
- `POST /v1/coach/advice` (`createAdvice`, scope `key:train`): Diagnose a training run
- `POST /v1/coach/plan` (`createCoachPlan`, scope `key:train`): Plan a training programme from a task brief
- `GET /v1/coach/sessions` (`listAdviceSessions`, scope `key:read`): List coach sessions
- `GET /v1/coach/sessions/{session_id}` (`getAdviceSession`, scope `key:read`): Get a coach session
- `POST /v1/coach/sessions/{session_id}/feedback` (`setAdviceFeedback`, scope `key:write`): Rate a coach report

### plans

Every operation in full: [/docs/api/plans.md](/docs/api/plans.md)

- `GET /v1/plans` (`listPlans`, scope `key:read`): List plans
- `POST /v1/plans` (`createPlan`, scope `key:train`): Plan a task for a robot (the planner makes its first decision)
- `GET /v1/plans/{plan_id}` (`getPlan`, scope `key:read`): Get a plan (steps, timeline, what it is waiting on)
- `POST /v1/plans/{plan_id}/advance` (`advancePlan`, scope `key:train`): Run one orchestrator tick on a plan (idempotent)
- `POST /v1/plans/{plan_id}/cancel` (`cancelPlan`, scope `key:train`): Cancel a plan

### campaigns

Every operation in full: [/docs/api/campaigns.md](/docs/api/campaigns.md)

- `GET /v1/campaigns` (`listCampaigns`, scope `key:read`): List campaigns
- `POST /v1/campaigns` (`createCampaign`, scope `key:write`): Start a campaign: a task on a robot, with a budget and the three rules
- `POST /v1/campaigns/plan` (`planCampaign`, scope `key:write`): Plan a campaign from one sentence
- `GET /v1/campaigns/{campaign_id}` (`getCampaign`, scope `key:read`): Get a campaign (its rounds, spend, and what waits on a person)
- `PATCH /v1/campaigns/{campaign_id}` (`updateCampaign`, scope `key:write`): Rename, re-describe, change the budget of, or stop a campaign
- `POST /v1/campaigns/{campaign_id}/continue` (`continueCampaign`, scope `session`): Continue a campaign after the hub stopped it
- `POST /v1/campaigns/{campaign_id}/rounds` (`createRound`, scope `key:train`): Lock a round's spec and start its training run
- `GET /v1/campaigns/{campaign_id}/rounds/draft` (`draftRound`, scope `key:read`): A draft of the campaign's next round, ready for one change
- `POST /v1/campaigns/{campaign_id}/rounds/override` (`createRoundWithOverride`, scope `session`): Start a round that breaks a rule: a person's decision, with a reason
- `GET /v1/campaigns/{campaign_id}/rounds/{round_n}` (`getRound`, scope `key:read`): Get a round: its locked spec, the verdict at a step, the variables, the decisions
- `POST /v1/campaigns/{campaign_id}/rounds/{round_n}/decision` (`decideRound`, scope `key:write`): Decide a round: shortlist, iterate, stop the lineage, or done
- `POST /v1/campaigns/{campaign_id}/rounds/{round_n}/gates` (`addRoundGate`, scope `key:write`): Add an uncounted gate after the lock

### trials

Every operation in full: [/docs/api/trials.md](/docs/api/trials.md)

- `GET /v1/trial-sessions` (`listTrialSessions`, scope `key:read`): List real-robot sessions
- `POST /v1/trial-sessions` (`createTrialSession`, scope `key:write`): Plan a real-robot session: one trial per checkpoint, in bracket order
- `GET /v1/trial-sessions/{session_id}` (`getTrialSession`, scope `key:read`): Get a real-robot session: its order, bracket check and trials
- `POST /v1/trial-sessions/{session_id}/requests` (`fileTrialRequests`, scope `key:write`): File the consent requests of a session's unfiled trials
- `GET /v1/trials` (`listTrials`, scope `key:read`): List trials
- `GET /v1/trials/{trial_id}` (`getTrial`, scope `key:read`): Get a trial: run sheet, approval, log, summary, criteria, notes, verdict
- `PATCH /v1/trials/{trial_id}/run-sheet` (`updateTrialRunSheet`, scope `key:write`): Edit a trial's run sheet before its approval locks it
- `POST /v1/trials/{trial_id}/log/presign` (`presignTrialLog`, scope `key:write`): Presigned PUTs for the log files a driver will upload
- `POST /v1/trials/{trial_id}/log` (`uploadTrialLog`, scope `key:write`): Record the log and summary the driver computed on the robot, signed
- `GET /v1/trials/{trial_id}/series` (`getTrialSeries`, scope `key:read`): The log as plottable series: tilt at 50 Hz, joints on request
- `PATCH /v1/trials/{trial_id}/notes` (`putTrialNotes`, scope `key:write`): Save the operator's notes: a partial autosave
- `POST /v1/trials/{trial_id}/notes/videos` (`presignTrialVideo`, scope `key:write`): Start a phone video's presigned multipart upload
- `POST /v1/trials/{trial_id}/notes/videos/{video_id}/complete` (`completeTrialVideo`, scope `key:write`): Finish a phone video's upload and attach it to the notes
- `POST /v1/trials/{trial_id}/verdict` (`setTrialVerdict`, scope `session`): Record a person's verdict on a candidate trial (web session only)

### workspace

Every operation in full: [/docs/api/workspace.md](/docs/api/workspace.md)

- `GET /v1/activity` (`listActivity`, scope `key:read`): The activity feed: what happened to what you can see
- `GET /v1/me/overview` (`getMyOverview`, scope `key:read`): Counts for the workspace rail and the Inbox header
- `GET /v1/me/usage` (`getMyUsage`, scope `key:read`): What an account spent over a time range
- `PUT /v1/me/spend-cap` (`setSpendCap`, scope `session`): Set an account's monthly spend cap
- `DELETE /v1/me/spend-cap` (`deleteSpendCap`, scope `session`): Remove an account's spend cap
- `GET /v1/model-keys` (`listModelKeys`, scope `key:read`): List your workspaces' AI model keys
- `PUT /v1/model-keys/{owner}` (`setModelKey`, scope `session`): Add or replace a workspace's key for one vendor
- `DELETE /v1/model-keys/{owner}` (`deleteModelKey`, scope `session`): Remove a workspace's key for one vendor
- `GET /v1/connections` (`listConnections`, scope `key:read`): List your workspaces' GitHub and Hugging Face connections
- `PUT /v1/connections/{owner}/{provider}` (`setConnection`, scope `session`): Connect GitHub or Hugging Face to a workspace
- `DELETE /v1/connections/{owner}/{provider}` (`deleteConnection`, scope `session`): Disconnect GitHub or Hugging Face from a workspace
- `POST /v1/github/webhook` (`receiveGithubWebhook`, scope `none`): GitHub's events for the hub's GitHub App

### spend

Every operation in full: [/docs/api/spend.md](/docs/api/spend.md)

- `GET /v1/spend/holds` (`listSpendHolds`, scope `key:read`): List held cloud spend
- `GET /v1/spend/holds/{hold_id}` (`getSpendHold`, scope `key:read`): Get one held request
- `POST /v1/spend/holds/{hold_id}/approve` (`approveSpendHold`, scope `session`): Approve a held request and create its job (web session only)
- `POST /v1/spend/holds/{hold_id}/deny` (`denySpendHold`, scope `session`): Deny a held request with a reason (web session only)
- `POST /v1/spend/holds/{hold_id}/cancel` (`cancelSpendHold`, scope `key:write`): Withdraw a held request

### motion

Every operation in full: [/docs/api/motion.md](/docs/api/motion.md)

- `GET /v1/motion-jobs` (`listMotionJobs`, scope `key:read`): List motion jobs
- `POST /v1/motion-jobs` (`createMotionJob`, scope `key:write`): Start learning a motion from a video
- `GET /v1/motion-jobs/{motion_job_id}` (`getMotionJob`, scope `key:read`): Read a motion job
- `POST /v1/motion-jobs/{motion_job_id}/uploaded` (`completeMotionUpload`, scope `key:write`): Say the clip is uploaded and queue the preview
- `POST /v1/motion-jobs/{motion_job_id}/retime` (`retimeMotionJob`, scope `key:write`): Slow the motion down and remake the robot's preview
- `POST /v1/motion-jobs/{motion_job_id}/train` (`trainMotionJob`, scope `key:write`): Train the robot to do the previewed motion, then check it
- `POST /v1/motion-jobs/{motion_job_id}/cancel` (`cancelMotionJob`, scope `key:write`): Cancel a motion job
- `POST /v1/motion-jobs/{motion_job_id}/claim` (`claimMotionJob`, scope `key:train`): Claim a motion job's queued stage (motion worker protocol)
- `POST /v1/motion-jobs/{motion_job_id}/artifacts` (`presignMotionArtifacts`, scope `key:train`): Presign uploads for a running stage's artifacts
- `POST /v1/motion-jobs/{motion_job_id}/report` (`reportMotionJob`, scope `key:train`): Report progress or the result of a claimed stage

### mcp

Every operation in full: [/docs/api/mcp.md](/docs/api/mcp.md)

- `POST /mcp` (`mcpMessage`, scope `key:read`): The hub as a remote MCP server

### admin

Every operation in full: [/docs/api/admin.md](/docs/api/admin.md)

- `GET /v1/admin/users` (`listAdminUsers`, scope `session`): Everyone with an account on this hub
- `GET /v1/admin/stats` (`getAdminStats`, scope `session`): How many people use the hub, and what they made

### llm

Every operation in full: [/docs/api/llm.md](/docs/api/llm.md)

- `GET /v1/llm/models` (`listLlmModels`, scope `none`): The AI models the hub offers, with their prices
- `POST /v1/llm/messages` (`createLlmMessage`, scope `key:train`): One AI model call for a MouseMouse agent

### billing

Every operation in full: [/docs/api/billing.md](/docs/api/billing.md)

- `POST /v1/billing/stripe-webhook` (`receiveStripeWebhook`, scope `none`): Stripe's webhook
- `GET /v1/billing/prices` (`getBillingPrices`, scope `none`): The hub's prices
- `GET /v1/billing` (`getBilling`, scope `key:read`): A workspace's use this period, what it will pay and its cap
- `PUT /v1/billing/cap` (`setBillingCap`, scope `session`): Set a workspace's monthly cap
- `POST /v1/billing/checkout` (`createBillingCheckout`, scope `session`): Add a payment method
- `POST /v1/billing/portal` (`createBillingPortal`, scope `session`): Open the Stripe customer portal

### agent

Every operation in full: [/docs/api/agent.md](/docs/api/agent.md)

- `GET /v1/agent/sessions` (`listAgentSessions`, scope `key:read`): List agent sessions
- `POST /v1/agent/sessions` (`createAgentSession`, scope `key:train`): Start an agent session (the hub's cloud agent works toward a goal)
- `GET /v1/agent/sessions/{session_id}` (`getAgentSession`, scope `key:read`): Get an agent session (status, spend, what it waits on, pending approvals)
- `POST /v1/agent/sessions/{session_id}/messages` (`postAgentMessage`, scope `key:train`): Send the agent a message (a user turn)
- `GET /v1/agent/sessions/{session_id}/events` (`streamAgentEvents`, scope `key:read`): Stream a session's events (SSE, resumable)
- `POST /v1/agent/sessions/{session_id}/approvals/{approval_id}` (`resolveAgentApproval`, scope `key:train`): Approve or deny a spend the agent asked for
- `POST /v1/agent/sessions/{session_id}/cancel` (`cancelAgentSession`, scope `key:train`): Cancel an agent session
- `POST /v1/agent/sessions/{session_id}/end` (`endAgentSession`, scope `key:train`): End an agent session (done; a reply reopens it)
- `GET /v1/agent/sessions/{session_id}/plans` (`listAgentPlans`, scope `key:read`): The plans the agent proposed in this session, newest version first
- `GET /v1/agent/sessions/{session_id}/plans/{plan_id}` (`getAgentPlan`, scope `key:read`): One version of the session's plan
- `POST /v1/agent/sessions/{session_id}/plans/{plan_id}/approve` (`approveAgentPlan`, scope `session`): Approve the agent's plan (a signed-in person only)
- `GET /v1/agent/sessions/{session_id}/decisions` (`listAgentDecisions`, scope `key:read`): The session's decisions: plan, spend, shortlist, handoff
- `GET /v1/agent/sessions/{session_id}/digest` (`getAgentDigest`, scope `key:read`): "Since you left": what happened in the session since the viewer last looked
- `GET /v1/agent/sessions/{session_id}/objects` (`listAgentObjects`, scope `key:read`): The session's objects grouped by state: Needs you, Running, Ready for review, Done
- `GET /v1/tasks` (`listTasks`, scope `key:read`): List the agent's tasks, sessions and robot plans in one list
- `GET /v1/tasks/{task_id}` (`getTask`, scope `key:read`): Get one task with its stages, evidence and deploy requests
- `POST /v1/tasks/{task_id}/stop` (`stopTask`, scope `key:train`): Stop a task and the work it started

### Other schemas

Every operation in full: [/docs/api/other.md](/docs/api/other.md)
