Skip to content
Docs menu

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.
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.

Download openapi.yamlOpenAPI 3.1 · version 0.1.0 · 257 operations · 890 schemas

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).

Auth scopes

Each operation declares one, as the x-auth-scope extension in the spec. What each key can do, in words: API keys and scopes.

Auth scopes
ScopeWhat it allows
noneAnonymous. Public repos, episodes, and the Coach's principles and lessons.
key:readList and read what the credential's owner can see.
key:writeCreate repos, upload files, import a run. Implies read.
key:trainSpend money: GPU jobs, Coach advice. Implies write.
sessionBrowser session only: managing keys and approving robot requests. A key cannot create another key or approve a robot.

Every operation (257)

Grouped by tag, in the contract’s order. Each path opens the operation’s section: parameters, request body, responses.

meta (3)

Service metadata and probes

meta operations
MethodPathScopeSummary
GET/healthzhealthznoneLiveness probe
GET/healthz/workerworkerHealthnoneBackground worker liveness
GET/v1/capabilitiesgetCapabilitiesnoneWhat this deployment can do

install (1)

The hub's own installer for its clients (lucen, lucen-device, lucen-mcp)

install operations
MethodPathScopeSummary
GET/install.shgetInstallScriptnoneThe installer for this hub's clients

auth (6)

Identity of the caller

auth operations
MethodPathScopeSummary
GET/v1/auth/megetMekey:readWho am I
PATCH/v1/auth/meupdateMesessionChange my handle or my welcome answers
DELETE/v1/auth/keyrevokeOwnApiKeykey:readRevoke the API key that calls
POST/v1/desktop-sign-insauthorizeDesktopAppsessionLet a desktop app on this computer act as you
POST/v1/desktop-sign-ins/tokenexchangeDesktopCodenoneThe desktop app turns its code into a key
POST/v1/desktop-sign-ins/refreshrefreshDesktopKeynoneRenew a desktop app's key

keys (6)

Scoped API keys for programmatic access (CLI / MCP / SDK)

keys operations
MethodPathScopeSummary
GET/v1/keyslistApiKeyssessionList my API keys
POST/v1/keyscreateApiKeysessionCreate an API key
POST/v1/keys/childcreateChildApiKeykey:readMint a short-lived child of this key
DELETE/v1/keys/{key_id}revokeApiKeysessionRevoke an API key
POST/v1/keys/{key_id}/rotaterotateApiKeysessionRotate an API key
GET/v1/keys/{key_id}/activitylistApiKeyActivitysessionWhat one API key did

users (2)

Public user profiles

users operations
MethodPathScopeSummary
GET/v1/users/{username}getUsernonePublic user profile
GET/v1/handles/{handle}checkHandlekey:readCheck whether a handle is free

orgs (12)

Organizations and membership (CRUD-lite)

orgs operations
MethodPathScopeSummary
GET/v1/orgslistMyOrgskey:readList my organizations
POST/v1/orgscreateOrgkey:writeCreate an organization
GET/v1/orgs/{org}getOrgnoneGet an organization
PATCH/v1/orgs/{org}updateOrgkey:writeUpdate an organization
GET/v1/orgs/{org}/memberslistOrgMemberskey:readList organization members
PUT/v1/orgs/{org}/members/{username}putOrgMembersessionAdd or update a member
DELETE/v1/orgs/{org}/members/{username}removeOrgMemberkey:writeRemove a member
GET/v1/orgs/{org}/inviteslistOrgInviteskey:readList an organization's invites
POST/v1/orgs/{org}/invitescreateOrgInvitesessionInvite someone to an organization by e-mail
DELETE/v1/orgs/{org}/invites/{invite_id}revokeOrgInvitekey:writeRevoke an invite
GET/v1/org-invites/{token}getOrgInvitenoneRead an invite through its link
POST/v1/org-invites/{token}/acceptacceptOrgInvitesessionAccept an invite and join the organization

repos (9)

Repos (kind = dataset | model | robot): create, read, update, delete, search

repos operations
MethodPathScopeSummary
GET/v1/reposlistReposnoneList / search repos
POST/v1/reposcreateRepokey:writeCreate a repo
GET/v1/repos/{owner}/{repo}getRepononeGet a repo
PATCH/v1/repos/{owner}/{repo}updateRepokey:writeUpdate a repo
DELETE/v1/repos/{owner}/{repo}deleteRepokey:writeDelete a repo
PUT/v1/repos/{owner}/{repo}/likesetRepoLikesessionLike or unlike a repo
POST/v1/repos/{owner}/{repo}/forkforkRepokey:writeCopy a repo into your account
POST/v1/repos/{owner}/{repo}/mirrorspushRepoMirrorsessionPush a policy or a dataset to Hugging Face
POST/v1/repos/{owner}/{repo}/importsimportRepoFromHuggingfacesessionCopy a Hugging Face repo into this policy or dataset

files (5)

Repo files: presigned multipart upload/download against object storage, and tree listing

files operations
MethodPathScopeSummary
GET/v1/repos/{owner}/{repo}/treegetRepoTreenoneList repo files
POST/v1/repos/{owner}/{repo}/files/presign-uploadpresignUploadkey:writePresign a batch multipart upload
POST/v1/repos/{owner}/{repo}/files/completecompleteUploadkey:writeComplete a batch multipart upload
POST/v1/repos/{owner}/{repo}/files/presign-downloadpresignDownloadnonePresign downloads
POST/v1/repos/{owner}/{repo}/files/deletedeleteFileskey:writeDelete files (batch unlink)

