API reference
This interactive reference is generated directly from the control plane's OpenAPI 3.1 specification (dist/apps/opencrane/openapi.json) — the same spec served at runtime from GET /api/v1/openapi.json and published as a release asset. It is always in sync with the implementation (a CI drift gate enforces it).
For authentication, error envelopes, and pagination conventions, read the API overview first.
Multi-tenant AI agent platform management API.
Authentication
- Human operators — OIDC browser flow via
GET /auth/login→/auth/callback. Session cookie is set server-side. - CLI operators — Device authorization grant via
POST /auth/device. The CLI opens the returnedverificationUriin the operator's browser, pollsGET /auth/device/token, and persists the issued token in~/.config/opencrane/credentials.json. - Automation / CI — Bearer token via the
OPENCRANE_TOKENenvironment variable, validated against theOPENCRANE_API_TOKENserver-side env var. - Endpoints tagged Auth and Meta (
/auth/*,/openapi.json) require no credentials.
Servers
Show the fleet awareness contract rollout state
Authorizations
Static bearer token. Pass as Authorization: Bearer
Responses
Current rollout state.
Define (or redefine) the awareness rollout; resets the frontier
Authorizations
Static bearer token. Pass as Authorization: Bearer
Request Body
Responses
Rollout defined.
Advance the rollout frontier (one wave, or up to a named wave)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Request Body
Responses
Frontier advanced.
One-step rollback: return every wave to the stable version
Authorizations
Static bearer token. Pass as Authorization: Bearer
Responses
Rolled back.
Resolve the awareness contract version a tenant runs
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Resolved version.
Fleet participation, drift, and policy-violation monitoring
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Query Parameters
"critical""warning"Responses
Fleet participation report.
Inspect a chat-window session's awareness scope binding
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Current session scope binding.
Bind a session scope (CP intersects with the principal's entitlements)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Request Body
Responses
Authorised binding; rejected lists any over-scope dropped.
Clear a session's scope binding
List all tenants
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Query Parameters
Return only tenants attached to this parent ClusterTenant (customer).
Responses
Tenant list.
Create a new tenant (admin/import path; dual-write: K8s CRD + database)
Internal seeding (owner-default on org create; member workspace on first login) is the production funnel — this route is the admin/import path. Every workspace it creates must be routable (email) and subject-bound; when a parent clusterTenantRef is given the subject must be a member of that org.
Authorizations
Static bearer token. Pass as Authorization: Bearer
Request Body
Responses
Tenant created.
Get a single tenant by name
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Tenant detail.
Update a tenant (dual-write: K8s CRD + database)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Request Body
Responses
Tenant updated.
Delete a tenant (offboarding teardown: cut sessions/devices, delete the LiteLLM key, remove CRD + DB row — retains Cognee datasets)
Suspend a tenant (scale deployment to zero)
Resume a suspended tenant
Get dataset memberships for a tenant
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Dataset memberships.
Update dataset memberships for a tenant
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Request Body
Responses
Dataset memberships updated.
Compile the effective awareness, MCP, and skill contract for a tenant
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Effective contract.
Detect drift between Tenant CRDs and PostgreSQL projection rows
Repair Tenant projection rows from CRD source of truth
Detect drift between AccessPolicy CRDs and PostgreSQL projection rows
Repair AccessPolicy projection rows from CRD source of truth
List all access policies
Authorizations
Static bearer token. Pass as Authorization: Bearer
Responses
Policy list.
Create an access policy (dual-write: K8s CRD + database)
Get a single access policy by name
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Policy detail.
Update an access policy
Delete an access policy
List all MCP servers with grants and credentials
Authorizations
Static bearer token. Pass as Authorization: Bearer
Responses
MCP server list.
Create a new MCP server
Authorizations
Static bearer token. Pass as Authorization: Bearer
Request Body
Responses
MCP server created.
Get a single MCP server by identifier
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
MCP server detail.
Update an MCP server and fully replace grants and credentials
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Request Body
Responses
MCP server updated.
Delete an MCP server and its linked grant rows
List the brokered credentials of an MCP server
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Credential list.
Add a brokered credential to an MCP server (does not touch grants)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Request Body
Responses
Credential added.
Remove a single brokered credential from an MCP server
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Credential deleted.
MCP Operator
Operations
List the published MCP servers the calling user is entitled to
Authorizations
Static bearer token. Pass as Authorization: Bearer
Responses
Entitlement-scoped catalogue.
List the servers the calling user has installed
Install a catalogue server for the calling user
Authorizations
Static bearer token. Pass as Authorization: Bearer
Request Body
Responses
Server installed.
Uninstall a server for the calling user (clears the stored credential)
Author a per-user credential (write-only) and mark the install connected
The submitted values are write-only: stored server-side as an opaque custody handle and NEVER returned by any response.
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Request Body
Responses
Credential connected.
Clear a per-user credential, returning the install to needs-credential
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Credential cleared.
Mark a remote-OAuth install connected after a successful handshake
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
OAuth connected.
Disconnect a remote-OAuth install, returning it to needs-credential
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
OAuth disconnected.
List every catalogue server regardless of status (org-admin governance view)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Responses
All catalogue servers.
Approve a server (pending-review → approved). Org-admin only
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Server approved.
Publish a server (approved → published). Org-admin only
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Server published.
Reject a server (→ disabled). Org-admin only
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Server rejected.
Toggle a server's availability (true → published, false → disabled). Org-admin only
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Request Body
Responses
Server availability updated.
Read a server's access policy. Org-admin only
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Access policy.
Replace a server's access policy wholesale. Org-admin only
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Request Body
Responses
Access policy updated.
List the selectable users and groups for the access editor. Org-admin only
List the file/chat resource shares the caller is a member of
Share a file/chat with a user (creates/extends the resource's share group)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Request Body
Responses
Recipient added (or already present).
Revoke a recipient from a resource share
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Recipient revoked.
List the shares the authenticated caller has created
Authorizations
Static bearer token. Pass as Authorization: Bearer
Responses
Shares created by the caller.
Share an entitlement you hold with another user or group (least-privilege bounded)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Request Body
Responses
An identical share already existed (idempotent).
Revoke a share you created
List all groups with member counts and awareness grants
Create a new group and optional awareness grants
Authorizations
Static bearer token. Pass as Authorization: Bearer
Request Body
Responses
Group created.
Get a single group by identifier
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Group detail.
Update a group and replace awareness grants
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Request Body
Responses
Group updated.
Delete a group and its awareness grants
List all skill bundles with entitlements and promotion history
Authorizations
Static bearer token. Pass as Authorization: Bearer
Responses
Skill bundle list.
Create a new skill bundle
Backfill all published bundles' content into the OCI store (P4D.2)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Responses
Backfill summary with per-bundle outcomes.
Get a single skill bundle by identifier
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Skill bundle detail.
Update a skill bundle and fully replace entitlements and promotions
Delete a skill bundle and its linked entitlement grants
List all skills with their model posture
Authorizations
Static bearer token. Pass as Authorization: Bearer
Responses
Skill posture list.
Get a single skill's model posture by its compound key
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Query Parameters
Skill name.
Skill scope.
Owning team; empty string when not team-scoped.
Responses
Skill posture detail.
Set (or clear) a skill's model posture
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Query Parameters
Skill name.
Skill scope.
Owning team; empty string when not team-scoped.
Request Body
Responses
Skill posture updated.
List all third-party sources
Register a new third-party source
Get a single third-party source
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Source detail.
Update a third-party source
Delete a third-party source and its linked items
List all issued access tokens (hashes only, never plaintext)
Create a new access token. Returns plaintext token once — store it securely.
Authorizations
Static bearer token. Pass as Authorization: Bearer
Request Body
Responses
Token created. The plainTextToken field will not be returned again.
Revoke and delete an access token
List configured provider API keys (configured status only, never the key value)
Create or update a provider API key
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Request Body
Responses
Key updated.
Delete a configured provider API key
List BYOK provider key status for every supported provider (never the key value)
Set or refresh a provider's raw key (writes a k8s Secret + LiteLLM credential)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
"openai""anthropic""gemini""mistral""deepseek""glm"Request Body
Responses
Key set; returns the provider's status.
Remove a provider's key (deletes the Secret, LiteLLM credential, and record)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
"openai""anthropic""gemini""mistral""deepseek""glm"Responses
Key removed (idempotent — 204 even when no key was set).
List provider credentials (references only — never the key value)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Query Parameters
Filter to one owning ClusterTenant.
Responses
Provider credential list.
Create a provider credential reference (rejects any raw-key field)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Request Body
Responses
Provider credential created.
Get a single provider credential by id
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Provider credential detail.
Update a provider credential reference (rejects any raw-key field)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Request Body
Responses
Provider credential updated.
Delete a provider credential
Model Registry
Operations
List model definitions
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Query Parameters
Filter to one owning ClusterTenant.
Responses
Model definition list.
Create a model definition and register it best-effort with LiteLLM
Authorizations
Static bearer token. Pass as Authorization: Bearer
Request Body
Responses
Model definition created.
Get a single model definition by id
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Model definition detail.
Update a model definition
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Request Body
Responses
Model definition updated.
Delete a model definition
List model-routing defaults
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Query Parameters
Filter to one owning ClusterTenant.
Responses
Model-routing default list.
Upsert the model-routing default for a (scope, clusterTenant) pair
Authorizations
Static bearer token. Pass as Authorization: Bearer
Request Body
Responses
Model-routing default upserted.
Get a single model-routing default by id
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Model-routing default detail.
Delete a model-routing default
List routing eval cases
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Query Parameters
Filter to one owning skill name.
Filter to one owning skill scope.
Filter to one owning skill team.
Responses
Routing eval-case list.
Create a routing eval case for a skill
Authorizations
Static bearer token. Pass as Authorization: Bearer
Request Body
Responses
Eval case created.
Get a single routing eval case by id
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Eval case detail.
Update a routing eval case by id
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Request Body
Responses
Eval case updated.
Delete a routing eval case by id
List shadow-savings measurements
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Query Parameters
Filter to one owning skill name.
Filter to one owning skill scope.
Filter to one owning skill team.
Responses
Measurement list.
Trigger a shadow-savings measurement for a skill + candidate (operator-gated, best-effort)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Request Body
Responses
Seams unconfigured — no-op; nothing recorded.
Get a single measurement by id
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Measurement detail.
List routing-change proposals
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Query Parameters
Filter by lifecycle status.
"pending""approved""rejected""applied"Responses
Proposal list.
Get a single proposal by id
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Responses
Proposal detail.
Approve a proposal — pin the skill to the proposed model and mark it Applied
Reject a proposal — flip status to Rejected; the skill posture is untouched
List savings recommendations (latest measurement + any open proposal, per skill)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Query Parameters
Filter to skills owned by this ClusterTenant (the skill's team).
Filter to one owning skill scope.
When 'true', return only skills with an open Pending proposal.
"true"Responses
Recommendations sorted by projected savings desc; scope-filtered to the caller's ClusterTenant for non-operators.
Proxy a metrics query to the self-hosted Langfuse backend (server-side auth; non-operators scoped to their tenant)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Query Parameters
Langfuse v1 metrics query JSON, forwarded verbatim (a tenant filter is injected for non-operators).
Responses
Upstream Langfuse metrics JSON (loosely-typed passthrough).
Get global monthly spend ceiling
Update the global monthly spend ceiling
List all per-account monthly spend ceilings
Create or update the budget ceiling for a specific account
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Path Parameters
Request Body
Responses
Account budget updated.
Remove the per-account budget ceiling
Get current spend and budget state for a tenant
Get LiteLLM virtual key metadata for a tenant (never the key value)
Revoke the LiteLLM virtual key for a tenant
Query audit log entries with optional tenant filter and cursor pagination
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Query Parameters
Filter to a specific tenant.
Maximum entries to return.
10011000Opaque cursor from a previous response for keyset pagination.
Responses
Paginated audit entries.
Get latest server utilisation snapshot (CPU, memory, storage, active tenants)
Authorizations
Static bearer token. Pass as Authorization: Bearer
Responses
Server utilisation snapshot.
Get projection drift metrics with threshold evaluation and alert state
List token usage records
Authorizations
Static bearer token. Pass as Authorization: Bearer
Parameters
Query Parameters
100Responses
Token usage records.
Return current auth mode and authenticated user identity (if any)
No authentication required. Returns 200 with the current session or an anonymous identity when no session is established.
Responses
Auth status.
Resolve the caller's OpenClaw pod gateway connection coordinates from their OIDC session
Single sign-on across the control plane and the tenant pod: requires an established OIDC session (cookie) and returns the wss:// gateway URL for the caller's own pod. Under trusted-proxy gateway auth the browser holds no credential — the gateway socket is authorised at the ingress against the live session (/auth/gateway-verify), so no token is returned. The tenant is resolved solely from the session's verified email, so a caller cannot obtain another user's pod connection. Returns 401 without a session, 403 when no tenant matches the session email, 409 when the pod has no gateway URL / ingress host yet or when the email maps to more than one tenant.
Responses
The caller's OpenClaw pod gateway connection coordinates.
Redirect the browser to the configured OIDC identity provider to start login
OIDC authorization callback — validates the response and establishes a session
Destroy the current session and return the IdP RP-initiated logout URL
Invalidates the server-side session. When OIDC is enabled and the identity provider advertises an end_session_endpoint, returns the URL the browser should navigate to so the upstream IdP session is also terminated (OIDC RP-Initiated Logout). The local session is always destroyed; endSessionUrl is null when no upstream logout is possible (OIDC disabled, IdP exposes no end-session endpoint, or the session captured no id_token). Non-browser callers may ignore the URL.
Responses
Session destroyed; optional IdP logout URL returned.
Initiate a CLI device authorization grant
Returns a device code and short user code. The CLI prints the verificationUri for the operator to open in a browser. No credentials required.
Responses
Device grant created.
Activate a device grant in the browser (requires OIDC session)
The operator opens this URL after a CLI login prompt. If no OIDC session is present the user is redirected to the identity provider first. On success an access token is created and the CLI poll endpoint unblocks.
Parameters
Query Parameters
Short user code from the CLI prompt (e.g. ABCD-1234).
Responses
Grant activated. HTML confirmation page returned.
Poll for the access token after browser activation
Returns 202 while pending, 200 with token when authorized, 410 when the grant has expired. The token is delivered exactly once.
Parameters
Query Parameters
Secret device code returned by POST /auth/device.
Responses
Grant authorized — token ready.