datasets (11)

Dataset-kind repo extras: episode index, frames index, per-episode playback payload, dataset meta, and the datasets listed from the Hugging Face Hub

datasets operations
MethodPathScopeSummary
GET/v1/datasets/{owner}/{repo}/episodeslistDatasetEpisodesnoneList dataset episodes
GET/v1/datasets/{owner}/{repo}/episodes/{episode_index}/frames-indexgetEpisodeFramesIndexnoneFrames index for one episode
GET/v1/datasets/{owner}/{repo}/episodes/{episode_index}/seriesgetEpisodeSeriesnonePlayable payload for one episode
GET/v1/datasets/{owner}/{repo}/episodes/{episode_index}/rowsgetEpisodeRowsnoneOne page of an episode's rows
PUT/v1/datasets/{owner}/{repo}/metaputDatasetMetakey:writeSet dataset meta
GET/v1/datasets/{owner}/{repo}/exclusionslistDatasetExclusionsnoneList the episodes kept out of training
POST/v1/datasets/{owner}/{repo}/exclusionsproposeDatasetExclusionskey:writePropose episodes to keep out of training
POST/v1/datasets/{owner}/{repo}/exclusions/decidedecideDatasetExclusionssessionConfirm, reject or undo keeping episodes out of training
POST/v1/dataset-checkscreateDatasetCheckkey:writeQueue a check of a dataset repo's files
GET/v1/dataset-checks/{check_id}getDatasetChecknoneGet a dataset check
GET/v1/external-datasetslistExternalDatasetsnoneList the datasets listed from Hugging Face

models (2)

Model-kind repo extras: model meta, and the policies listed from the Hugging Face Hub

models operations
MethodPathScopeSummary
PUT/v1/models/{owner}/{repo}/metaputModelMetakey:writeSet model meta
GET/v1/external-modelslistExternalModelsnoneList the policies listed from Hugging Face

methods (2)

Training methods and base models (the Models directory): what a policy is trained with. Read from the hub's code-owned registry; nothing here is written through the API.

methods operations
MethodPathScopeSummary
GET/v1/methodslistMethodsnoneThe training methods and base models
GET/v1/methods/{method_id}getMethodnoneOne training method

robots (13)

Robot-kind repo extras: robot card

robots operations
MethodPathScopeSummary
GET/v1/robots/{owner}/{repo}/cardgetRobotCardnoneGet a robot card
PUT/v1/robots/{owner}/{repo}/cardputRobotCardkey:writeSet a robot card
GET/v1/robots/{owner}/{repo}/interface.jsongetRobotInterfaceFilenoneDownload the robot's interface as the file its fingerprint hashes
POST/v1/robots/{owner}/{repo}/validatevalidateRobotkey:readValidate a robot card against the repo's MJCF, without writing
GET/v1/robots/{owner}/{repo}/routesgetTrainingRouteskey:readThe ways this robot could learn a goal, ranked
GET/v1/robot-checkslistRobotCheckskey:readList hosted robot checks
POST/v1/robot-checkscreateRobotCheckkey:writeQueue a hosted check of a robot repo's model
GET/v1/robot-checks/{check_id}getRobotCheckkey:readGet a hosted robot check
POST/v1/robot-checks/{check_id}/claimclaimRobotCheckkey:writeClaim a queued check (robot check worker protocol)
POST/v1/robot-checks/{check_id}/artifactspresignRobotCheckArtifactskey:writePresign uploads for a running check's artifacts
POST/v1/robot-checks/{check_id}/reportreportRobotCheckkey:writeReport progress or the result of a claimed check
POST/v1/robot-checks/{check_id}/publishpublishRobotCheckkey:writePublish a check's draft card into the robot repo, as the caller
POST/v1/robot-checks/{check_id}/cancelcancelRobotCheckkey:writeCancel a hosted robot check

skills (5)

Robot skills: what a robot can be asked to do. Each skill runs one reflex policy, and a person installs each version. The range of every input is the range the robot's sim tests passed.

skills operations
MethodPathScopeSummary
GET/v1/robots/{owner}/{repo}/skillslistRobotSkillsnoneList what a robot can be asked to do
GET/v1/robots/{owner}/{repo}/skills/{skill}getRobotSkillnoneGet one skill with its version history
POST/v1/robots/{owner}/{repo}/skills/{skill}/versionsproposeRobotSkillVersionkey:writePropose a policy as the next version of a skill
POST/v1/robots/{owner}/{repo}/skills/{skill}/versions/{version}/installinstallRobotSkillVersionsessionInstall a skill version (web session only)
POST/v1/robots/{owner}/{repo}/skills/{skill}/versions/{version}/declinedeclineRobotSkillVersionsessionDecline a proposed skill version (web session only)

runs (28)

Training runs: submitted here and executed by an executor, either a self-hosted worker or Modal (modal)

runs operations
MethodPathScopeSummary
GET/v1/runslistRunskey:readList training runs
POST/v1/runscreateRunkey:trainCreate a training run
POST/v1/jobs/snapshotscreateJobSnapshotkey:writeUpload a project folder for a job
GET/v1/jobs/snapshots/{sha256}getJobSnapshotkey:readLook up an uploaded project
POST/v1/runs/importimportRunkey:writeImport a training run trained off-platform
POST/v1/runs/estimateestimateRunkey:trainPrice a training run before submitting it
POST/v1/runs/recommendrecommendRunkey:readRecommend a GPU tier for a training run (deterministic planner)
GET/v1/runs/{run_id}getRunkey:readGet a training run
GET/v1/runs/{run_id}/logsstreamRunLogskey:readStream run logs (SSE)
GET/v1/runs/{run_id}/logs/downloaddownloadRunLogskey:readDownload a run's whole log as text
POST/v1/runs/{run_id}/cancelcancelRunkey:trainCancel a training run
POST/v1/runs/{run_id}/stopstopRunkey:trainStop a training run early and keep its checkpoints
POST/v1/runs/{run_id}/movemoveRunkey:trainMove a queued run to hosted compute
GET/v1/runs/{run_id}/configgetRunConfigkey:readA run's resolved config, flattened, and its diff against the parent
POST/v1/runs/{run_id}/codeputRunCodekey:writeRecord the code a run trained from, and archive it
GET/v1/runs/{run_id}/code/diffgetRunCodeDiffkey:readWhat changed in the code between this run and another
GET/v1/runs/{run_id}/code/filesgetRunCodeFilekey:readRead a file, or list a folder, of the code a run trained from
GET/v1/runs/{run_id}/curvesgetRunCurveskey:readA run's learning curves, decimated, with its parent's and a summary of each
GET/v1/runs/{run_id}/evalsgetRunEvalskey:readA run's offline evaluation on its held-out episodes
POST/v1/runs/{run_id}/forkforkRunkey:trainStart a child of a run with one declared change
POST/v1/runs/{run_id}/promotepromoteCheckpointkey:writePublish one of a run's checkpoints as its policy
GET/v1/runs/{run_id}/comparecompareCheckpointskey:readTwo checkpoints side by side, as the hub measured them
GET/v1/runs/{run_id}/checkpointslistRunCheckpointskey:readList a run's checkpoints
GET/v1/runs/{run_id}/jobgetRunJobInputskey:writeThe inputs a runner needs to start a claimed job
POST/v1/runs/{run_id}/claimclaimRunkey:trainClaim a queued worker run (self-hosted runner protocol)
POST/v1/runs/{run_id}/reportreportRunkey:trainReport progress or a terminal state for a claimed run
GET/v1/hardware_tierslistHardwareTiersnoneGPU tiers and what an hour on each costs
GET/v1/github/commitssearchGithubCommitskey:readSearch a connected GitHub repo's commits

rollouts (13)

Sim rollout jobs: watch a policy run in MuJoCo

rollouts operations
MethodPathScopeSummary
GET/v1/rolloutslistRolloutsnoneList sim rollouts
POST/v1/rolloutscreateRolloutkey:trainCreate a sim rollout
GET/v1/rollouts/{rollout_id}getRolloutnoneGet a sim rollout
POST/v1/rollouts/{rollout_id}/claimclaimRolloutkey:trainClaim a queued rollout (rollout worker protocol)
POST/v1/rollouts/{rollout_id}/artifactspresignRolloutArtifactskey:trainPresign uploads for a running rollout's artifacts
POST/v1/rollouts/{rollout_id}/reportreportRolloutkey:trainReport progress or the result of a claimed rollout
POST/v1/rollouts/{rollout_id}/cancelcancelRolloutkey:trainCancel a sim rollout
POST/v1/rollouts/{rollout_id}/renderrenderRolloutkey:trainRender an earlier rollout's videos
GET/v1/rollouts/{rollout_id}/scorescoreRolloutnoneScore a finished sim test, optionally with custom thresholds
PUT/v1/rollouts/{rollout_id}/publishpublishRolloutkey:writePublish or unpublish a sim rollout
GET/v1/runs/{run_id}/gatesgetRunGateskey:readThe sim gates a run's checkpoints got while it trained
GET/v1/runs/{run_id}/scangetRunScankey:readA band scan's table
POST/v1/runs/{run_id}/scanscanRunkey:trainBand-scan a run's checkpoints in simulation

devices (27)

Device consent layer: robot-side runners, approval requests and approvals, and the driver's telemetry summaries. An agent may make an approval request. Only a human session may sign an approval. No API key can put a policy on a robot.

devices operations
MethodPathScopeSummary
GET/v1/devices/signing-keygetDeviceSigningKeynoneThe hub's approval verification key
GET/v1/deviceslistDeviceskey:readList devices
POST/v1/devicesregisterDevicekey:writeRegister a robot-side runner
POST/v1/device-pairingscreateDevicePairingkey:writeStart pairing a robot from the platform
POST/v1/device-pairings/claimclaimDevicePairingnoneDeclare this robot to a pairing: with a code, or to get one
GET/v1/device-pairings/{pairing}getDevicePairingkey:readGet a pairing: has the robot joined, and what did it declare?
DELETE/v1/device-pairings/{pairing}rejectDevicePairingkey:writeDrop a pairing: "Not my robot"
POST/v1/device-pairings/{pairing}/confirmconfirmDevicePairingsessionConfirm the robot that claimed a pairing (web session only)
POST/v1/device-pairings/{pairing_id}/collectcollectDevicePairingnoneThe robot picks up what a person confirmed
GET/v1/devices/{device_id}getDevicekey:readGet a device
POST/v1/devices/{device_id}/disconnectdisconnectDevicekey:writeDisconnect a device: revoke its credential
POST/v1/devices/{device_id}/trust-modesetDeviceTrustModekey:writeThe robot changes its own trust mode
GET/v1/devices/{device_id}/approval-requestslistApprovalRequestskey:readList a device's approval requests
POST/v1/devices/{device_id}/approval-requestscreateApprovalRequestkey:writeAsk for a policy to be put on a device
GET/v1/devices/{device_id}/approval-requests/{request_id}getApprovalRequestkey:readGet an approval request
POST/v1/devices/{device_id}/approval-requests/{request_id}/denydenyApprovalRequestsessionDeny an approval request (web session only)
GET/v1/devices/{device_id}/approvalslistApprovalskey:readList a device's approvals
POST/v1/devices/{device_id}/approvalscreateApprovalsessionApprove a pending request and mint the signed token (web session only)
GET/v1/devices/{device_id}/approvals/{approval_id}getApprovalkey:readGet an approval
POST/v1/devices/{device_id}/approvals/{approval_id}/stopstopApprovalsessionStop a deployment now (web session only)
POST/v1/devices/{device_id}/approvals/{approval_id}/rungs/{n}tickRungsessionTick a rung of the bring-up ladder (web session only)
GET/v1/devices/{device_id}/approvals/{approval_id}/shadowgetApprovalShadowkey:readThe shadow run's trace and stats
POST/v1/devices/{device_id}/slots/{slot}/restorerestoreSlotsessionPut a slot's previous policy back (web session only)
GET/v1/devices/{device_id}/eventslistDeviceEventskey:readList a device's events
POST/v1/devices/{device_id}/eventspostDeviceEventkey:writeRecord a telemetry summary from the driver
GET/v1/approval-requests/{request_id}getApprovalRequestByIdkey:readGet an approval request by its id alone
POST/v1/devices/{device_id}/bridge-ticketscreateBridgeTicketsessionGet a ticket that pairs a web page with the robot's bridge

live-control (8)

Live control of a robot: real motion from code, a policy or teleoperation. An agent or a key may ask. A signed-in person arms it for a window, in teach or full mode. The bridge on the robot's computer verifies the grant offline and enforces the limits the person read.

live-control operations
MethodPathScopeSummary
GET/v1/devices/{device_id}/live-controllistLiveControlkey:readList a device's live-control requests and grants
POST/v1/devices/{device_id}/live-controlrequestLiveControlkey:writeAsk a person to arm live control of a robot
GET/v1/live-control/{grant_id}getLiveControlkey:readGet a live-control request by its id
POST/v1/live-control/{grant_id}/grantgrantLiveControlsessionArm live control (web session only)
POST/v1/live-control/{grant_id}/denydenyLiveControlsessionDeny a live-control request (web session only)
POST/v1/live-control/{grant_id}/stopstopLiveControlkey:readStop a live session from the hub
GET/v1/devices/{device_id}/live-control/stopslistLiveControlStopskey:readWait for a stop from the hub
POST/v1/live-control/{grant_id}/reportreportLiveControlkey:writeThe bridge reports that it armed, refused or ended a grant

endpoints (10)

Inference endpoints: hub-served inference for the skill / planner layer. The hub never serves the reflex layer. lucen serve claims an endpoint. A device consumes one only through a signed approval bound to device + model digest + endpoint id. On Lucen cloud the owner pays the tier's hourly rate while the endpoint runs. Sessions are metered, and carry no price.

endpoints operations
MethodPathScopeSummary
GET/v1/endpointslistEndpointskey:readList inference endpoints
POST/v1/endpointscreateEndpointkey:trainCreate an inference endpoint for a skill-layer model
POST/v1/endpoints/estimateestimateEndpointkey:trainPrice an endpoint before creating it
GET/v1/endpoints/{endpoint_id}getEndpointkey:readGet an inference endpoint
DELETE/v1/endpoints/{endpoint_id}stopEndpointkey:trainStop an inference endpoint
POST/v1/endpoints/{endpoint_id}/claimclaimEndpointkey:trainClaim a queued worker endpoint (`lucen serve` protocol)
POST/v1/endpoints/{endpoint_id}/reportreportEndpointkey:trainReport sessions, metering and state for a claimed endpoint
GET/v1/endpoints/{endpoint_id}/sessionslistEndpointSessionskey:readList an endpoint's sessions (metering)
POST/v1/endpoints/{endpoint_id}/sessionsopenEndpointSessionkey:writeOpen a session on an endpoint (a device, with a human's approval)
POST/v1/endpoints/{endpoint_id}/sessions/{session_id}/reportreportEndpointSessionkey:writeThe device's own metering for a session

coach (8)

Training Coach: the experience corpus, run diagnosis with in-whitelist proposals, and programme planning. Every claim cites a card.

coach operations
MethodPathScopeSummary
GET/v1/coach/doctrinegetCoachDoctrinenoneThe coach's doctrine (numbered methodology rules)
GET/v1/coach/cardssearchExperienceCardsnoneSearch the experience corpus
GET/v1/coach/cards/{card_id}getExperienceCardnoneGet one experience card
POST/v1/coach/advicecreateAdvicekey:trainDiagnose a training run
POST/v1/coach/plancreateCoachPlankey:trainPlan a training programme from a task brief
GET/v1/coach/sessionslistAdviceSessionskey:readList coach sessions
GET/v1/coach/sessions/{session_id}getAdviceSessionkey:readGet a coach session
POST/v1/coach/sessions/{session_id}/feedbacksetAdviceFeedbackkey:writeRate a coach report

plans (5)

The planner: a frontier model orchestrates the three layers for one task on one device. It works through a closed step vocabulary. It can only request approvals, and a human signs them. It never opens a session and never names a joint. Each plan is recorded as an orchestration run.

plans operations
MethodPathScopeSummary
GET/v1/planslistPlanskey:readList plans
POST/v1/planscreatePlankey:trainPlan a task for a robot (the planner makes its first decision)
GET/v1/plans/{plan_id}getPlankey:readGet a plan (steps, timeline, what it is waiting on)
POST/v1/plans/{plan_id}/advanceadvancePlankey:trainRun one orchestrator tick on a plan (idempotent)
POST/v1/plans/{plan_id}/cancelcancelPlankey:trainCancel a plan

campaigns (12)

Campaigns: a training loop as hub objects. A campaign is a task on a robot with a budget. Each round locks a spec: one declared change, a hypothesis, and gates with predictions. The round trains through createRun and is gated and band-scanned in simulation. It gets a verdict from its locked gates and a decision. Three rules are enforced in code. Only a signed-in person may override one, with a reason.

campaigns operations
MethodPathScopeSummary
GET/v1/campaignslistCampaignskey:readList campaigns
POST/v1/campaignscreateCampaignkey:writeStart a campaign: a task on a robot, with a budget and the three rules
POST/v1/campaigns/planplanCampaignkey:writePlan a campaign from one sentence
GET/v1/campaigns/{campaign_id}getCampaignkey:readGet a campaign (its rounds, spend, and what waits on a person)
PATCH/v1/campaigns/{campaign_id}updateCampaignkey:writeRename, re-describe, change the budget of, or stop a campaign
POST/v1/campaigns/{campaign_id}/continuecontinueCampaignsessionContinue a campaign after the hub stopped it
POST/v1/campaigns/{campaign_id}/roundscreateRoundkey:trainLock a round's spec and start its training run
GET/v1/campaigns/{campaign_id}/rounds/draftdraftRoundkey:readA draft of the campaign's next round, ready for one change
POST/v1/campaigns/{campaign_id}/rounds/overridecreateRoundWithOverridesessionStart a round that breaks a rule: a person's decision, with a reason
GET/v1/campaigns/{campaign_id}/rounds/{round_n}getRoundkey:readGet a round: its locked spec, the verdict at a step, the variables, the decisions
POST/v1/campaigns/{campaign_id}/rounds/{round_n}/decisiondecideRoundkey:writeDecide a round: shortlist, iterate, stop the lineage, or done
POST/v1/campaigns/{campaign_id}/rounds/{round_n}/gatesaddRoundGatekey:writeAdd an uncounted gate after the lock

trials (14)

Real-robot trials: a session of trials on one device. Each trial is a checkpoint run under its own device approval, with a run sheet locked at approval. The driver uploads the log and summary, signed with the device key. The operator adds notes from a phone. A person gives a verdict (promote / iterate / stop) that the campaign's rules read.

trials operations
MethodPathScopeSummary
GET/v1/trial-sessionslistTrialSessionskey:readList real-robot sessions
POST/v1/trial-sessionscreateTrialSessionkey:writePlan a real-robot session: one trial per checkpoint, in bracket order
GET/v1/trial-sessions/{session_id}getTrialSessionkey:readGet a real-robot session: its order, bracket check and trials
POST/v1/trial-sessions/{session_id}/requestsfileTrialRequestskey:writeFile the consent requests of a session's unfiled trials
GET/v1/trialslistTrialskey:readList trials
GET/v1/trials/{trial_id}getTrialkey:readGet a trial: run sheet, approval, log, summary, criteria, notes, verdict
PATCH/v1/trials/{trial_id}/run-sheetupdateTrialRunSheetkey:writeEdit a trial's run sheet before its approval locks it
POST/v1/trials/{trial_id}/log/presignpresignTrialLogkey:writePresigned PUTs for the log files a driver will upload
POST/v1/trials/{trial_id}/loguploadTrialLogkey:writeRecord the log and summary the driver computed on the robot, signed
GET/v1/trials/{trial_id}/seriesgetTrialSerieskey:readThe log as plottable series: tilt at 50 Hz, joints on request
PATCH/v1/trials/{trial_id}/notesputTrialNoteskey:writeSave the operator's notes: a partial autosave
POST/v1/trials/{trial_id}/notes/videospresignTrialVideokey:writeStart a phone video's presigned multipart upload
POST/v1/trials/{trial_id}/notes/videos/{video_id}/completecompleteTrialVideokey:writeFinish a phone video's upload and attach it to the notes
POST/v1/trials/{trial_id}/verdictsetTrialVerdictsessionRecord a person's verdict on a candidate trial (web session only)

workspace (12)

The signed-in caller's workspace: the activity feed and one cheap overview for the workspace rail and the Inbox header. The feed is the audit log, filtered to what the caller could already see.

workspace operations
MethodPathScopeSummary
GET/v1/activitylistActivitykey:readThe activity feed: what happened to what you can see
GET/v1/me/overviewgetMyOverviewkey:readCounts for the workspace rail and the Inbox header
GET/v1/me/usagegetMyUsagekey:readWhat an account spent over a time range
PUT/v1/me/spend-capsetSpendCapsessionSet an account's monthly spend cap
DELETE/v1/me/spend-capdeleteSpendCapsessionRemove an account's spend cap
GET/v1/model-keyslistModelKeyskey:readList your workspaces' AI model keys
PUT/v1/model-keys/{owner}setModelKeysessionAdd or replace a workspace's key for one vendor
DELETE/v1/model-keys/{owner}deleteModelKeysessionRemove a workspace's key for one vendor
GET/v1/connectionslistConnectionskey:readList your workspaces' GitHub and Hugging Face connections
PUT/v1/connections/{owner}/{provider}setConnectionsessionConnect GitHub or Hugging Face to a workspace
DELETE/v1/connections/{owner}/{provider}deleteConnectionsessionDisconnect GitHub or Hugging Face from a workspace
POST/v1/github/webhookreceiveGithubWebhooknoneGitHub's events for the hub's GitHub App

spend (5)

Cloud work an AI agent's key asked for beyond the free allowance, held until a person confirms it. The agent's call answers 202 with a hold. A person approves or denies the hold from the Inbox. Approving creates the job under the agent's recorded request, attributed to its key.

spend operations
MethodPathScopeSummary
GET/v1/spend/holdslistSpendHoldskey:readList held cloud spend
GET/v1/spend/holds/{hold_id}getSpendHoldkey:readGet one held request
POST/v1/spend/holds/{hold_id}/approveapproveSpendHoldsessionApprove a held request and create its job (web session only)
POST/v1/spend/holds/{hold_id}/denydenySpendHoldsessionDeny a held request with a reason (web session only)
POST/v1/spend/holds/{hold_id}/cancelcancelSpendHoldkey:writeWithdraw a held request

motion (10)

Learning a motion from a video. A clip of one person becomes a preview of the robot doing the move. After a person confirms, it becomes a trained policy checked in MuJoCo.

motion operations
MethodPathScopeSummary
GET/v1/motion-jobslistMotionJobskey:readList motion jobs
POST/v1/motion-jobscreateMotionJobkey:writeStart learning a motion from a video
GET/v1/motion-jobs/{motion_job_id}getMotionJobkey:readRead a motion job
POST/v1/motion-jobs/{motion_job_id}/uploadedcompleteMotionUploadkey:writeSay the clip is uploaded and queue the preview
POST/v1/motion-jobs/{motion_job_id}/retimeretimeMotionJobkey:writeSlow the motion down and remake the robot's preview
POST/v1/motion-jobs/{motion_job_id}/traintrainMotionJobkey:writeTrain the robot to do the previewed motion, then check it
POST/v1/motion-jobs/{motion_job_id}/cancelcancelMotionJobkey:writeCancel a motion job
POST/v1/motion-jobs/{motion_job_id}/claimclaimMotionJobkey:trainClaim a motion job's queued stage (motion worker protocol)
POST/v1/motion-jobs/{motion_job_id}/artifactspresignMotionArtifactskey:trainPresign uploads for a running stage's artifacts
POST/v1/motion-jobs/{motion_job_id}/reportreportMotionJobkey:trainReport progress or the result of a claimed stage

mcp (1)

The hub as a remote MCP server: one URL an AI agent connects to, with an API key, and the same tools the lucen-mcp package serves.

mcp operations
MethodPathScopeSummary
POST/mcpmcpMessagekey:readThe hub as a remote MCP server

admin (2)

Who uses the hub, for the hub's own operators. Only a hub admin signed in to the web app may call these. An API key is 403. Anyone else is 404.

admin operations
MethodPathScopeSummary
GET/v1/admin/userslistAdminUserssessionEveryone with an account on this hub
GET/v1/admin/statsgetAdminStatssessionHow many people use the hub, and what they made

llm (2)

The model gateway. One interface to AI models from Anthropic, OpenAI, Google Gemini and OpenRouter. Each call is metered and billed to the workspace, or made with the workspace's own key for that vendor.

llm operations
MethodPathScopeSummary
GET/v1/llm/modelslistLlmModelsnoneThe AI models the hub offers, with their prices
POST/v1/llm/messagescreateLlmMessagekey:trainOne AI model call for a MouseMouse agent

billing (6)

Pay as you go. There are no plans and no monthly fee. Every workspace gets a free amount each month. A workspace with a payment method pays for what it uses past that, once a month, up to the limit it set. Payments go through Stripe. On a hub that takes no payments, every workspace has the free amount only.

billing operations
MethodPathScopeSummary
POST/v1/billing/stripe-webhookreceiveStripeWebhooknoneStripe's webhook
GET/v1/billing/pricesgetBillingPricesnoneThe hub's prices
GET/v1/billinggetBillingkey:readA workspace's use this period, what it will pay and its cap
PUT/v1/billing/capsetBillingCapsessionSet a workspace's monthly cap
POST/v1/billing/checkoutcreateBillingCheckoutsessionAdd a payment method
POST/v1/billing/portalcreateBillingPortalsessionOpen the Stripe customer portal

agent (17)

The hub's cloud agent. A session works toward a goal with the hub's own tools and a sandboxed shell. It acts as a short-lived key scoped below its creator's. Spends past a pre-approved budget wait for a person. Everything it does is recorded as an append-only event stream.

agent operations
MethodPathScopeSummary
GET/v1/agent/sessionslistAgentSessionskey:readList agent sessions
POST/v1/agent/sessionscreateAgentSessionkey:trainStart an agent session (the hub's cloud agent works toward a goal)
GET/v1/agent/sessions/{session_id}getAgentSessionkey:readGet an agent session (status, spend, what it waits on, pending approvals)
POST/v1/agent/sessions/{session_id}/messagespostAgentMessagekey:trainSend the agent a message (a user turn)
GET/v1/agent/sessions/{session_id}/eventsstreamAgentEventskey:readStream a session's events (SSE, resumable)
POST/v1/agent/sessions/{session_id}/approvals/{approval_id}resolveAgentApprovalkey:trainApprove or deny a spend the agent asked for
POST/v1/agent/sessions/{session_id}/cancelcancelAgentSessionkey:trainCancel an agent session
POST/v1/agent/sessions/{session_id}/endendAgentSessionkey:trainEnd an agent session (done; a reply reopens it)
GET/v1/agent/sessions/{session_id}/planslistAgentPlanskey:readThe plans the agent proposed in this session, newest version first
GET/v1/agent/sessions/{session_id}/plans/{plan_id}getAgentPlankey:readOne version of the session's plan
POST/v1/agent/sessions/{session_id}/plans/{plan_id}/approveapproveAgentPlansessionApprove the agent's plan (a signed-in person only)
GET/v1/agent/sessions/{session_id}/decisionslistAgentDecisionskey:readThe session's decisions: plan, spend, shortlist, handoff
GET/v1/agent/sessions/{session_id}/digestgetAgentDigestkey:read"Since you left": what happened in the session since the viewer last looked
GET/v1/agent/sessions/{session_id}/objectslistAgentObjectskey:readThe session's objects grouped by state: Needs you, Running, Ready for review, Done
GET/v1/taskslistTaskskey:readList the agent's tasks, sessions and robot plans in one list
GET/v1/tasks/{task_id}getTaskkey:readGet one task with its stages, evidence and deploy requests
POST/v1/tasks/{task_id}/stopstopTaskkey:trainStop a task and the work it started

Errors

The response families the operations share. Every error body is RFC 9457 application/problem+json; 429 is an infrastructure response and is not listed per operation.

Shared error responses
ResponseDescriptionBody
Unauthorized

Missing or invalid credentials.

Problemapplication/problem+json
Forbidden

Authenticated but not allowed (visibility, membership or scope).

Problemapplication/problem+json
NotFound

Resource not found (or hidden from the caller).

Problemapplication/problem+json
Conflict

State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).

Problemapplication/problem+json
ValidationError

Request failed validation.

Problemapplication/problem+json
CertificationListUnknown

The hub cannot read Lucen's certification list right now, or the newest serial it accepted. Nothing was changed. Try again in a minute.

Problemapplication/problem+json
ServiceUnavailable

A service this endpoint needs is not configured in this deployment. The API boots with zero secrets. An endpoint that needs one says so instead of returning a stack trace.

Problemapplication/problem+json
SpendCapReached

The account's spend cap is in stop mode, and this job would carry the month past it. The month counts recorded Lucen cloud spend, what queued and running cloud work could still cost, and this job's own most possible cost. errors[].type is quota.spend_cap. Retry-After counts the seconds until the month ends. Nothing was recorded, and work already running keeps running.

Problemapplication/problem+json
ModelKeyRequired

This workspace has no key the hub may use for the model's vendor, or a limit is reached: its own key's monthly cap, or the workspace's limit. type and errors[].type say which: model_key_required, model_cap_reached or billing.cap_reached. settings_url is where a person adds a key, raises the cap or opens Billing. Nothing was spent.

Problemapplication/problem+json
LlmPaymentRequired

No key the hub may use for this vendor, or the call would pass a limit: the workspace's own key's monthly cap, or the workspace's balance. type and errors[].type say which: model_key_required, model_cap_reached, billing.cap_reached or llm.overshoot_unsettled. settings_url is where a person fixes it. Nothing was spent.

Problemapplication/problem+json
LlmVendorFailed

The model's vendor failed the call after the hub's retries, or did not answer in time. The detail names the vendor.

Problemapplication/problem+json
BillingProviderUnavailable

Stripe could not be reached or refused the request. Nothing changed. Try again in a moment.

Problemapplication/problem+json
SpendHeld

Held for a person's confirmation. The key is marked as an AI agent's, and the work would spend beyond the free hosted allowance. Nothing started, and nothing is reserved yet. A person approves or denies the hold from the Inbox. Poll getSpendHold with the hold's id.

SpendHoldapplication/json

Common schemas

What the shared responses carry. Every other schema is on the page of the first tag whose operations use it.

Problem

object

RFC 9457 problem details. Served as application/problem+json.

Problem fields
FieldTypeDescription
typestring

default "about:blank"

URI reference identifying the problem type.

titlerequiredstring

Short human-readable summary of the problem type.

statusrequiredinteger

≥ 100 · ≤ 599

detailstring | null

Human-readable explanation specific to this occurrence.

instancestring | null

URI reference identifying this occurrence.

errorsarray of FieldError | null

Field-level validation errors (422 responses).

settings_urlstring | null

Where a person fixes this on the web app, as a path. Present on the 402 answers about AI model access.

SpendHold

object

Cloud work an AI agent's key asked for beyond the free allowance, waiting for a person. Nothing is reserved while it waits. Approving creates the job from request, as the key, attributed to it for usage.

SpendHold fields
FieldTypeDescription
idrequiredId
kindrequiredSpendHoldKind
statusrequiredSpendHoldStatus
ownerrequiredRepoOwner

The account that would pay.

workrequiredSpendHoldWork
requestrequiredobject

The request body as the key submitted it: a RunCreate for a run, a RolloutCreate for a sim test.

estimated_usdrequirednumber | null

The hub's estimate of the cost. Null where it has none.

reserved_usdrequirednumber

The most the job can cost. Approving reserves this against the account.

allowancerequiredSpendHoldAllowance | null
requested_byrequiredSpendHoldKey | null
requested_by_userrequiredUserPublic | null

The person whose key asked.

created_atrequiredstring (date-time)
expires_atrequiredstring (date-time)

When a pending hold expires unanswered, 7 days after it was filed.

decided_atrequiredstring (date-time) | null (date-time)
decided_byrequiredUserPublic | null

The person who approved or denied it.

decision_reasonrequiredstring | null

Why it was denied.

result_idrequiredstring | null

The run's or the sim test's id, once approved.

caprequiredSpendCap | null

The account's spend cap as it stands now, so a person can see whether approving would carry the month past it. Null without a cap.

FieldError

object

FieldError fields
FieldTypeDescription
locrequiredarray of string | integer

Path to the offending field (body/query/path segments).

msgrequiredstring
typestring | null

Machine-readable error code.

Id

string

length ≤ 64

Prefixed ULID id, e.g. repo_01J8ZC9EXAMPLE0000000000EX.

SpendHoldKind

string

one of run · sim_test

run is a training run; sim_test is a sim test (a rollout).

SpendHoldStatus

string

one of pending · approved · denied · canceled · expired

pending waits for a person. approved created its job. denied was refused by a person with a reason. canceled was withdrawn by the key that filed it, or by a person. expired waited too long.

RepoOwner

object

RepoOwner fields
FieldTypeDescription
typerequiredstring

one of user · org

idrequiredId
handlerequiredHandle

SpendHoldWork

object

What was asked, in a few words, read from the stored request.

SpendHoldWork fields
FieldTypeDescription
summaryrequiredstring

length ≤ 300

One line in a person's words, such as "a MuJoCo PPO training run on Lucen cloud GPU L4 for up to 4 h". It names the template as people say it.

templatestring | null

The template's id, such as ppo_mujoco.

gpustring | null
max_hoursnumber | null
robotstring | null

owner/slug of the robot the work is about.

model_repostring | null

owner/slug of the policy a sim test runs.

batterystring | null

The sim test's suite, by name.

SpendHoldAllowance

object

The free hosted allowance the account has this month, and the share of it this request would take if it ran there. Null where no allowance applies to the account, or to the work: the allowance covers Lucen cloud CPU work only, so a held GPU run has none.

SpendHoldAllowance fields
FieldTypeDescription
limit_usdrequirednumber
remaining_usdrequirednumber
share_percentrequirednumber

The reservation as a percentage of the allowance.

coveredrequiredboolean

True when the free allowance alone could cover the reservation.

SpendHoldKey

object

The key that asked. Null when the key was deleted since.

SpendHoldKey fields
FieldTypeDescription
idrequiredId
namerequiredstring

UserPublic

object

UserPublic fields
FieldTypeDescription
idrequiredId
usernamerequiredSlug
display_namestring | null

length ≤ 128

avatar_urlstring (uri) | null (uri)
created_atrequiredstring (date-time)

SpendCap

object

An account's monthly cap on Lucen cloud spend, and where the current calendar month (UTC) stands against it. The month counts what is recorded plus what is reserved.

SpendCap fields
FieldTypeDescription
accountrequiredHandle
account_kindrequiredstring

one of user · org

limit_usdrequirednumber

> 0

moderequiredSpendCapMode
spent_usdrequirednumber

Lucen cloud spend recorded this calendar month: hosted training runs, sim tests, robot and model checks, and endpoint sessions. The agent has its own allowance and does not count.

reserved_usdrequirednumber

The most that queued and running Lucen cloud work can still cost. Each job's reservation is released when it finishes, and its real cost is recorded instead.

percentrequirednumber

spent_usd plus reserved_usd, as a percentage of limit_usd.

thresholdrequiredinteger

one of 0 · 50 · 75 · 100

The highest warning level reached by spent_usd plus reserved_usd: 50, 75 or 100. Zero below 50.

stoppingrequiredboolean

True when mode is stop and the recorded spend plus the open reservations have reached the cap. New hosted work is then refused with 429 until the month ends. Below it, a job whose own reservation would carry the month past the cap is refused too.

period_startrequiredstring (date-time)
period_endrequiredstring (date-time)

When the month ends and the count starts again, UTC.

Handle

string

length 1–64 · pattern ^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$

Owner handle: a username or an org slug. Users and orgs share one namespace.

Slug

string

length 1–64 · pattern ^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$

Lowercase URL-safe name: a-z 0-9 -, no leading/trailing dash.

SpendCapMode

string

one of warn · stop

warn warns at 50, 75 and 100 percent. stop warns too, and refuses new hosted work at 100 percent. Running work is not stopped.

Every schema (890)