Skip to main content

Skulk API

Skulk serves an API at http://localhost:52415.

Local qualification fixture

The opt-in operator workload fixture serves a documented synthetic subset of these paths for isolated app observation. It is not part of the production API, starts no Skulk node, and cannot execute cluster mutations. Generated responses are not workload or capacity evidence.

That API has two jobs:

  • compatibility endpoints for tools that already speak OpenAI, Claude, or Ollama-style APIs
  • Skulk-specific control endpoints for placement, downloads, config, tracing, and model-store workflows

A model must be placed and running before chat requests for it succeed; calling /v1/chat/completions for an unplaced model returns a 404 No instance found. Text-generation endpoints require the mounted card to declare TextGeneration; targeting a TTS-only or STT-only model returns 400 Bad Request before any runner command is dispatched. This applies to Chat Completions, Responses, Claude, Ollama chat/generate, and benchmark adapters through their shared admission path. The First Success Flow below walks from placement to first token.

Quick Navigation​

First Success Flow​

1. Start Skulk​

Packaged users choose Start Skulk in the desktop app. From a source checkout, run:

uv run skulk

2. Preview placements​

curl "http://localhost:52415/instance/previews?model_id=mlx-community/Llama-3.2-1B-Instruct-4bit"

This shows what Skulk can actually place on the current node or cluster.

3. Launch a placement​

curl -X POST http://localhost:52415/place_instance \
-H 'Content-Type: application/json' \
-d '{
"model_id": "mlx-community/Llama-3.2-1B-Instruct-4bit",
"sharding": "Pipeline",
"instance_meta": "MlxRing",
"min_nodes": 1
}'

4. Send a chat request​

curl -X POST http://localhost:52415/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "mlx-community/Llama-3.2-1B-Instruct-4bit",
"messages": [{"role": "user", "content": "Hello from Skulk"}]
}'

If this fails with 404 No instance found for model ..., the placement is not ready yet or never launched successfully.

Endpoint Overview​

The groups below are a navigation summary. The generated API Reference contains every registered HTTP operation and its request/response schemas, including plugin management, pairing, aliases, and internal store transfer routes. On a running node, GET /api/openapi.json serves the machine-readable schema, GET /api/docs opens Swagger UI, and GET /api/redoc opens ReDoc. These documentation pages and dashboard routes are not inference or control operations. WebSocket contracts are documented manually under Realtime transcription and Fabric speech chains.

Paths containing a model ID accept repository-style IDs with /; placeholders such as {model_id} denote the complete ID, not a single repository component.

Compatibility APIs​

  • POST /v1/chat/completions
  • POST /v1/responses
  • POST /v1/embeddings
  • POST /v1/audio/speech
  • POST /v1/audio/transcriptions
  • POST /v1/audio/translations
  • GET /v1/audio/voices
  • WS /v1/realtime
  • WS /v1/fabric/chains/speech
  • POST /v1/messages
  • POST /v1/cancel/{command_id}
  • POST /ollama/api/chat
  • POST /ollama/api/generate
  • GET /ollama/api/tags
  • POST /ollama/api/show
  • GET /ollama/api/ps
  • GET /ollama/api/version

The Ollama group also serves alias paths (/ollama/api/api/..., /ollama/api/v1/..., and HEAD version probes); see Ollama API.

Images​

  • POST /v1/images/generations
  • POST /v1/images/edits
  • GET /images
  • GET /images/{image_id}

Videos​

  • POST /v1/videos
  • GET /v1/videos
  • GET /v1/videos/{video_id}
  • DELETE /v1/videos/{video_id}
  • GET /v1/videos/{video_id}/content
  • POST /v1/videos/{video_id}/cancel

Benchmarking​

  • POST /bench/chat/completions
  • POST /bench/images/generations
  • POST /bench/images/edits

Skulk Control APIs​

  • GET /v1/models
  • GET /models
  • POST /v1/tools/web_search
  • POST /v1/tools/open_url
  • POST /v1/tools/extract_page
  • GET /models/search
  • POST /models/add
  • POST /models/add-card
  • DELETE /models/custom/{model_id}
  • POST /place_instance
  • POST /instance
  • GET /instance/placement
  • GET /instance/previews
  • GET /instance/{instance_id}
  • DELETE /instance/{instance_id}
  • GET /state
  • GET /v1/engines
  • POST /v1/engines/{engine_id}/activate
  • POST /v1/engines/{engine_id}/rollback
  • POST /v1/engines/{engine_id}/remove
  • GET /events
  • POST /download/start
  • DELETE /download/{node_id}/{model_id}
  • GET /config
  • PUT /config
  • GET /store/health
  • GET /store/registry
  • GET /store/downloads
  • POST /store/models/{model_id}/download
  • DELETE /store/models/{model_id}/download
  • GET /store/models/{model_id}/download/status
  • DELETE /store/models/{model_id}
  • POST /store/purge-staging
  • GET /store/storage
  • POST /store/models/{model_id}/optimize
  • GET /store/models/{model_id}/optimize/status
  • GET /filesystem/browse
  • GET /node/identity
  • GET /node_id
  • POST /admin/restart
  • GET /onboarding
  • POST /onboarding
  • GET /v1/tracing
  • PUT /v1/tracing
  • GET /v1/telemetry/preview
  • GET /v1/traces
  • GET /v1/traces/cluster
  • POST /v1/traces/delete
  • GET /v1/traces/{task_id}
  • GET /v1/traces/{task_id}/stats
  • GET /v1/traces/{task_id}/raw
  • GET /v1/traces/cluster/{task_id}
  • GET /v1/traces/cluster/{task_id}/stats
  • GET /v1/traces/cluster/{task_id}/raw
  • GET /v1/diagnostics/node
  • GET /v1/diagnostics/telemetry
  • GET /v1/diagnostics/performance-envelopes
  • GET /v1/diagnostics/performance-envelopes/cluster
  • POST /v1/diagnostics/node/capture
  • POST /v1/diagnostics/node/runners/{runner_id}/cancel
  • GET /v1/diagnostics/cluster
  • GET /v1/diagnostics/cluster/timeline
  • GET /v1/diagnostics/cluster/{node_id}
  • POST /v1/diagnostics/cluster/{node_id}/capture
  • POST /v1/diagnostics/cluster/{node_id}/runners/{runner_id}/cancel
  • GET /v1/capabilities
  • POST /v1/capabilities/call
  • POST /v1/capabilities/stream
  • POST /v1/capabilities/stream/cancel

Operator Authentication​

  • POST /v1/auth/pairing-sessions/challenge
  • POST /v1/auth/pairing-sessions/exchange
  • POST /v1/auth/token
  • GET /v1/auth/devices
  • DELETE /v1/auth/devices/{device_id}

The node diagnostics bundle includes the node's own Tailscale state (tailscale: running flag, tailnet IP, hostname, MagicDNS name), probed on the node the bundle describes, so the per-node cluster endpoint reports the selected node's tailnet identity rather than whichever node served the HTTP request. The probe is best-effort: a node without a working tailscale CLI reports running: false, and null marks only an unexpected probe failure.

For the full interactive reference with request/response schemas, see the API Reference.

Operator Device Pairing​

Operator pairing is explicitly started on the host that will act as the designated remote gateway. It does not expose an HTTP endpoint that creates pairing sessions.

Relay route registration​

The Skulk Operator app reaches the gateway through a content-blind relay. When the gateway has no relay route, skulk operator pair registers one before printing the QR code:

  • the gateway generates a P-256 connector key, a 16-byte authority epoch, and two distinct 32-byte carrier credentials;
  • it sends POST /v1/registrations to the relay origin with exactly connectorAuthorityKeyId (SHA-256 of the key's DER SubjectPublicKeyInfo), appCarrierCredentialDigest, and gatewayCarrierCredentialDigest (SHA-256 of each raw credential), all canonical unpadded base64url;
  • the relay returns routingLocator, connectorRegion, appWebsocketUrl, gatewayControlWebsocketUrl, and gatewayDataWebsocketUrl;
  • Skulk stores the route with its own secrets in the encrypted authority journal as an on-demand route, and a running node starts remote access within a few seconds without a restart.

The relay origin is connectivity.relay.registration_url in skulk.yaml (HTTPS, or HTTP on loopback for development), falling back to the build's default relay. connectivity.relay.enabled: false turns registration off, and an offline node never registers. Network failures, timeouts, and uncoded 5xx answers are retried twice with the same values, which the relay treats as the same registration; so is the relay's unavailable code (503), which means it is momentarily busy. Other coded refusals are reported, not retried: invalid_request (400), not_found (404, the relay has registration turned off), already_registered (409), rate_limited (429, with its Retry-After), registration_paused (503, with its Retry-After), and capacity_exhausted (503). The relay never receives the private key or a usable credential. It learns the key identifier, the two digests, the gateway's public address, connection times, and byte counts; app traffic stays inside TLS that terminates on the gateway.

uv run skulk operator forget-relay

forget-relay records a tombstone in the journal and removes the route's inner-TLS identity. A running node stops remote access within a few seconds. Active invitations created for the route are revoked, since their QR codes can never reach the node again; invitations for a direct --exchange-url stay valid. Phones paired through the route lose remote access, and their device records keep their slots until revoked. The relay is not contacted. Registering again creates a new route, and phones must pair again.

If the relay revokes the connector, or refuses the route's credentials continuously for ten minutes, remote access stops and stays stopped until the route is forgotten and registered again. Shorter refusals, such as during a relay redeploy, are retried.

Hand-provisioned relay routes​

A self-hosted or operator-provisioned relay supplies a provisioning file instead:

uv run skulk operator configure-relay \
--provisioning-file /protected/path/skulk-provisioning.json \
--operator-api-port 52417 \
--cluster-name "Cluster"

The relay service supplies one of two generated schemas. Version one contains version, app_websocket_url, gateway_websocket_url, routing_locator, distinct app_carrier_credential and gateway_carrier_credential values, and optional lane_count (default four). Version two keeps the same app URL, locator, and role credentials, replaces the gateway and lane fields with gateway_control_websocket_url and gateway_data_websocket_url, and adds connector_authority_private_key_pkcs8, connector_authority_key_id, connector_region, and connector_authority_epoch. Treat either file as a secret: both contain the outer carrier roles, and version two also contains delegated connector signing authority. Skulk validates exact fixed carrier paths, requires WSS except for loopback development, stores the route, credentials, and optional connector authority inside the encrypted authority journal, generates an owner-only pinned TLS identity, and refuses silent replacement (run forget-relay first to replace a route). A running node opens version one's bounded outbound lane pool or establishes version two's signed control connector within a few seconds; no restart is needed. A version-two gateway admits at most 64 active data lanes before allocating a task or opening relay and loopback sockets; excess requests remain unclaimed and expire at the relay. Signed lease renewal retains the initial control-session proof for data-socket admission, so new connections continue to open after a renewal without re-pairing. The operator listener defaults to loopback port 52417, separate from Skulk's default 52416 fabric transport.

uv run skulk operator pair \
--cluster-name "Cluster"

The command initializes the gateway's encrypted local authority store when needed, creates one high-entropy session that expires after five minutes, and prints a terminal QR code plus the exact skulk://pair?... fallback payload. When relay access is configured, the version-two QR uses it by default and contains cluster identity, fingerprint, the single-use nonce and expiry, plus the app-role outer carrier locator/credential and pinned inner-TLS material needed to reach these same pairing routes. It never contains a canonical access or refresh credential, or the gateway-role carrier credential. Treat the QR as host-authorized pairing material and do not publish it. The app-role carrier credential only admits an opaque relay lane; the five-minute nonce and device proof still gate credential issuance at Skulk.

Version-two packages use bounded compact JSON compressed with zlib and carried in the QR's single z query parameter. Skulk rejects a package before persisting its session if it would exceed the terminal-scannable budget. Version-one direct packages retain the uncompressed payload shape.

The legacy command remains five-minute and single-use for compatibility. For a reusable, revocable version-three invitation, opt in with bounded host flags:

uv run skulk operator pair \
--valid-for 90d \
--max-pairings 10 \
--qr-output review.png

--valid-for accepts a positive integer followed by m, h, or d, from one minute through 90 days. Invitation mode permits every free device slot by default and accepts an explicit limit from one through twenty, reduced to the free slots (the command says so when it reduces a request). It creates a separate five-minute attempt for every scan, so concurrent devices do not share or replace challenges. At most ten attempts may be live and one hundred may be issued over an invitation's lifetime. Only successful credential issuance counts against the pairing limit.

A cluster allows at most five active paired devices. A device stops counting when it is revoked or when its 30-day refresh credential expires, because it must pair again either way. Once five devices are active, skulk operator pair refuses, existing invitations stop admitting scans, and the exchange refuses credentials; revoke a device to free a slot. The device count is checked again inside the same journal compare-and-set transition that issues credentials, so concurrent scans under several invitations cannot exceed five.

The compressed version-three package adds a public invitation ID, issue time, expiry, and pairing limit. It may carry the same app-role relay admission and pinned inner-TLS material as version two, but never a canonical Skulk access or refresh credential. Treat the QR and optional owner-only PNG as bearer secrets. The PNG writer uses owner-only permissions and refuses to overwrite a path.

Invitation management remains local to the designated host. Headless operators can use the CLI:

uv run skulk operator invitations list
uv run skulk operator invitations revoke <invitation-id>

Listing exposes only ID, creation and expiry times, usage, active-attempt count, and safe state; it never prints the nonce. Revocation blocks new and unfinished attempts but does not disconnect devices that already paired. Revoke those devices through the authenticated device-management API, the dashboard, or the CLI:

uv run skulk operator devices list
uv run skulk operator devices revoke <device-id>

devices list prints the used and free device slots, then each device's ID, pairing time, state (active, expired when its refresh credential lapsed, or revoked), and name. It never prints credential material. devices revoke invalidates the device's credentials immediately and frees its slot.

The dashboard exposes the same authority operation under Settings → Devices & pairing. Pair a phone does everything in one action: on a node without a relay route it registers one (POST /v1/auth/remote-pairing), waits up to 20 seconds for the relay session, then creates the invitation. Before the first registration the panel notes that traffic between the cluster and the paired app is end to end encrypted; Remote access lists what the relay can observe. It shows the relay connection state, says where pairing is managed when another node holds the cluster's route, and offers Turn off while a route is stored. Operators choose a lifetime and device limit, generate a branded QR, and may download or revoke it. The panel shows how many of the five device slots are in use, offers only as many devices as there are free slots, and disables code generation with revoke guidance when no slot is free. Devices whose refresh credential expired are marked Expired. The bearer QR remains in mounted browser memory for five minutes and then the section resets; this display timeout does not shorten a longer invitation. Safe invitation status remains visible without the nonce or pairing code.

--exchange-url https://gateway.example.invalid remains an optional direct LAN/Tailscale path. It skips relay registration, and it is the way to pair when registration is off or no relay is configured. Remote exchange URLs must use HTTPS; cleartext HTTP is accepted only for loopback development URLs. A relay-configured package includes both the protected inner origin and relay bootstrap material, and the app prefers the relay path.

Pair a browser with the current gateway​

On the Plugins page, open Browser access, paste an owner invitation, select Review invitation, check the cluster identity/fingerprint and displayed gateway, then select Pair this browser. Use HTTPS or localhost so WebCrypto can generate the ephemeral Ed25519 device key. Legacy session and reusable invitation packages use the existing challenge/exchange protocol. Requests stay on the gateway serving the page; the browser does not navigate to invitation URLs or implement the native relay's pinned inner-TLS carrier. Open a reachable protected gateway URL first.

The browser checks the returned cluster ID and recomputes its public-key fingerprint before retaining credentials. Access and rotating refresh tokens remain in module memory, outside Redux, request metadata, logs, localStorage and sessionStorage. Reloading or disconnecting ends this tab's access; the owner can revoke its retained device record. Pairing grants no plugin privileges: the owner separately grants plugins:read, plugins:manage and/or plugins:approve to the displayed device ID.

Concurrent requests share one refresh before access expiry. A lost refresh response ends the session and is never replayed. Neither a forbidden nor unauthorized request is automatically retried, including paid approval POSTs. Revoked authentication ends paired access; a 403 for a missing scope keeps the pairing available for an owner grant. Session changes clear dashboard query caches and remount plugin drafts. A disconnected or failed pairing never silently becomes direct owner access; choose Use direct host access explicitly to return to independently checked local administration. Invitation and credential inputs are cleared before submission.

Create a dashboard pairing invitation​

POST /v1/auth/pairing-invitations

Parameters:

  • JSON body validForSeconds (required): whole-second lifetime from 60 through 7,776,000 seconds (90 days).
  • JSON body maxPairings (required): successful device limit from 1 through 20. The created invitation allows at most the cluster's free device slots, so a larger value is reduced; the returned invitation.maxPairings is the effective limit.
  • Header X-Skulk-Dashboard: pairing-v1 (required): explicit dashboard request marker.

Behavior:

  • requires a loopback or Tailscale socket peer, an exact same-origin browser Origin or Referer, and a loopback, MagicDNS, *.ts.net, or literal Tailscale dashboard host;
  • accepts Tailscale's 100.64.0.0/10 IPv4 and fd7a:115c:a1e0::/48 IPv6 address spaces only after the local Tailscale authority verifies the exact socket peer, rejects proxy forwarding headers, and remains unavailable through an ordinary LAN or unverified CGNAT connection;
  • is available only when the dashboard is opened on the configured operator gateway through Tailscale or localhost;
  • is explicitly unavailable through OperatorGatewayAuthorization, even to a valid fully scoped device;
  • reuses OperatorPairingService.create_invitation, so the CLI and dashboard cannot diverge in identity, relay material, limits, or journal behavior;
  • returns safe invitation status plus one pairingCode containing the secret skulk://pair?z=... bearer package;
  • returns Cache-Control: no-store, max-age=0 and Pragma: no-cache; clients must not persist the response, put it in URLs, logs, telemetry, or shared application state;
  • returns an actionable 403 outside the direct Tailscale/localhost dashboard authority, an actionable 409 on a non-gateway or before relay configuration, an actionable 409 when the cluster already has five active paired devices, 422 if the generated package exceeds the reliable QR budget, and 503 when the configured gateway identity is temporarily unavailable.

Read paired-device capacity​

GET /v1/auth/pairing-capacity

Parameters:

  • Header X-Skulk-Dashboard: pairing-v1 (required).

Behavior:

  • applies the same loopback-or-Tailscale peer, exact same-origin, trusted-host, and no-forwarding boundary as invitation creation, and is unavailable through OperatorGatewayAuthorization;
  • returns activeDevices (paired devices that are not revoked and hold an unexpired refresh credential), maximumDevices (five), and availableSlots (devices that can still pair before one must be revoked);
  • reports every slot free on a node that has never paired a device, rather than failing;
  • returns no device identities or credential material;
  • returns an actionable 403 outside the direct verified Tailscale/localhost dashboard authority.

List dashboard pairing invitations​

GET /v1/auth/pairing-invitations

Parameters:

  • Header X-Skulk-Dashboard: pairing-v1 (required).

Behavior:

  • applies the same loopback-or-Tailscale peer, exact same-origin, trusted-host, and no-forwarding boundary as creation;
  • returns invitation ID, creation/expiry, successful and maximum pairings, active/total attempts, and state;
  • never returns the invitation nonce, QR payload, carrier credentials, or canonical operator credentials;
  • returns an empty list on a node that has never paired, and an actionable 403 outside the direct verified Tailscale/localhost dashboard authority.

Read phone pairing status​

GET /v1/auth/remote-pairing

Parameters:

  • Header X-Skulk-Dashboard: pairing-v1 (required).

Behavior:

  • applies the same loopback-or-Tailscale peer, exact same-origin, trusted-host, and no-forwarding boundary as invitation management, and is unavailable through OperatorGatewayAuthorization;
  • returns state: not_set_up (no relay route), registering, connecting (a route is stored and its relay session is starting), connected (the relay holds a live session from this node), relay_unreachable (no live session for 20 seconds, or remote access failed and is retrying), revoked (the relay permanently refused the route), or managed_elsewhere (another node advertises the cluster's relay route);
  • also returns registrationAvailable with registrationBlockedReason (disabled, offline, or not_configured), the last registration failure code as lastFailure, retryAfterSeconds while a relay-requested delay lasts, managedOnNodeId and managedOnNodeName for managed_elsewhere, and relayHost;
  • returns Cache-Control: no-store, and 503 with code pairing_state_unavailable when local pairing state cannot be read.

Turn phone pairing on​

POST /v1/auth/remote-pairing

Parameters:

  • Header X-Skulk-Dashboard: pairing-v1 (required). No body.

Behavior:

  • applies the same direct-dashboard boundary as the status route;
  • registers a relay route for this node exactly as skulk operator pair does (see Relay route registration) and starts remote access without a restart, then returns the status;
  • is idempotent: with a route already stored, or a registration already in flight, it returns the current status without registering again;
  • checks before contacting the relay: 409 with code managed_elsewhere while another node manages pairing, device_limit when the cluster has its maximum of paired devices, or disabled, offline, or not_configured when this node cannot register;
  • maps relay outcomes to 429 (rate_limited, with Retry-After), 503 (registration_paused with Retry-After, capacity_exhausted, relay_busy, unreachable), and 502 (invalid_request, already_registered, registration_unsupported, invalid_response);
  • every error body is {"detail", "code", "retryAfterSeconds"}; the detail is English, and clients should key on code.

Turn phone pairing off​

DELETE /v1/auth/remote-pairing

Parameters:

  • Header X-Skulk-Dashboard: pairing-v1 (required).

Behavior:

  • applies the same direct-dashboard boundary as the status route;
  • forgets this node's relay route exactly as skulk operator forget-relay does: remote access stops without a restart, active invitations for the route are revoked, and paired devices keep their records until revoked; the relay is not contacted;
  • returns the status, and is idempotent;
  • returns 409 with code busy while a registration is in flight.

Revoke a dashboard pairing invitation​

DELETE /v1/auth/pairing-invitations/{invitation_id}

Parameters:

  • Path invitation_id (required): public invitation UUID.
  • Header X-Skulk-Dashboard: pairing-v1 (required).

Behavior:

  • applies the same loopback-or-Tailscale peer, exact same-origin, trusted-host, and no-forwarding boundary;
  • blocks new and unfinished attempts without revoking already paired devices;
  • returns 204 after success or idempotent repeated revocation, 404 for an unknown invitation, an actionable 403 outside the direct verified Tailscale/localhost dashboard authority, and 409 on a non-gateway, before relay configuration, or for an unresolved concurrent authority transition.

Create a device challenge​

POST /v1/auth/pairing-sessions/challenge

Parameters:

  • JSON body nonce (required): high-entropy capability from the QR package. It is deliberately excluded from the URL so normal request-path logs cannot retain it.
  • JSON body deviceName (required): operator-visible device label, 1–80 characters after whitespace normalization.
  • JSON body devicePublicKey (required): unpadded URL-safe base64 containing one raw 32-byte Ed25519 public key.
  • JSON body invitationId (optional): version-three invitation UUID. Omit it for legacy single-use packages.

Behavior:

  • accepts only a host-created, available session or invitation;
  • binds the proposed device key to a legacy session or a new independent five-minute invitation attempt;
  • returns a random base64url challenge, attempt expiresAt, and an attemptId only for version-three invitations;
  • returns 404 for an unknown nonce, 410 after expiry, 409 after another transition already used the session or when the cluster already has five active paired devices, 422 for an invalid public key, 429 with Retry-After when ten invitation attempts are already live, and 503 on an API node that has not been initialized as a gateway. Revoked, exhausted or expired invitations return 410; the lifetime attempt ceiling returns 410 only when requesting another attempt, while already-issued attempts may still finish before their own expiry.

Legacy version-one and version-two packages sign the domain-separated message defined by pairing_signature_message in src/skulk/operator/pairing.py:

"skulk-device-pairing-v1\\0"
|| ASCII(clusterId) || "\\0"
|| ASCII(nonce) || "\\0"
|| ASCII(challenge)

Version-three invitations instead sign the distinct message defined by pairing_invitation_signature_message:

"skulk-device-pairing-v2\\0"
|| ASCII(clusterId) || "\\0"
|| ASCII(invitationId) || "\\0"
|| ASCII(nonce) || "\\0"
|| ASCII(attemptId) || "\\0"
|| ASCII(challenge)

Here || means byte concatenation, each quoted \\0 is one NUL byte, and UUIDs use their canonical lowercase hyphenated representation. The v3 domain and both returned identifiers are mandatory: signing the legacy transcript for an invitation fails proof verification. Clients should use the corresponding shared helper when available rather than maintaining another copy of these bytes.

Exchange device proof​

POST /v1/auth/pairing-sessions/exchange

Parameters:

  • JSON body nonce (required): the same pairing capability. It is deliberately excluded from the URL so normal request-path logs cannot retain it.
  • JSON body signature (required): unpadded URL-safe base64 Ed25519 signature produced by the challenged device key.
  • JSON body invitationId and attemptId (optional as a pair): required for a version-three invitation and omitted together for legacy packages.

Behavior:

  • verifies possession of the exact device key bound during the challenge;
  • atomically consumes the legacy session or exact invitation attempt;
  • returns a stable deviceId, the validated cluster identity, a 15-minute opaque access token, a 30-day rotating refresh token, their expiries, and the granted canonical API scopes;
  • when relay access is configured, also returns one-time remoteAccess material: transport=paired_websocket_v1, app WebSocket URL, opaque route locator, app-role carrier credential, inner-TLS server name, and the pinned gateway certificate (gatewayCaCertificatePem; despite the name it is the gateway's self-signed server certificate, not a certificate authority). The gateway-role carrier credential is never returned;
  • stores only encrypted session/device state and one-way token digests;
  • never returns either credential again;
  • enforces the five-active-device limit inside the same journal compare-and-set transition that issues credentials, so concurrent exchanges under different invitations cannot exceed it;
  • returns 401 for an invalid proof, 404 for an unknown invitation or attempt, 409 for reuse, an out-of-order exchange, or a cluster that already has five active paired devices (no credential is issued), 410 when the session, attempt, or invitation is unavailable, and 503 on a non-designated node.

Together with refresh rotation, these are the complete pre-access-token HTTP surface on the relay-only listener. That listener serves the existing canonical Skulk app rather than a parallel mobile API: safe reads require cluster:read or models:read, inference/WebSocket routes require chat:write, mutations require operations:write, and device routes require devices:manage. The existing local listener and dashboard remain unchanged for direct clients; only the separate loopback TLS listener connected to the relay applies this bearer boundary.

Rotate operator credentials​

POST /v1/auth/token

Parameters:

  • JSON body deviceId (required): stable paired-device UUID returned by the exchange.
  • JSON body refreshToken (required): current opaque rotating refresh credential.

Behavior:

  • validates the device and current refresh-token digest;
  • atomically invalidates both members of the previous token pair;
  • returns a fresh 15-minute access token and 30-day refresh token, their expiries, and the device's unchanged scopes;
  • returns 401 for an unknown, revoked, expired, or replayed credential and 409 if concurrent credential state changed.

The client must replace both stored credentials as one operation. A response lost after the gateway commits rotation requires pairing again because replaying the previous refresh token is intentionally rejected. Relay and pinned TLS material are not repeated during refresh; the app retains them in platform secure storage until it disconnects or pairs again.

List paired devices​

GET /v1/auth/devices

Parameters:

  • Authorization: Bearer <access-token>: a valid credential with devices:manage scope; or, without Authorization, X-Skulk-Dashboard: pairing-v1 from the trusted direct dashboard. The latter uses the same localhost or verified Tailscale peer, Host/Origin, and forwarding-header checks as invitation management. Relay access does not gain direct dashboard authority. A supplied invalid bearer never falls back to direct authority.

Behavior:

  • returns stable device IDs, display names, pairing times, refresh expiries, active/revoked state, and which row represents the caller;
  • active describes credential state, not device presence or recent activity;
  • direct dashboard responses mark no device as the caller;
  • never returns device public keys, token digests, raw credentials, or pairing nonces;
  • returns 401 for a missing, malformed, unknown, revoked, or expired bearer and 403 when the bearer lacks device-management scope;
  • returns an empty list to the direct dashboard on a node that has never paired.

Revoke a paired device​

DELETE /v1/auth/devices/{device_id}

Parameters:

  • path device_id (required): stable paired-device UUID to revoke;
  • Authorization: Bearer <access-token>: a valid credential with devices:manage scope; or, without Authorization, X-Skulk-Dashboard: pairing-v1 from the trusted direct dashboard. The latter uses the same localhost or verified Tailscale peer, Host/Origin, and forwarding-header checks as invitation management. Relay access does not gain direct dashboard authority. A supplied invalid bearer never falls back to direct authority.

Behavior:

  • atomically clears the target's access and refresh digests and expiries;
  • returns 204 after successful revocation and when an authorized caller repeats revocation for the same already-revoked target;
  • makes both credentials unusable immediately;
  • returns 401 for an invalid caller, 403 for insufficient scope, 404 for an unknown target device, and 409 if concurrent credential state changed.

OpenAI Chat Completions​

POST /v1/chat/completions

This is the main chat-generation endpoint for both text-only and multimodal models.

Requests are validated before dispatch: an empty messages array or a non-positive max_tokens returns 400 Bad Request rather than being accepted and failing during generation. (This applies across the Claude, Ollama, and Responses wire formats too, which share the same dispatch path.) The mounted model must also declare TextGeneration; speech-only cards return 400 Bad Request without affecting their speech runner.

A model running on an add-on engine (an engine package) answers one request at a time: further requests wait and are answered in the order they arrived, and a request whose client disconnects while waiting is not generated. It takes text only. A request with tools, an image, logprobs or top_logprobs returns 400 Bad Request with a message naming what to leave out, on every wire format, when every running instance of the model is on an add-on engine. If the model also runs on a built-in engine, the request is dispatched as usual; one that then lands on the add-on engine's instance is answered with an error object in the response body. The usage object of a reply from an add-on engine carries the engine's own counts: completion_tokens_details.reasoning_tokens is the number of thinking tokens in the reply, and prompt_tokens_details.cached_tokens is the number of prompt tokens the engine reused.

An already-assigned remote text request also ends with a data_plane_unavailable error when fresh resource readings positively show that its rank-zero output worker or this API node has no Zenoh peers. Check GET /state for zenoh_isolated and follow the explicit peer setup, including SKULK_ZENOH_CONNECT when multicast cannot reach peers. The collected response carries an error object; SSE emits the error followed by [DONE]. Headers may already be HTTP 200, so clients must inspect the error envelope. This checks the selected return path, not unrelated nodes, and imposes no first-token deadline: local output, unknown or stale readings, queued work and slow prefill remain eligible. The check runs within one second of a waiting receive observing fresh isolation evidence; startup telemetry can remain unknown while the mesh forms. Active work is cancelled and its API queue is released; an already terminal task instead receives normal completion cleanup.

Chat on an exact instance​

POST /v1/instances/{instance_id}/chat/completions accepts the same chat payload plus a required, nonempty allowed_node_install_ids JSON array of persistent installation UUIDs. Every assigned rank of the selected instance must belong to that set. The response carries X-Skulk-Instance-Id and uses the normal JSON or SSE stream, including disconnect cancellation.

Use this extension when a model has replicas in different operational pools and the caller must constrain which replica serves a request. The endpoint does not mount models or grant fleet mutation authority. A missing instance returns 404; a model mismatch, unknown node identity, or rank outside the allowlist returns 409 before inference. A missing or empty allowlist returns 422. If the instance disappears or becomes unavailable after admission, generation fails through the normal terminal-error path; it never falls back to another replica. Older Skulk versions return 404 for this route, so clients requiring scoped inference must retain that failure rather than retry the ordinary model-name endpoint.

Context-length limits​

GGUF cards may include gguf_cache_geometry, derived from the selected artifact's header, to distinguish per-token attention cache from fixed recurrent state. Registry-backed runtime cards also expose registry_gguf_metadata, the separately signed exact-file header evidence used for this projection. It names the repository, immutable revision, selected file, architecture, scalar dimensions, inspected-prefix length and digest, and any recurrent-layer override. This is not a whole-weight checksum. Skulk verifies its catalog snapshot and signed target version before use; canonical card IDs remain unchanged, but a changed runtime projection changes the full-card approval digest. Older installed metadata for the same canonical card does not override the current verified projection. For supported hybrid layouts, memory requirements include FP32 recurrent buffers for each serving slot and speculative rollback row. Embedded MTP adds its own attention layers without charging a second copy of the target weights. NodeResources.llama_server_settings reports the slot count and speculation override; placement captures those settings on each served shard. A settings change requires a new placement before the runner can start. Missing geometry retains the legacy estimate and is not proof that recurrent state costs zero.

Ordinary text requests prefer ready or running placements over placements still loading. Among equally ready placements, ordinary model instances take precedence over the resident steward, then active text-task counts balance requests. Retained completed tasks do not count as load. A placement with any failed or shutting-down runner, or without an initial status for every rank, is unavailable. Explicit steward/canary pins never fall back to a sibling; an unavailable pin or a model with no viable placement emits instance_unavailable for the correlated task instead of leaving the request queued indefinitely.

Every placed instance has a usable context limit: the smaller of the model's advertised context length and the number of KV-cache tokens that fit in memory next to the model weights on the hosting node(s). Requests are admitted against that limit instead of growing the KV cache until the node runs out of memory:

  • A max_tokens value that cannot fit in the limit at all returns 400 Bad Request immediately (context_length_exceeded: ...).
  • After tokenization on the serving instance, a prompt that fills the window, or a prompt plus an explicit max_tokens that exceeds the limit, is rejected with an OpenAI-style invalid_request_error whose message starts with context_length_exceeded:. The HTTP status is already committed when the rejection is computed on the serving node, so this arrives in the body: as the first SSE data: event for streaming requests, and as the response body for non-streaming ones.
  • When max_tokens is omitted, the server default output budget is clamped to the remaining window, so generation ends with finish_reason: "length" instead of overrunning the context.

OpenAI Python SDK Example​

from openai import OpenAI

client = OpenAI(
base_url="http://localhost:52415/v1",
api_key="unused",
)

response = client.chat.completions.create(
model="mlx-community/Llama-3.2-1B-Instruct-4bit",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

Curl Example​

curl -X POST http://localhost:52415/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "mlx-community/Llama-3.2-1B-Instruct-4bit",
"messages": [{"role": "user", "content": "Hello!"}]
}'

Streaming Example​

stream = client.chat.completions.create(
model="mlx-community/Llama-3.2-1B-Instruct-4bit",
messages=[{"role": "user", "content": "Tell me a story"}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")

Streaming response shape​

Streaming responses are Server-Sent Events. Each event is a data: line carrying one chunk object, and the stream ends with a literal data: [DONE] sentinel:

data: {"id":"...","object":"chat.completion.chunk","created":1787328699,
"model":"mlx-community/Llama-3.2-1B-Instruct-4bit",
"choices":[{"index":0,"delta":{"role":"assistant","content":"Once"},
"finish_reason":null}],"usage":null}

data: {"id":"...","object":"chat.completion.chunk", ... ,
"choices":[{"index":0,"delta":{"content":" upon"},"finish_reason":null}]}

data: [DONE]

Two differences from the non-streaming response matter to clients:

  • object is chat.completion.chunk, not chat.completion. Strict clients validate this discriminator and reject a stream that carries the non-streaming value.
  • Each choice carries a delta holding only what is new, rather than a complete message.

Skulk also emits SSE comment lines, which begin with : and which a compliant client ignores. These carry the command id at the start of the stream, and generation statistics at the end when available. A client that treats every non-blank line as data will need to skip them.

Reasoning models place thinking text on delta.reasoning_content rather than delta.content, so a client that reads only content shows the answer without the reasoning. Tool calls arrive as a frame whose delta.tool_calls carries the accumulated call and whose finish_reason is tool_calls.

When generation fails mid-response​

A request that reaches a serving instance has already committed its HTTP status by the time generation runs, streaming or not, so a failure after that point is reported in the body rather than by the status. It carries an error object holding message, type and code, the same shape a request rejected before generation returns:

  • Non-streaming: the body is the error object instead of a completion. Check for an error key before reading choices.
  • Streaming: a data: frame carrying the error object, followed by data: [DONE]. The stream always terminates with the sentinel, including when the task is cancelled or ends without completing, so a client can distinguish a finished turn from a dropped connection.

The status is committed early on purpose. It is what lets the server notice that a caller has disconnected and stop the generation, rather than producing tokens for a client that has gone away.

A response body is never empty, and a partial answer is never presented as a complete one. A turn ends only when the model reports a finish reason, so a request that produced nothing, or that produced text and then stopped without one, returns an error object rather than zero bytes or a silently truncated completion.

Common Request Fields​

FieldTypeNotes
modelstringRequired. Must match a placed and running model.
messagesarrayRequired. Supports system, user, assistant, developer, tool, function.
streambooleanUse true for SSE streaming.
temperaturenumberSampling temperature.
top_pnumberNucleus sampling.
top_kintegerTop-k sampling.
min_pnumberMinimum-probability threshold.
max_tokensintegerMax generated tokens. When omitted, Skulk uses the shared default of 4096 generated tokens (DEFAULT_MAX_OUTPUT_TOKENS); operators can override it with SKULK_MAX_OUTPUT_TOKENS (or the legacy SKULK_MAX_TOKENS). The served llama.cpp engine uses this finite bound with its exact rendered input-token count to reserve shared KV capacity before generation; waiters enter that pool FIFO.
stopstring or arrayStop sequences.
seedintegerReproducibility helper.
frequency_penaltynumberFrequency penalty.
presence_penaltynumberPresence penalty.
repetition_penaltynumberRepetition penalty.
repetition_context_sizeintegerContext window for repetition handling.
logprobsbooleanReturn token logprobs when supported.
top_logprobsintegerNumber of top logprobs to include.
toolsarrayOpenAI-style tool definitions.
tool_choicestring or objectauto, none, or a specific tool selection.
parallel_tool_callsbooleanAccepted for compatibility.
enable_thinkingbooleanSkulk extension for reasoning-capable models.
reasoning_effortstringReasoning hint when supported.
response_formatobjectAccepted for compatibility, not strictly enforced.
stream_optionsobjectIncludes include_usage.
userstringOptional caller identifier.

Message Format​

{
"role": "user",
"content": "hello"
}

Assistant messages may include tool_calls. Tool response messages should include tool_call_id.

User messages may also be sent as structured content parts. Skulk accepts OpenAI-style image inputs for vision-capable models:

{
"role": "user",
"content": [
{ "type": "text", "text": "What is in this image?" },
{
"type": "image_url",
"image_url": { "url": "data:image/png;base64,..." }
}
]
}

Notes:

  • inline data: URLs are supported for image inputs
  • Anthropic-compatible requests can also carry image content for multimodal models
  • image understanding depends on the selected model exposing the vision capability
  • request-scoped encoded image media is limited to 32 MiB; multipart image-edit uploads are read through the corresponding 24 MiB raw-image limit
  • image bytes are sent only after authoritative task placement, directly to the selected worker rank or ranks; they are bounded, integrity-checked, and each rank must acknowledge task-owner verification before the transfer deadline
  • image bytes are never written to the event log or replicated State

Finish Reasons​

ValueMeaning
stopNatural stop or stop sequence reached
lengthmax_tokens limit reached
tool_callsModel is requesting a tool call
content_filterReserved for compatibility
function_callReserved for compatibility
errorGeneration failed

Tool Use​

Skulk supports OpenAI-style function calling.

tools = [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a city",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string"}
},
"required": ["location"]
}
}
}]

response = client.chat.completions.create(
model="mlx-community/Qwen3.5-9B-4bit",
messages=[{"role": "user", "content": "What is the weather in Paris?"}],
tools=tools,
tool_choice="auto",
)

Typical flow:

  1. Send messages and tool definitions.
  2. Inspect finish_reason.
  3. If it is tool_calls, execute the tool in your app.
  4. Send the tool result back as a tool message.
  5. Request the final model response.

Two behaviors are worth knowing when you send tools.

Only the tools you offer come back. Some models reach for a built-in of their own rather than one of yours: Llama answers some plain questions by calling print, and gpt-oss has python and browser. A response that names no tool you offered is returned as ordinary content with its normal finish_reason, not as a tool_calls response, because you would have no implementation to run. Check finish_reason rather than assuming a response is a call.

tool_choice means the same thing on every engine. "none" removes the tools from the request, which is the only way to guarantee the documented behavior that the model does not call one: a model handed a tool and asked for it will call it whatever the request said. Naming a single function narrows the offered tools to that one, so the model cannot call a different tool than you asked for. A name matching none of your tools rejects the request with a 400, on every engine, because your forced choice cannot be honored and any answer would be a guess at what you meant; forcing a name while offering no tools at all is rejected the same way. "auto" and "required" pass through, and "required" is a best-effort instruction on the in-process engines rather than a guarantee, because forcing a call there would need constrained decoding.

A JSON answer stays an answer. Several model families write a tool call as a bare JSON object, so a request that both offers tools and asks for JSON output is ambiguous on the wire. Skulk resolves it in favor of the answer: text that does not parse as a call to one of your tools is returned as content. A short prefix of such a message is buffered while it could still be either reading, and released the moment it is distinguishable, so a JSON answer streams incrementally after a delay bounded by its first decisive key rather than arriving in one piece.

Thinking / Reasoning​

Skulk supports reasoning-aware chat for compatible models.

response = client.chat.completions.create(
model="mlx-community/Qwen3.5-9B-4bit",
messages=[{"role": "user", "content": "What is 127 * 43?"}],
enable_thinking=True,
)

msg = response.choices[0].message
print(msg.reasoning_content)
print(msg.content)

Notes:

  • enable_thinking is a Skulk extension.
  • Reasoning support depends on model capabilities.
  • Use GET /v1/models response data[].resolved_capabilities to decide whether a model supports thinking and whether clients should render a thinking toggle.
  • Treat resolved_capabilities as the default tool-free request path; request-specific options such as tools can change prompt rendering and related resolved values for mixed-mode model families.
  • Thinking-control semantics are model-aware:
    • if supports_thinking_toggle is true, send enable_thinking=true or false explicitly
    • if both enable_thinking and reasoning_effort are omitted for a model with a known toggleable capability profile, Skulk disables thinking using the profile's disabled effort
    • reasoning_effort="none" disables thinking for toggleable models
    • if a model does not support toggleable thinking, Skulk ignores explicit toggle overrides but still preserves explicit non-disabled reasoning-effort hints when the model family supports them

Builtin Browser Tools​

POST /v1/tools/web_search

Execute Skulk's generic web_search tool and return structured search results.

curl -X POST http://localhost:52415/v1/tools/web_search \
-H 'Content-Type: application/json' \
-d '{
"query": "foxlight skulk distributed inference",
"top_k": 5
}'

Request fields:

FieldTypeNotes
querystringRequired search query.
top_kintegerOptional max results, 1 to 10, default 5.

Response fields:

FieldTypeNotes
querystringOriginal search query.
providerstringSearch backend identifier.
resultsarrayOrdered search results with title, url, and snippet.

This endpoint is designed for client-executed tool loops. GPT-OSS can request web_search, the client can call this endpoint, then send the JSON result back as a tool message.

POST /v1/tools/open_url

Fetch one HTTP or HTTPS URL, follow redirects, and return structured metadata.

curl -X POST http://localhost:52415/v1/tools/open_url \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/article"
}'

Request fields:

FieldTypeNotes
urlstringRequired absolute http:// or https:// URL.

Response fields:

FieldTypeNotes
urlstringOriginal requested URL.
final_urlstringFinal URL after redirects.
titlestring or nullBest-effort page title.
status_codeintegerFinal HTTP status code.
content_typestring or nullNormalized response content type.
providerstringBackend provider identifier.

POST /v1/tools/extract_page

Fetch one HTTP or HTTPS URL and return bounded readable text extracted from the response body.

curl -X POST http://localhost:52415/v1/tools/extract_page \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/article",
"max_chars": 12000
}'

Request fields:

FieldTypeNotes
urlstringRequired absolute http:// or https:// URL.
max_charsintegerOptional maximum characters, 500 to 50000, default 12000.

Response fields:

FieldTypeNotes
urlstringOriginal requested URL.
final_urlstringFinal URL after redirects.
titlestring or nullBest-effort page title.
textstringReadable extracted text.
truncatedbooleanWhether the text was clipped to max_chars.
providerstringBackend provider identifier.

These browser-tool endpoints are designed for client-executed tool loops. In dashboard chat, GPT-OSS can request web_search, open_url, or extract_page; the dashboard executes the endpoint call, then sends the JSON result back as a tool message.

Structured Output​

response_format is accepted for compatibility, but Skulk does not currently enforce strict JSON mode or JSON schema validation.

response = client.chat.completions.create(
model="mlx-community/Qwen3.5-9B-4bit",
messages=[{"role": "user", "content": "Return valid JSON with three colors"}],
response_format={"type": "json_object"},
)

For the best results, explicitly instruct the model to return valid JSON.

OpenAI Responses API​

POST /v1/responses

Use this when your client expects the OpenAI Responses format instead of Chat Completions.

curl -X POST http://localhost:52415/v1/responses \
-H 'Content-Type: application/json' \
-d '{
"model": "mlx-community/Llama-3.2-1B-Instruct-4bit",
"input": "Hello from the Responses API"
}'

OpenAI Embeddings API​

POST /v1/embeddings

Generates embeddings with a mounted embedding model. The model must be placed and running, and its card must declare TextEmbedding: a non-embedding model returns 400 Bad Request, and an unplaced model returns 404 No instance found. An alias absent from the authorized model catalog also returns 404; inference never discovers it from Hugging Face as a side effect.

curl -X POST http://localhost:52415/v1/embeddings \
-H 'Content-Type: application/json' \
-d '{
"model": "BAAI/bge-small-en-v1.5",
"input": ["Skulk connects devices into one cluster"]
}'

Request fields:

FieldTypeNotes
modelstringRequired mounted embedding model id
inputstring or arrayRequired text or list of texts; an empty list returns 400 Bad Request
encoding_formatstringfloat (default) returns number arrays; base64 returns each embedding as base64-encoded little-endian float32 bytes
dimensionsintegerNot supported. Any value returns 400 Bad Request; embeddings come back at the model's native dimensionality
userstringOptional caller identifier, accepted for compatibility

The response is the OpenAI list shape: one data[] entry per input in input order, the resolved model, and usage with prompt and total token counts.

Vectors follow the model's own recipe, read from the sentence-transformers metadata shipped with its weights: the pooling mode (mean, CLS, max, or last token), whether vectors are L2-normalized, and the length past which input is truncated (max_seq_length, for example 256 tokens for MiniLM). Vectors from different models are not comparable. A model whose pipeline needs a step Skulk does not implement, such as a Dense projection, fails at load rather than serving approximate vectors. Programmatic callers that omit the model (the extension embed_texts helper) get the mounted embedding model with the lowest model id.

GGUF embedding cards are served by a dedicated llama-server (--embeddings) on any node with a llama-server engine, including Linux GPU and CPU nodes. Their pooling comes from the GGUF metadata and vectors are L2-normalized, as llama.cpp does by default. Such a card must declare context_length, the model's input length. The serving window is that length, or the smaller window placement stamps when the node's memory admits less; inputs longer than the window are truncated through the model's own tokenizer before embedding (llama.cpp itself would refuse them), matching the safetensors runner's truncation. A GGUF card and the safetensors card of the same model are different vector spaces; compare vectors only within one card.

OpenAI Audio Speech API​

POST /v1/audio/speech

Generates speech audio from a mounted text-to-speech model. The model must be placed and running, and its resolved capabilities must include supports_speech_synthesis. An alias absent from the authorized model catalog returns 404 rather than triggering Hub discovery.

curl -X POST http://localhost:52415/v1/audio/speech \
-H 'Content-Type: application/json' \
--output speech.wav \
-d '{
"model": "mlx-community/kokoro-test",
"input": "Hello from Skulk speech serving",
"voice": "af_heart",
"response_format": "wav"
}'

Request fields:

FieldTypeNotes
modelstringRequired mounted TTS model id
inputstringRequired text to synthesize
voicestring or nullOptional stable voice identifier. Accepted only when the mounted card declares a static audio.voices catalog; unknown names are rejected. Entries may be model-native speakers or checksummed reference profiles bundled with Skulk. When omitted, Skulk applies the card's audio.default_voice when declared.
speednumber or nullOptional positive speaking speed multiplier
response_formatstring or nullOptional output format: mp3, wav, flac, ogg, opus, or raw pcm. When omitted or set to null, Skulk uses mp3 for stream=true; otherwise it uses the mounted model card default when declared and falls back to mp3; supported values are constrained by the model card when declared
streambooleanOptional. When true, Skulk returns a chunked HTTP response and yields MP3 or raw PCM bytes as the speech runner emits them; accepted only when the mounted TTS card explicitly declares audio.supports_streaming = true and every routable instance of the requested model has a ready runner
streaming_intervalnumber or nullOptional positive model-specific streaming cadence hint, accepted only with stream=true
instruct, lang_codestring or nullOptional model-specific generation hints
temperature, top_p, top_k, repetition_penaltynumberOptional model-specific sampling controls
max_tokensinteger or nullOptional model-specific generation ceiling. An explicit value is preserved. When omitted and the mounted model explicitly declares this control, Skulk uses a 4096-token serving default instead of inheriting a potentially truncating upstream library default. Models that do not declare the control receive no injected keyword.
seedinteger or nullOptional unsigned 32-bit sampling seed. When supplied, the speech runner resets MLX sampling immediately before generation so identical model, voice, text, and sampling controls are reproducible. Omission preserves the upstream advancing random stream.
reference_audiomultipart file or nullOptional request-scoped voice-conditioning audio. Accepted only as a multipart upload for a mounted card declaring audio.supports_reference_audio = true; server-local paths are rejected
reference_textstring or nullOptional transcript of reference_audio; accepted only when the multipart upload is present

The response body is raw audio bytes with a matching audio media type (audio/mpeg, audio/wav, audio/flac, audio/ogg, audio/opus, or audio/pcm). For stream=true, the mounted TTS card must explicitly declare audio.supports_streaming = true. The response format must currently resolve to mp3 or pcm; when a streaming request omits response_format, Skulk requests mp3 instead of the model card's non-streaming default. Skulk returns audio/mpeg or audio/pcm with chunked HTTP bytes. Raw pcm is mono signed 16-bit little-endian audio; X-Audio-Sample-Rate, X-Audio-Channels, and X-Audio-Sample-Format define its framing. Admission returns 503 if any routable instance of the requested model lacks a ready runner. This is TTS output streaming, not a realtime session: the request text is still a complete bounded input, cancellation closes the command stream, and each chunk follows the mounted model's generation cadence. The registry's Qwen3 TTS card declares MP3 and PCM streaming support after live validation; Fish Audio and the other curated speech cards remain non-streaming. Streaming support is enabled card-by-card only when the runtime can provide the encoder and the model has passed streaming validation.

JSON requests remain text-only. To condition a supporting model with reference audio, send the same scalar fields as multipart form values and include a reference_audio file of at most 25 MiB. Skulk validates the mounted model and audio metadata, pins the request to one ready single-host instance, and sends the bytes over the node-addressed Zenoh data plane. Reference media is never written to State or the event log, and the serving runner deletes its temporary file when generation ends or fails. Reference-audio requests return 503 Service Unavailable when the Zenoh data plane is unavailable; Skulk never broadcasts private reference media through the gossipsub fallback.

Reference-capable cards may also expose Skulk's packaged voice profiles through the ordinary voice field. The worker resolves the selected identifier to its checksummed local MP3 and exact transcript; those asset paths and bytes never enter the command, State, or event log. This path does not require an upload or Zenoh media transfer. A multipart reference_audio upload is an explicit request-scoped override and cannot be combined with voice.

streaming_interval without stream=true, reference_text without a multipart reference upload, a multipart upload combined with voice, and JSON reference_audio path strings return 400 Bad Request.

Skulk Audio Voices API​

GET /v1/audio/voices?model=<model-id>

Returns stable model-native and bundled-reference voice identifiers declared by one mounted TTS model. This is a Skulk extension, not an OpenAI compatibility route. The model must declare audio.supports_voice_listing = true; otherwise Skulk returns 400 Bad Request.

curl 'http://localhost:52415/v1/audio/voices?model=org/tts-model'

The response is { "object": "list", "data": [...] }. Each item contains the voice id, display name, mounted model, a kind of "builtin" for a model-native speaker or "reference" for a checksummed profile shipped with Skulk, and an ordered preferred_languages array of BCP 47 tags when the model card declares language preferences. This endpoint does not create or persist user voice profiles.

OpenAI Audio Transcriptions API​

POST /v1/audio/transcriptions

Transcribes a multipart audio upload with a mounted speech-to-text model. The model must be placed and running, and its resolved capabilities must include supports_transcription.

curl -X POST http://localhost:52415/v1/audio/transcriptions \
-F model=mlx-community/whisper-test \
-F file=@sample.wav \
-F response_format=verbose_json

Request fields:

FieldTypeNotes
filefileRequired audio upload. Common WAV, MP3, FLAC, OGG, Opus, WebM, MP4/M4A containers are accepted up to 25 MiB
modelstringRequired mounted STT model id
languagestring or nullOptional input language hint
prompt, context, textstring or nullOptional model-specific transcription context
response_formatstringOptional output format: json, text, verbose_json, srt, vtt, or ndjson; default json
temperature, max_tokens, chunk_duration, frame_threshold, prefill_step_sizenumber or integerOptional model-specific generation controls passed through only when the runner supports them
word_timestampsbooleanOptional request for word timestamp metadata when supported
timestamp_granularitiesstringOptional comma-separated or JSON-list timestamp granularity hints
streambooleanOptional. Requires a mounted card declaring audio.supports_streaming = true and ready runners. Returns typed SSE events by default; explicit response_format=ndjson retains progressive NDJSON framing.

Response formats:

FormatMedia typeShape
jsonapplication/json{ "text": "..." }
texttext/plainPlain transcript text
verbose_jsonapplication/jsonTranscript text plus language and segment metadata when the model returns it
srtapplication/x-subripSubtitle output from model segments, with a zero-length fallback segment when timestamps are absent
vtttext/vttWebVTT subtitle output from model segments
ndjsonapplication/x-ndjsonOne JSON line per transcription chunk

The endpoint never accepts server-local file paths. The API retains the bounded multipart upload until the master selects the authoritative task placement, then sends raw audio frames directly to the selected worker over SPEECH_MEDIA. Only control-sized metadata and the task lifecycle enter the ordered event log. The worker verifies the owner, frame count, and SHA-256 before injecting the payload into the serving runner; the runner writes a temporary local audio file only while inference executes. With stream=true, supported models yield their actual decoded text deltas. The default text/event-stream response emits typed transcription.delta, transcription.completed, transcription.usage, and transcription.error events. Disconnecting before a terminal event cancels the core command and releases its bounded output queue. An explicit response_format=ndjson streams the existing per-chunk JSON shape one line at a time. Cards without proven streaming support fail before response headers. On Zenoh, upload frames are addressed to the selected worker. The gossipsub fallback broadcasts target-tagged frames across the trusted cluster fabric; non-target workers discard them before speech assembly.

OpenAI Audio Translations API​

POST /v1/audio/translations

Experimentally translates a multipart speech upload into English. The request uses the same 25 MiB bounded upload path and response formats as transcription. The mounted card must declare audio.supports_translation = true.

curl -X POST http://localhost:52415/v1/audio/translations \
-F model=org/canary-model \
-F file=@sample-fr.wav \
-F language=fr \
-F response_format=json
FieldTypeNotes
filefileRequired bounded audio upload
modelstringRequired mounted translation-capable STT model id
languagestring or nullOptional source-language hint; required by the Canary model
promptstring or nullOptional model-specific translation context
response_formatstringjson, text, verbose_json, srt, vtt, or ndjson; default json
temperaturenumber or nullOptional model-specific sampling temperature

Translation target is English. The only gates are model truth and instance availability: the mounted card must declare audio.supports_translation = true, matching every other speech endpoint. Skulk maps the generic request to model-family arguments inside the speech runner. The registry's CogniSoftOrg/canary-1b-v2-mlx-bf16 card is the initial supported model; requests for that model return 400 Bad Request when language is omitted. Its upstream CC-BY-4.0 terms and NVIDIA attribution continue to apply.

Claude Messages API​

POST /v1/messages

Use this when your client expects Anthropic-style request and response shapes.

curl -X POST http://localhost:52415/v1/messages \
-H 'Content-Type: application/json' \
-d '{
"model": "mlx-community/Llama-3.2-1B-Instruct-4bit",
"messages": [{"role": "user", "content": "Hello"}],
"max_tokens": 512
}'

Ollama API​

Skulk supports several Ollama-compatible endpoints so tools like OpenWebUI can connect with minimal glue code.

Chat​

POST /ollama/api/chat accepts required model and messages, optional tools, think, format ("json" or a JSON Schema), and options containing num_predict, temperature, top_p, top_k, stop, or seed. stream defaults to true: responses are newline-delimited JSON (application/x-ndjson); set it to false for a single JSON result. The model must already be placed. Message images require a capable vision model.

curl -X POST http://localhost:52415/ollama/api/chat \
-H 'Content-Type: application/json' \
-d '{
"model": "mlx-community/Llama-3.2-1B-Instruct-4bit",
"messages": [{"role": "user", "content": "Hello"}]
}'

Generate​

POST /ollama/api/generate accepts required model, optional prompt (default empty), system, images, and the same options, format, think, and stream controls as chat. It uses the same mounted-model admission and NDJSON/single-response behavior.

curl -X POST http://localhost:52415/ollama/api/generate \
-H 'Content-Type: application/json' \
-d '{
"model": "mlx-community/Llama-3.2-1B-Instruct-4bit",
"prompt": "Write a haiku about foxes"
}'

List models​

GET /ollama/api/tags takes no parameters and lists catalog cards with completed downloads reported in cluster state. Downloaded does not mean placed or ready. Compatibility digests are placeholders, not artifact verification proofs; use the model/store contracts for immutable identities.

curl http://localhost:52415/ollama/api/tags

Show model details​

POST /ollama/api/show accepts name or model (name takes precedence). Missing both returns 400; an unknown model returns 404. The response contains compatibility modelfile, template, and family/quantization details.

curl -X POST http://localhost:52415/ollama/api/show \
-H 'Content-Type: application/json' \
-d '{"name": "mlx-community/Llama-3.2-1B-Instruct-4bit"}'

Running models and version​

GET /ollama/api/ps takes no parameters and returns models, deduplicated from current instance assignments. Its compatibility size is 0; use Skulk state and diagnostics for memory and readiness information.

GET /ollama/api/version takes no parameters and returns version, the Skulk version label. This is a compatibility probe, not an installed Ollama version.

Alias routes​

Ollama clients differ in how they join a configured base URL with API paths, so Skulk also serves alias routes that map onto the same handlers:

  • POST /ollama/api/api/chat and POST /ollama/api/v1/chat alias POST /ollama/api/chat
  • GET /ollama/api/api/tags and GET /ollama/api/v1/tags alias GET /ollama/api/tags
  • HEAD /ollama/ and HEAD /ollama/api/version answer the version probe some clients send before their first real request

Image Generation and Editing​

Skulk serves OpenAI-style image generation and editing from placed image models (for example the registry's FLUX cards).

Availability note: these routes are always registered, but they return 404 No instance found until an instance of the requested image model is placed and running. Image model cards appear in the model catalog (GET /v1/models, placement previews, and the dashboard) by default; an operator can hide them on a node with SKULK_ENABLE_IMAGE_MODELS=false. Legacy MLX image cards use Apple Silicon. Native image cards select stable_diffusion_cpp on compatible Metal, CUDA, Vulkan or ROCm runtimes; placement applies real package requirements and configuration-specific memory fit. Missing representative qualification does not exclude otherwise compatible hardware.

MOSS Base/SFT generation uses the same endpoint. The card supplies 50-step Euler/CFG 3 defaults, 16-pixel canvas alignment and its required external tokenizer. The API forwards prose or JSON prompts literally. These cards expose generation; reference-image editing requires a card that explicitly advertises that task.

FLUX.3 raw BF16, Diffusers, FP8 and NVFP4 artifacts use the existing image API. First load may prepare a verified local native cache: Diffusers preserves dense weights, while ModelOpt NVFP4 expands to BF16. Placement previews and worker guards budget effective engine precision rather than treating compressed download size as resident memory. There are no additional generation parameters for these serialization formats.

Generate images​

POST /v1/images/generations

The requested image model must already exist in the authorized catalog and be placed. Unknown and unplaced aliases return 404; inference never discovers or persists Hub metadata as a side effect.

curl -X POST http://localhost:52415/v1/images/generations \
-H 'Content-Type: application/json' \
-d '{
"model": "exolabs/FLUX.1-schnell-4bit",
"prompt": "a fox curled up in autumn leaves",
"n": 1,
"size": "1024x1024",
"response_format": "b64_json"
}'

Request fields:

FieldTypeNotes
modelstringRequired placed image model id
promptstringRequired generation prompt
nintegerNumber of images; default 1
sizestringauto (default) uses the model canvas. Native image cards accept WIDTHxHEIGHT, with each dimension 64–4096 and model-specific alignment and area limits; eligible cards permit 2K canvases. Legacy MLX models retain their existing size list
qualitystringhigh, medium (default), or low
output_formatstringpng (default), jpeg, or webp
response_formatstringb64_json (default) returns inline base64 image data; url stores each image on this API node and returns a fetchable URL instead
streambooleanFor native profiles, true returns SSE final-image events and [DONE]; positive partial_images additionally requests previews. Legacy models require positive previews for SSE
partial_imagesintegerNumber of intermediate previews per image when streaming; default 0
advanced_paramsobjectOptional seed, num_inference_steps (1-100), guidance (1.0-20.0), negative_prompt, and num_sync_steps (1-100). When seed is omitted, Skulk assigns one so multi-node generation stays deterministic

Native image generation and editing honor stream=true even with partial_images=0: the response is terminal-only SSE, and closing it cancels the command. Legacy image models retain their positive-preview streaming contract.

Native image cards admit n from 1 to 4 and expose geometry, reference count, RGBA support, and sampling defaults in /v1/models under image. Native prompts and negative prompts are each bounded to 32,768 UTF-8 bytes. Seeds must fit the signed 64-bit range, including successive seeds for n images. Blank or corrupt terminal outputs fail the task. Native benchmark memory uses sampled host process RSS (memory_scope: native_process_rss); GPU allocation measurements require separate hardware telemetry.

Qwen Image 2.1 Turbo requires its fixed eight-step schedule, guidance 1, and an empty negative prompt; incompatible overrides return 400 before dispatch. PNG and WebP preserve native alpha output; JPEG encoding discards alpha. Native producers run one image at a time and retain no terminal job after collection. Disconnect and cancellation stop the owned task. Compatible untested hardware remains eligible; qualification records describe only observed results. FLUX.3 Klein/Base use the same image routes and forward the supplied caption unchanged; Skulk does not automatically run prompt expansion. Prepared full scene captions and textual layout instructions belong in prompt; there is no separate bounding-box field. See Native image models for model aliases, first-use engine installation, platform requirements and the supported request flow.

The non-streaming response is { "created": ..., "data": [...] } with one b64_json or url entry per image.

Generate images on an exact instance​

POST /v1/instances/{instance_id}/images/generations accepts the image generation body plus required allowed_node_install_ids, a nonempty array of persistent UUIDv4 installation identities. instance_id must identify an existing instance serving exactly the requested model with TextToImage support. Every assigned rank must have a known installation identity in the allowlist. Missing instances return 404; model, capability, or installation mismatches return 409; malformed/empty allowlists return 422. Refusals dispatch no inference and create no placement. The selected instance's card controls canvas and sampling limits.

JSON and SSE responses carry X-Skulk-Instance-Id. A selected instance that disappears or becomes unavailable before master admission fails the request; another replica never receives it. Normal image output, cancellation, and streaming contracts apply. The allowlist narrows routing and grants no placement authority.

Edit images​

POST /v1/images/edits

Image-to-image editing. Unlike generations, this endpoint takes a multipart form because it carries the input image:

curl -X POST http://localhost:52415/v1/images/edits \
-F image=@input.png \
-F prompt='make it snow' \
-F model=exolabs/FLUX.1-Kontext-dev-4bit \
-F response_format=b64_json

Form fields mirror the generation fields (n, size, quality, output_format, response_format, stream, partial_images, and a JSON advanced_params string), plus:

FieldTypeNotes
imagefileOne input image. Supply this or image[], never both
image[]repeated fileOrdered references for cards declaring multiple-image editing, up to the selected card limit. All inputs together are limited to 24 MiB raw (413 when exceeded); native inputs must be valid PNG, JPEG or WebP and total at most 16,777,216 decoded pixels (400 otherwise)
input_fidelitystringlow (default) or high; controls how strongly the input image constrains the edit

The native SDXL runner accepts one initialization image; extra references return 400 before media dispatch even if the intrinsic profile declares a broader reference limit.

The input image travels to the selected worker over the bounded vision media path described under chat image inputs; it is never written to the event log or replicated State. The response shape matches image generation.

Stored images​

GET /images

Lists the images this API node currently stores for response_format: "url" responses. Each entry carries image_id, url, content_type, and expires_at.

GET /images/{image_id}

Returns one stored image as raw bytes with its stored content type.

curl http://localhost:52415/images
curl -o out.png http://localhost:52415/images/<image_id>

Stored images are node-local and expire one hour after creation; a missing or expired id returns 404 Image not found or expired. Use response_format: "b64_json" when you need the image bytes to outlive the cache.

Video Generation Jobs​

Skulk renders audio-video clips through an asynchronous job family shaped like the OpenAI /v1/videos API. A render takes minutes, so a create request returns a job object at once and the caller polls it, then downloads the finished MP4. Requests are validated against the model card's declared contract (modes, duration range, canvas rules, reference limits) before anything is dispatched.

Availability note: these routes are always registered. Video model cards are listed by default and hidden on a node that runs with SKULK_ENABLE_VIDEO_MODELS=false. A create request needs a placed instance of the model on a node with a video engine; without one the job fails at placement with video_mode_unavailable. A Linux node with an NVIDIA GPU or an AMD Strix Halo GPU installs the engine the first time a video model is placed on it (see the placement preview's engine_install). To exercise the routes without a GPU, start a node with SKULK_TEST_VIDEO_ENGINE=1 and place the bundled foxlight/test-video card: it renders small seeded synthetic clips through the whole pipeline. The card is registered on the node that advertises the engine, so on a multi-node fleet set the variable on every node that may be elected master as well, or add the card there by hand.

The video object​

Every route returns or lists this object. The first block matches OpenAI's video schema; the fields after error are Skulk extensions.

FieldTypeNotes
idstringJob id; also the command id accepted by POST /v1/cancel/{command_id}
objectstringAlways video
modelstringCard the job was placed on
statusstringqueued, in_progress, completed, failed, or cancelled
progressintegerApproximate percent complete
created_at, completed_at, expires_atinteger or nullUnix seconds; expires_at says when downloadable content disappears
secondsstringRequested duration (a string, as in OpenAI's schema)
sizestring or nullRequested canvas
errorobject or null{ "code": "job_failed" or "job_cancelled", "message": ... }
promptstringPrompt as submitted
modestringResolved generation mode: t2va (text), fl2va (first and/or last frame), or ref2va (reference images, clips, audio)
audiobooleanWhether a synchronized audio track was required
stagestring or nullLatest render phase: queued, encoding, sampling, decoding, muxing, uploading
outputobject or nullContainer facts once rendered: sha256, size_bytes, content_type, width, height, frame_count, fps, seconds, audio_sample_rate, audio_channels, has_thumbnail, and when a thumbnail exists its thumbnail_sha256 and thumbnail_size_bytes so a client can verify the variant=thumbnail bytes it fetches
statsobject or nullRunner timing: steps, seconds_per_step, total_generation_time, peak_memory_bytes, and engine: what the render ran with after the request, the adapter and the card were resolved (sampler, scheduler, steps, seed (resolved when the request gave none), video_shift, audio_shift, adapter, adapter_strength, width, height, frame_count, reference_fidelity for ref2va, styles, codec, and when the ControlNet ran control_inputs, control_strength, control_start, control_end, and control_kind when a guide was derived from a control clip), null from an engine that does not report it

Native MLX video engine v0.2.1 preserves the allocator counter across encoder, sampling and decode, so peak_memory_bytes covers the complete render. This accelerator allocation counter is distinct from host RSS; do not add them. Earlier native engine versions may report only the final decoder phase's counter.

Create a video job​

POST /v1/videos

Text-to-video takes a JSON body:

curl -X POST http://localhost:52415/v1/videos \
-H 'Content-Type: application/json' \
-d '{
"model": "Comfy-Org/MiniMax-H3-FL2VA-comfy-int8",
"prompt": "A red fox trots through fresh snow at dawn, breath steaming.",
"seconds": 8,
"size": "1280x720"
}'

Conditioning attachments make it a multipart form. The string fields are the same; the file parts decide the mode:

curl -X POST http://localhost:52415/v1/videos \
-F model=Comfy-Org/MiniMax-H3-Ref2VA-comfy-int8 \
-F prompt='The fox from the photo walks toward the camera' \
-F seconds=6 \
-F input_reference=@first.png \
-F reference=@fox.jpg \
-F reference=@voice.wav

Request fields (JSON keys or form fields):

FieldTypeNotes
modelstringRequired placed video model id
promptstringRequired; up to 8000 characters, structured prompts pass through verbatim
secondsintegerClip length; any integer inside the card's supported range (MiniMax H3: 4 to 15). Omitted means the card's shortest clip, or its maximum with duration=auto. A string such as "8" is accepted for OpenAI SDK compatibility
sizestringWIDTHxHEIGHT; must be a multiple of the card's canvas grid and inside its pixel budget. Omitted lets the engine pick the trained canvas
aspect_ratiostringAdvisory W:H used when size is omitted. With neither, a first_frame (else last_frame, else the earliest timed keyframe) image sets the shape: the canvas follows the keyframe, snapped to the card's grid and pixel budget, so the frame keeps its framing (input_reference is the OpenAI name for the first frame). The shape is the displayed one: a JPEG's EXIF orientation is honored, and PNG, JPEG, WebP, GIF, HEIC, HEIF, and AVIF are read. A plain reference never decides the canvas
modestringt2va, fl2va, or ref2va; omitted derives it from the attachments
stepsintegerSampling steps; omitted defers to the selected adapter or the card
seedintegerDeterministic seed
lorastringName of a card companion adapter, for example a turbo LoRA
lora_strengthnumber0.0 to 2.0
audiobooleanDefault true; the job fails at settlement if the render carries no audio track
pipelinestringLTX workflow: motion_tracks requires Motion Track controls and one opening image; inpaint requires explicit inpainting, source and mask; distilled_two_stage or dev_two_stage, matching the declared transformer; retake or extend requires matching editing controls. DFR (dfr) requires a distilled transformer declaring generated keyframes and an exact dfr_spatial IC-LoRA. HQ (hq_two_stage) requires a dev transformer and an exact issued Res2s extension on the placed Comfy instance; a base-only renderer is refused
audio_conditioningobjectLTX distilled source-audio workflow: start_seconds (0–120, default 0) selects an uploaded audio_source segment covering the full aligned clip. Audio is frozen in both stages. Multipart supplies this object as JSON
inpaintingobjectMasked LTX source placement: integer left and top (0–4095, default 0) position the complete source on the explicit output size. Requires source_video, one source-sized image/video mask, the exact inpaint IC-LoRA and an issued engine advertising inpaint. Optional full-canvas first_frame. Selects pipeline=inpaint; multipart supplies JSON
editingobjectNative LTX source-video workflow: operation is retake or extend. Retake requires inclusive start_seconds and exclusive end_seconds; regenerate_audio defaults true, false preserves the source waveform. The region may cover the complete aligned frame duration, which can exceed nominal seconds (for example 25 frames at 24 fps is 25/24 seconds). Region boundaries round outward onto the 8-frame latent grid. Extend appends to reach seconds, the total output length, and refuses retake-region controls. Requires source_video and an explicit source-matching size
motion_tracksobjectLTX Motion Track strengths: adapter_strength (>0–2, default 1), guide_strength (0–1, default 1). Requires one opening first_frame image and one motion_track_data JSON attachment, a selected motion_tracks LoRA and an issued engine feature. Uses one full-resolution eight-step ancestral-Euler stage; incompatible workflows are refused. Multipart supplies JSON
union_controlobjectLTX Union IC-LoRA: guide (edges, depth, pose; default edges), preprocessed (default false), adapter_strength (>0–2, default 1), guide_strength (0–1, default 1). Requires one control video, an exact compatible union_control LoRA companion and an issued engine feature. Optional opening image. Uses the fixed distilled two-stage workflow; incompatible editing, relay, automatic-duration and H3 controls are refused. Output dimensions must be divisible by 128. Multipart supplies JSON
prompt_relayobjectLTX timed local prompts, requiring an exact issued engine feature: segments contains 2–8 objects with prompt and positive relative length (1–120). Each scene receives at least one latent frame; remaining frames share the length ratio with deterministic rounding. Global plus local prompts total at most 8000 characters. Multipart supplies JSON
decoderstringLTX convolutional (default) or diffusion; the latter requires the exact video_decoder companion named diffusion_decoder. The convolutional VAE still conditions images and upscales latents
negative_promptstringUp to 8000 characters, guided LTX only; encoded verbatim. Distilled generation refuses it
guidanceobjectGuided LTX base stage only: video_cfg (default 3), audio_cfg (7), stg_scale (0, block 28), modality_scale (1). CFG ranges 1–100; STG 0–10; modality 1–10. Multipart supplies this object as JSON. Refinement uses unity CFG and preserves base audio
temporal_upscalingsintegerDFR only: 0 (default) keeps the card FPS; 1 adds a temporal x2 refinement pass using the exact temporal_x2 companion. FPS doubles and output frames become 2 * (base_frames - 1) + 1, preserving the endpoint timeline. DFR uses fixed Euler sampling and currently requires fixed duration
generated_keyframe_intervalintegerLTX internal detailing keyframe spacing in pixel frames, 1–1024. Requires a transformer declaring generated_keyframes; these tokens are removed before upscaling and never become extra output frames
durationstringfixed (default) or LTX auto. Automatic prediction requires an exact duration_head companion and bounds the allocation before sampling. seconds is its maximum; omitted uses the card maximum. Actual container frames and duration are verified using PyAV from the isolated engine and recorded in the output
duration_min_secondsintegerLTX automatic-duration lower bound, otherwise refused. Omitted uses the card minimum; both bounds must lie within card limits and contain a complete 8n+1 grid. Timed keyframes must precede this lower bound

| sampler | string | Engine tier. LTX-2.5 distilled generation and extension accept only euler_ancestral; DFR and retake use fixed euler. Omitting the field selects the pipeline’s sampler. HQ selects Res2s through its pipeline and requires sampler and scheduler overrides to be omitted. H3 omitted keeps res_multistep, the ComfyUI template's choice. Any sampler the pinned ComfyUI offers is accepted except those that cannot serve distilled H3, which are refused with the reason: dpm_fast and dpm_adaptive pick their own step count, and every *_cfg_pp variant plus cfgpp_ud10_ab needs a classifier-free guidance branch | | scheduler | string | Engine tier. H3 accepts simple (default), normal, sgm_uniform, beta, kl_optimal, linear_quadratic, karras, exponential, or ddim_uniform. LTX-2.5 distilled uses fixed manual sigma tables and requires this field to be omitted | | video_shift | number | Engine tier. Video sigma shift, 0.01 to 100; omitted takes the adapter's, else the card's | | audio_shift | number | Engine tier. Audio sigma shift, 0.01 to 100; omitted takes the adapter's, else the card's. The audio schedule rides the video one scaled by video_shift / audio_shift | | reference_fidelity | string | ref2va only: match (default) sizes reference images to the canvas; max keeps them at full resolution for stronger likeness at a much higher cost. Refused for other modes | | styles | array of strings | Up to 4 of the card's style embeddings by name, applied in order as embedding: tokens ahead of the prompt. A multipart form sends them comma-separated in one field. An unknown name is refused with the card's list | | codec | string | h264 (default) or av1, in the MP4 container | | control_strength | number | ControlNet strength, 0 to 10, with a control or mask part; omitted takes the card companion's | | control_start | number | Fraction of the sampling schedule, 0 to 1, at which the ControlNet starts to steer; default 0 | | control_end | number | Fraction at which it stops, above control_start; default 1. Any control setting without a control or mask part is refused | | control_kind | string | What the render derives from the control clip: pose (default), depth, or edges. Only with a control part; a kind the card has no weights for is refused with 400 naming the kinds it derives (see the card's video.guides) |

For a card with family ltx-2.5 and video.transformer_variant = "distilled", the baseline distilled renderer uses two stages: eight base sampling intervals at half resolution, a required spatial_x2 latent-upscaler companion, and three refinement intervals. A guided dev transformer uses dev_two_stage and requires its exact distilled_refinement LoRA. Its base stage uses the LTX Euler schedule and requested guidance; refinement uses three intervals with unity guidance and frozen base audio. Undeclared transformers and mismatched pipelines are refused. steps, when supplied, must be 8; stats.steps and stats.engine.steps report the total 11. /v1/models exposes transformer_variant, sampling_stage_steps: [8, 3], default_scheduler: "manual", an empty scheduler override list, and the effective output grid of 64 pixels with min_short_edge: 128. Explicit sizes outside those constraints are refused. Seeds must fit an unsigned 64-bit integer.

The model video metadata additionally exposes pipelines, decoders, generated_keyframes, temporal_upscaling, temporal_upscaling_modes, automatic_duration, audio_conditioning, editing, prompt_relay, union_control, union_guides, motion_tracks and guided defaults.

guides and default_guide describe ordinary ControlNet requests using control_kind. union_guides separately describes native preprocessing choices for explicit union_control.guide requests, including modes and selected weights. A Union-only pack never advertises its preprocessing as ordinary ControlNet. pipeline_modes and decoder_modes map each offered choice to its permitted modes; automatic_duration_modes lists the modes allowed by the selected head. Companion mode limits are enforced before graph dispatch, including the required spatial upscaler and dev refinement LoRA. Missing selected components disable their controls, independently of hardware qualification. Pipeline, decoder, guidance and duration choices also persist in stats.engine; its frame count is the verified actual count.

LTX accepts text, first/last/timed image keyframes, and explicit supported source workflows. It rejects H3 sigma shifts, adapters, style embeddings and ControlNet controls. audio=false omits the output audio track while retaining joint audio/video sampling. Backend compatibility remains available to untested compatible GPUs; qualification evidence is separate. Each render runs on one GPU host; memory on other hosts is not pooled for video generation.

Source audio is decoded in an isolated engine helper to an exact 48 kHz stereo PCM segment, then used as frozen conditioning. Audible output carries that waveform; audio=false produces a silent container. Editing fully decodes a constant-rate source on the 8n+1 grid before any model loads. A retake requires the requested frame count; extension requires a shorter source, with at least 25 frames for native distilled extension. Source geometry and frame rate must match the request/card. Decoding has a 60-second deadline, a 512 MiB resident-memory watchdog, a 64 MiB file ceiling, and cancellation/parent-death reaping. On Linux the watchdog uses the decoder's post-exec resident peak (VmHWM), retaining brief allocations while excluding the parent runner's inherited high-water counter. Source video also has a 128 MiB per-frame and 2 GiB total fp32 pixel-volume bound before encoder allocation. Invalid, truncated, non-finite, oversized or unsupported tracks fail the job with cleanup.

Distilled retake uses one deterministic Euler stage with eight intervals, so its step total is eight. Comfy Dev retake and extension use one guided Euler stage (30 intervals by default), with fixed video/audio CFG 3/7, STG 1 on block 28, modality guidance 3 and rescale 0.7. Caller guidance overrides remain unavailable for editing. Distilled extension and source-audio generation use the eight-plus-three ancestral workflow. Source workflows do not combine with automatic duration, generated keyframes or prompt relay. The pinned Comfy core engine implements source-audio conditioning. Retake, extension and Comfy timed scene prompts additionally require the exact published owned extension declaring each feature. A sampler-only extension cannot execute editing. Native advanced controls also require an exact published wheel that declares the corresponding feature. Comfy editing restores original source frames outside the retake interval (or the extension prefix) and normalized stereo PCM before muxing. Preserved audio bypasses VAE decoding. Lossy H.264/AV1 and AAC encoding may change the final decoded pixels and samples. Comfy editing also bounds the complete output to 2 GiB of decoded fp32 RGB pixels. Routing chooses an instance with that build support; no capable mounted instance yields a terminal failure. DFR requires a distilled pack with its exact dfr_spatial adapter and generated keyframes; optional temporal refinement also requires temporal_x2. It uses Euler with fixed duration, preserving the endpoint timeline when frame density and FPS double. Text-only Comfy DFR additionally requires an exact placed issued build declaring dfr in engine_feature_builds; an unpublished candidate or older image-only path cannot provide that feature. The owned detailing bridge preserves upscaled samples and real image/guide masks. When all default stride candidates are anchored, it places one detail token in the largest free interior gap, choosing the earliest tied gap; a fully occupied canvas fails explicitly. Motion Track and spatial in/outpainting use the separate explicit workflows below. Engine availability and artifact completeness determine offered controls; tested hardware is not an execution allowlist.

Motion Track uses a selected motion_tracks IC-LoRA and an exact placed engine build implementing motion_tracks. Its dedicated motion_tracks pipeline is selected automatically by the controls. Upload an opening first_frame image and a motion_track_data file with MIME type application/json. The attachment is a versioned object:

{"version":1,"frame_count":25,"tracks":[[{"x":0.25,"y":0.5}]]}

The example illustrates the shape; each path must actually contain 25 positions for this timeline. frame_count must equal the card's complete 8n+1 timeline for the requested seconds. One to sixteen paths are accepted; every position contains only finite x and y numbers normalized to [0,1] on the final canvas. The attachment is limited to four MiB. Coordinates travel through the bounded reference-media plane; replicated state and graph inputs retain only their verified file reference. No missing points, retiming or held-frame fallback is applied.

The output canvas uses a 64-pixel grid. The rendered half-precision guide is independently limited to 512 MiB; transient raster workspace is limited to 256 MiB, accounting for the high-resolution pixels, overlap maps and resize temporaries. These limits and canvas edges are checked before dispatch and repeated before device allocation. Omitted size uses the card short edge and explicit aspect ratio, or a square if the ratio is omitted; the opening image does not change Motion Track geometry. Only one transient 1080-short-side raster frame is retained at a time. The pinned training format retains fifty-frame trails, the age-dependent colors/radii, painter ordering, bilinear downsampling and BGR channel order. The opening image is applied without JPEG preprocessing at strength 0.7. The actual adapter must declare reference downscale factor two; guides are cropped after the single full-resolution eight-step stage, before tiled decoding. There is no spatial-refinement stage. Generated audio may be included or muted normally. Union, temporal editing, prompt relay, automatic duration, DFR, diffusion decoding and H3 controls do not combine with this workflow. Candidate source creates no installation offer until an immutable wheel is published and registered.

Union control requires a card selecting the exact union_control LoRA companion and an exact placed build advertising that feature. Upload one control clip matching the final canvas, frame rate and complete trained-grid frame count. Every frame is decoded and bounded before Comfy allocates its guide batch; mismatched timelines are refused rather than looped or retimed. Prepared pose/depth/edge guides bypass annotation. Otherwise the selected pack must include the native Comfy preprocessor companions: SDPose plus RT-DETR for pose, Depth Anything 3 for depth, and weight-free Canny for edges. These are explicit native Comfy recipes; the upstream example uses different optional pose/depth preprocessors. An optional opening image is pinned at strength 1 without the ordinary I2V JPEG preprocessing. The base sampler is ancestral Euler; refinement uses plain Euler, retained in engine.stage_samplers. The adapter applies only to the base stage, its real metadata must declare reference scale two, and guide tokens are cropped before spatial refinement. The original transformer refines with the pinned 0.909375, 0.725, 0.421875, 0.0 schedule. Source audio is not copied; joint model audio is generated normally or omitted from the mux. A candidate wheel alone does not enable this feature.

Timed local prompts require a card declaring prompt_relay and an exact placed build advertising that feature in engine_feature_builds. Native and Comfy use a fixed soft Gaussian video-attention profile. Comfy measures the complete plain, unweighted prompt with its loaded Gemma4 tokenizer; unstable scene boundaries or truncated text fail before sampling. The global prompt remains available throughout the clip. Audio uses the full combined prompt without scene timing. Scene lengths are relative weights on each stage's actual latent timeline, including optional DFR temporal refinement. This control requires fixed duration and cannot combine with source-audio conditioning or temporal editing. An unpublished candidate creates no installation offer.

Masked inpainting is offered only when video.inpainting and an exact issued inpaint entry in engine_feature_builds agree with the selected pack. Candidate code and a named adapter alone do not authorize execution. Its explicit output canvas uses a 64-pixel grid, from 128 through 4096 pixels per edge, within the card's pixel limit. Source pixels retain their dimensions and complete timeline; left and top must fit the entire source without cropping. White mask regions and the canvas outside the placed source are regenerated. A still mask broadcasts over all source frames; a video mask must cover the exact same timeline. An opening image, when supplied, describes the full output canvas. This fixed distilled workflow is separate from temporal editing, Union, Motion Track, audio-source conditioning, prompt relay, automatic duration, generated keyframes and diffusion decoding. Source/mask structural attachments do not consume ordinary reference limits. An unavailable renderer is refused without falling through to ordinary video generation.

The worker fully decodes every source and video-mask frame before constructing the graph. Dimensions and frame rate must stay constant, and both clips must match the complete requested trained frame count; no truncation, looping, retiming or source resizing is performed. Masks use their red channel and mask videos cannot contain audio. Source audio must be finite mono/stereo; a missing track supplies silent context. Both sampling stages freeze the normalized causal audio latent, and audible output is its VAE reconstruction, not a promise of bit-exact original PCM. audio=false mutes the container without removing the joint audio context.

The fixed recipe uses eight Euler Ancestral base intervals, native tiled decode and Laplacian blending, Lanczos pixel upscaling and tiled re-encoding, then two Euler refinement intervals and a final blend. Blending intentionally softens mask boundaries, so untouched regions are not a bit-exact MP4 pixel guarantee. Complete decoded source batches remain subject to the two-GiB input bound. Cached pixel, mask, audio and latent buffers plus framewise pyramid workspace have a combined 16-GiB graph bound, checked before Comfy allocates full batches. Model weights and sampling require additional memory; this bound is not a hardware eligibility list or a model memory estimate. Reduce output size or duration on refusal.

File parts (multipart only), in slot order:

PartRoleNotes
input_referencefirst frameOpenAI's name for the keyframe image; first_frame is the same thing
last_framelast frameImage
keyframekeyframeRepeatable image anchored at a time into the clip; pair every part with one keyframe_at form value (seconds, zero or more, in the same order). At most 8, at distinct times, none past the clip's end. Alone they imply fl2va; beside reference parts they anchor a ref2va render. The engine snaps each to the nearest frame
audio_sourcereferenceOne audio file paired with explicit audio_conditioning; an omitted object or non-audio type is refused before staging
referencereferenceRepeatable; images, video clips, or audio in the order given
controlcontrolOne ordinary clip (or a still) whose motion or structure the render follows. The render derives the guide from it (control_kind): whole-body pose (people detected with RT-DETR, keypoints from SDPose), depth (Depth Anything 3), or Canny edges, as ComfyUI's own H3 ControlNet template does. The engine holds the guide's last frame when it is short, cuts it when it is long, and scales and centre-crops each frame to the canvas
maskmaskOne image or clip for the ControlNet, read from its red channel; white marks what to regenerate
motion_track_datamotion_tracksOne version-one application/json trajectory file paired with explicit motion_tracks controls and an opening image; four MiB maximum
source_videosourceOne source clip paired with LTX editing or explicit inpainting, or an H3 clip behind a mask. LTX temporal editing counts it against reference video limits; structural inpainting and ordinary H3 inputs do not

Media parts must carry an image/*, video/*, or audio/* content type; motion_track_data requires application/json. At most 16 attachments and 256 MiB per request; larger uploads return 413. Keyframe roles allow one first and one last frame. The card's reference_limits bound the counts per kind; control, mask, and source_video steer H3 ControlNet and do not count against those limits. An LTX editing source implies ref2va and counts against the selected artifact's video limits. A control or mask part on a card with no ControlNet (a model_patch companion) for the mode is refused with 400. Attachments travel to the selected worker over the bounded vision media path; they are never written to the event log or replicated state.

The response is the video object with status: "queued". One API node accepts 32 live jobs; beyond that the route returns 503 until one finishes.

Native Apple LTX cards select mlx_video-metal and use the same video job endpoints and bounded reference/output contracts. Native hq_two_stage implements its pinned Res2s pipeline. Comfy HQ requires the published Res2s extension on the exact placed instance; an old instance cannot inherit support from a newer node installation. Native metadata offers no selectable Comfy samplers/schedulers and currently lists H.264 output only. Request matching excludes native placements for explicit AV1 output before dispatch; Comfy placements retain AV1 support. Other explicit incompatible controls fail the job rather than being ignored. Generated keyframe intervals are resolved after bounded automatic duration prediction, so internal positions stay inside the actual clip. Missing exact converted-pack components fail before rendering, and the engine does not fetch alternate weights. Backend compatibility remains independent of retained hardware benchmarks; ordinary resource admission still applies.

Native placement charges staged working weights with runtime headroom, rather than treating all selected downloads as simultaneously resident. Each request also checks geometry, source buffers, joint sampling and decoder workspace before loading model tensors; disabling the output audio track still requires joint audio-latent sampling. A request that exceeds its placement's reservation fails with a resource explanation. Reduce duration/resolution, or raise the card's runtime.video_memory_budget_bytes and recreate the placement on capacity that can hold it. That setting can only raise the artifact-derived reservation. Live host pressure or excess process memory can also terminate a job, with its process group reaped. Cleanup stops remaining encoder children before releasing the session leader's process identity and removes the command-private request even if termination fails. These guards do not turn an untested GPU into an incompatible GPU and do not provide a hard Metal allocator quota.

The video section of GET /v1/models includes pipeline_defaults and engine_feature_builds. The former supplies workflow-specific base intervals, sampler, stage interval counts and guidance. Comfy HQ defaults to 15 base intervals and three refinement intervals, with video/audio CFG 3/7, modality guidance 3, and fixed video/audio rescaling 0.45/1.0. An explicit steps changes only its base interval count. The output retains base-stage audio after joint refinement. stats.engine records Res2s, actual stage LoRA strengths (base 0.25, refine 0.5) in stage_lora_strengths, and both rescaling values in guidance_video_rescale and guidance_audio_rescale. Retrieval and listing preserve these fields. Native HQ reports its issued workflow: no base-stage LoRA application (base: 0.0) and the selected companion strength in refine, with video/audio rescaling 0.45/1.0. Backend-specific stage strengths describe actual execution rather than claiming numerical equivalence.

engine_feature_builds lists issued code identities and their advanced features. Native identities match the full placed build. Comfy source/payload selectors match the full instance build after removing only its /torch@version segment; source revision and extension payload must both agree. Consumers use the instance's resolvedEngineBuild, never current node inventory as evidence that an older instance gained features. An unpublished candidate adds no feature or installation offer. Normal resource admission still applies on compatible untested hardware.

New Comfy LTX placements select the issued 0.1.4 extension through ordinary on-demand engine installation. Its union_control feature adds aligned prepared guides or RGB clips processed by the selected native guide chain, using the selected Union IC-LoRA in the base stage. Its prompt_relay feature adds timed video scene prompts while audio uses the complete combined text. Its dfr feature preserves dense upscaled video and real image/guide masks for detailing, including text-only input and a free interior slot when short-clip anchors occupy every default position. Its editing encoder retains the complete source waveform instead of applying Comfy's generic spatial crop to the audio timeline. Existing placements retain their exact engine build; place a new instance to use the update.

Poll a job​

GET /v1/videos/{video_id}

curl http://localhost:52415/v1/videos/<video_id>

progress and stage advance while the render runs. A job reaches completed only after both the render's terminal report and the verified container have arrived on the API node; the two travel on different planes and may land in either order. If the container never arrives within ten minutes of the first half, the job fails with a delivery error.

List jobs​

GET /v1/videos

QueryNotes
limit1 to 100, default 20
afterId of the last job on the previous page
orderdesc (default, newest first) or asc

Returns { "object": "list", "data": [...], "first_id", "last_id", "has_more" }. The node retains the newest 256 jobs; older terminal jobs are evicted from the list.

Download content​

GET /v1/videos/{video_id}/content?variant=video|thumbnail

curl -o clip.mp4 http://localhost:52415/v1/videos/<video_id>/content
curl -o clip.jpg 'http://localhost:52415/v1/videos/<video_id>/content?variant=thumbnail'

Returns the MP4 or the JPEG thumbnail with its content type. The codecs inside the container are the engine's: MiniMax H3 engines deliver H.264 video with AAC audio, while the test video engine delivers MJPEG frames with uncompressed 16-bit PCM audio, so a client validating the stream should read the codecs from the file rather than assume them. Responds 409 while the job is not completed and 404 once the content has expired or when the job has no thumbnail. Content is node-local: fetch it from the API node that created the job. Stored content expires 24 hours after completion, and the node's video store also holds at most SKULK_VIDEO_STORE_MAX_BYTES (default 32 GiB) or the free space on its filesystem minus a reserve; when a new render needs the room, the oldest completed jobs lose their content early and their expires_at moves to the eviction time.

Cancel a job​

POST /v1/videos/{video_id}/cancel

Stops a queued or running render, or stops the container transfer when the render already finished, and returns the job with status: "cancelled". Cancelling a finished job returns it unchanged. POST /v1/cancel/{video_id} does the same for callers that already use the generic cancel route.

Delete a job​

DELETE /v1/videos/{video_id}

Cancels the job if it is still live, deletes its stored content, and forgets it. Returns { "id": ..., "object": "video.deleted", "deleted": true }.

Differences from OpenAI​

  • seconds accepts any integer inside the card's range rather than a fixed set of values, and size is any canvas the card allows.
  • cancelled is a distinct terminal status.
  • Multipart accepts a last frame and repeated references, not only the single input_reference, and the JSON body accepts the mode, aspect_ratio, steps, seed, lora, lora_strength, audio, and engine-tier (sampler, scheduler, video_shift, audio_shift, reference_fidelity, styles, codec) extensions.
  • There is no remix route; submit a new job with the changed prompt.

Music generation​

Music model placement checks the selected backend's complete estimated footprint. ACE-Step CPU serving includes a 10 GiB working-buffer reserve beyond its weight estimate and regular runtime overhead; insufficient capacity returns an actionable mount error before a generation job is admitted. CUDA and Vulkan serving also reserve transient generation buffers beyond weight/runtime overhead: 10 GiB for ACE-Step and 2 GiB for MiniMax. MiniMax Metal reserves 5 GiB beyond weight/runtime overhead against its system-RAM ceiling. The same estimate governs mounting and worker admission; a matching hardware class with insufficient capacity cannot place the model. Audio.cpp CUDA music preparation requires the package's compiled GPU class in live node facts: SM 8.9 for Linux amd64 and SM 12.1 for Linux arm64. Signed qualification records retain their exact tested build and hardware; missing qualification does not prohibit an otherwise compatible runtime. Managed packages require one observed NVIDIA device with a known matching compute class; multiple devices, mixed classes, and unknown classes cannot be admitted until execution and memory accounting can select the same physical device. Each published native build retains those restrictions when restored from cache. A generic NVIDIA claim cannot widen a managed package's compiled target, and package availability alone cannot place a model. A qualified operator-provided primary CUDA binary uses its own verified build identity. When a dedicated CUDA wheel is already cached, configure SKULK_AUDIO_CPP_CUDA_BIN for that operator binary as well; startup cache rehydration otherwise prefers the dedicated build over a primary-only override.

Music generation is an asynchronous job API for a mounted TextToMusic card. Native ACE base card metadata can also describe intrinsic editing modes in music.native. Those safetensors components cannot be loaded by the audio.cpp runner. This section documents generation; native editing has its separate contract below. Native-profile Download requests retain all selected primary, text-encoder and autoencoder files at their pinned revisions, grouping shared sources into one required transfer. Missing components fail the download with an actionable reason; the node and its download command processor remain available for other work. Offline reuse and preservation require the complete recorded data closure. Downloaded native bytes alone do not establish a mounted or ready engine.

Under the Music Studio initiative, POST /place_instance and POST /instance prepare native ACE libraries separately from audio.cpp. The ordinary request uses model_id and excluded_nodes; an exact request uses its single specified node and optional explicit resolved_backend. Native lanes are ace_step-cpu, ace_step-metal, ace_step-cuda and ace_step-rocm; native Vulkan is not implemented. A bare engine requirement identifies compatibility but never a ready device. Native safetensors and GGUF music use distinct loaders.

Preparation selects an advertised fixed package matching the worker's OS/CPU and generic device requirements. At most four mount preparations can wait on an accepting API node. One thirty-minute budget includes every candidate attempt, command queue, verification and device probe; another candidate does not reset it. Offline workers may reuse independently verified cached bytes only. The worker's ordered completion must match the request, accepting API, worker, package digest and device before the API can forward placement. That response must include the actual ready build, math policy and a fresh actual device-zero memory observation. Installable package metadata alone is insufficient.

Native memory admission accounts for complete model loading and forward phases, all existing placements and idle future workspace across host/device/shared physical pools. It does not reuse generic already-reserved memory inputs or borrow another GPU's capacity. Explicit backend overrides cannot silently fall back to another lane. Preparation failures return an actionable 503; invalid explicit native lanes return 400. Other engines and worker health remain available. Insufficient disk reserve returns 503 with error.message identifying insufficient space on the selected worker and asking the operator to free storage and retry. No instance is created or unverified engine advertised as ready; the worker and its other engines stay running. Private exception paths and command details are kept in worker logs rather than the public error. Preparation does not itself load the model or establish qualification; installed acceptance and distribution remain separate from this source integration.

The model's /v1/models music object identifies its family, lyric rule, accepted min_seconds and max_seconds, and wav output format. Music uses the existing API authentication policy. Jobs and WAV content belong to the API node that accepted the request; poll and download from that node.

Create a music job​

POST /v1/music

Send JSON with these fields:

FieldTypeBehavior
modelstring, requiredMounted text-to-music model id
promptstring, requiredNonblank musical description, 1 to 8000 characters
lyricsstring or nullNonblank when supplied; model dependent and required for MiniMax Music 3, up to 20,000 characters
secondsinteger, requiredTarget or generation budget within the card's range and the global 120-second ceiling. MiniMax output can have a different actual duration
seedinteger or nullOptional 0 to 4294967295

Unknown fields and whitespace-only music text are rejected with 422 before the job is created. The response is a music object with a job id, model, prompt, requested seconds, status: "queued", created_at, and null terminal/output fields. One API node admits at most 32 active music jobs. The model runner admits one generation at a time. A failed job includes an error; cancellation produces status: "cancelled". If the cluster session changes while creation waits to submit, the API returns 503 and the request can be retried; the closed session's command is not submitted.

List and retrieve music jobs​

GET /v1/music accepts limit (1 to 100, default 20) and after (the last job id of the previous page). It returns object: "list", data, first_id, last_id, and has_more, newest first. The node retains the newest 256 job records.

GET /v1/music/{music_id} returns the current music object. On completion, output reports the measured WAV duration_seconds, sample_rate, channels, size_bytes, and sha256. The job reaches completed only after both the runner's terminal report and the verified WAV arrive. If delivery does not finish within ten minutes, it fails. In-flight jobs become failed after an API restart; previously completed content remains available until its expiration. If the ordered task terminates but its final music frame is lost, the API fails the job after a 45-second grace and the next 15-second sweep; it does not retain an active job indefinitely. For native ACE generation, execution-task cleanup after the terminal report does not cancel a registered WAV that is still being verified and delivered. The job remains in progress until both completion conditions hold; explicit cancellation or delivery failure still ends it without partial downloadable audio.

Download music​

GET /v1/music/{music_id}/content returns audio/wav for a completed job. It returns 409 before completion and 404 if the job or content is absent or has expired. A result exceeding 64 MiB fails instead of being truncated. Completed WAV content is retained for up to 24 hours; storage pressure may evict older content sooner.

Cancel or delete music​

POST /v1/music/{music_id}/cancel cancels a queued or running job, terminates its model server if it is generating, and removes partial output. Calling it on a terminal job returns that job unchanged. POST /v1/cancel/{music_id} also cancels an active music job, including one whose WAV is still being delivered.

DELETE /v1/music/{music_id} cancels a live job, removes its WAV, and forgets its record. It returns { "id": "...", "object": "music.deleted", "deleted": true }.

Native music editing​

These routes describe the native edit service under the Music Studio initiative. Native ACE mounting and execution use the preparation and supervised native runner paths above; signed distribution and installed-platform acceptance remain separate initiative gates. Downloading a native card or engine package alone does not create an executable editing instance. Existing audio.cpp generation continues to use the music API above.

Edits are asynchronous and local to the accepting API node. Use that same node for polling, cancellation and content. The existing API authentication policy applies; operator gateway access requires the inference (chat:write) scope. Raw source/result audio uses directed media transport and stays outside replicated State and event logs. After a verified native result is registered, ordinary execution-task cleanup does not cancel its pending media delivery. Explicit cancellation, failure and the bounded delivery deadline still apply.

Create an edit​

POST /v1/music/edits accepts multipart/form-data with exactly two fields:

  • request: one closed JSON object, at most 256 KiB.
  • file: the original encoded WAV, at most 64 MiB, one to 120 seconds, mono or stereo, finite PCM/float samples, 8–192 kHz. The original is never overwritten.

The response is 202 with a music.edit resource. Four edits, including unfinished source/return drains, may be active on one API node. One native model instance admits one generation or edit at a time. A prepared package alone does not satisfy model readiness.

Common fieldTypeContract
taskstring, requiredadd_part, repaint, or continue
modelstring, requiredSelected native card alias
promptstring, requiredOriginal nonblank caption, up to 8,000 characters
lyricsstring, optionalOriginal nonblank lyrics, up to 20,000 characters; obeys the card's lyric rule. Omission resolves to [Instrumental]
source_sample_rateinteger, requiredClock for all request frame coordinates; must equal the measured WAV sample rate
seedinteger, optional0–4294967295, including zero. The API selects a missing seed once and durably records it before dispatch

Operation-specific fields are closed:

TaskAdditional controls
add_partRequired part_class, limited to the card's declared classes. Optional region_start_frame (default 0) and region_end_frame (default complete source)
repaintRequired region_end_frame; optional region_start_frame (default 0). The nonempty half-open region must be inside the original
continueRequired target_frames: total extent including the complete original, strictly larger than it. Only the appended tail is reworked; region/part fields are rejected

Inputs use the source clock. The API maps starts down and ends up to the native 48 kHz frame grid using integer arithmetic. The resource explicitly returns frame_sample_rate: 48000, resolved target_frames, region_start_frame, and region_end_frame. In-place edits preserve the original extent after that mapping. Continue includes the original and the extension. The selected card's duration maximum and the global 120-second ceiling both apply.

Unknown or task-inappropriate fields, caller paths, arbitrary native options, blank text, invalid clocks/ranges and disallowed card controls return 422. Malformed multipart requests return 400, wrong content type 415, a bounded upload exceeding its declared/streamed limit 413, and an upload exceeding 180 seconds 408. Capacity/storage admission failure returns 503. An interrupted or ambiguous submission is never automatically resubmitted; inspect the accepting node's retained jobs before choosing to try again.

curl -X POST "$SKULK_URL/v1/music/edits" \
-F 'request={"task":"repaint","model":"native-model-id","prompt":"A gentle cello response","source_sample_rate":48000,"region_start_frame":480000,"region_end_frame":960000,"seed":0}' \
-F 'file=@context.wav;type=audio/wav'

List and retrieve edits​

GET /v1/music/edits accepts limit (1–63, default 20) and optional after (the previous page's retained last_id). The response has object: "list", data, first_id, last_id, and has_more, newest first. Invalid/stale cursors return 400. Up to 64 records are retained; completed unexpired results are protected from implicit eviction to admit more work.

GET /v1/music/edits/{edit_id} returns the accepted caption, lyrics, fixed seed, measured original, resolved native extent, status and terminal times. output remains null until native render completion, independently verified and synced WAV custody, and drained reverse acceptance all agree. The API retains its native task until that return acknowledgement has drained; render metadata alone cannot retire the worker's result producer. Completed output records exact source lineage, runtime/model identities, observed device/precision, conditioning gain/padding, render latency and WAV geometry/size/SHA-256/peak. Paths and raw audio bytes are excluded. A missing node-local job returns 404.

Failed jobs retain the available placement or native error in error, bounded to 1,024 characters, including when final task status arrives before its DATA error frame. When all matching native instances are busy, the job fails with the idle-capacity reason and output: null. Callers can submit a new request after capacity returns. A 202 response confirms the job receipt; it does not reserve a busy model or promise queued inference.

Placement waits are bounded to 45 seconds, the full placed edit to two hours, and post-render return delivery to five minutes, checked by a one-second sweeper. The native cooperative timeout and runner hard deadline use the same two-hour render ceiling. This accommodates slower CPU execution; it is not a completion time estimate. Earlier cancellation, failure and source-transfer limits still apply. Restart or cluster-session replacement fails interrupted work without replay or seed changes. Previously completed results are reverified before serving.

Download, cancel and delete edits​

GET /v1/music/edits/{edit_id}/content returns the completed PCM24 stereo 48 kHz WAV, at most 64 MiB, with Content-Length, attachment filename and a quoted SHA-256 ETag. Content is retained for 24 hours. Unsettled/failed/cancelled jobs return 409; absent/expired content returns 404. Eight downloads are admitted per API node; excess readers return 503. Deleting a job does not truncate a download whose descriptor was already leased. Native Repaint and Continue candidates blend across a 25 ms join. Headroom normalization can also scale the whole candidate, as recorded in its output metadata. The retained original asset stays unchanged; candidate samples outside the requested interval are not promised to be bit-identical to that asset. If removing expired content fails, its storage reservation remains in place and later sweeps retry cleanup without interrupting unrelated API work.

POST /v1/music/edits/{edit_id}/cancel records cancellation, stops native work and source/result delivery, and removes partial copies. Terminal jobs are unchanged. POST /v1/cancel/{edit_id} also cancels an active edit. Late native frames cannot revive cancelled work. Terminal status does not release a cleanup reservation: original copies, partial results and their admission slot remain owned until both stores drain. Filesystem failures are retried in the background without stopping unrelated API work. Completed WAVs remain available while an original-only cleanup drains.

DELETE /v1/music/edits/{edit_id} cancels active work, removes only API-owned content and forgets the record. It returns {"id":"...","object":"music.edit.deleted","deleted":true}. Missing jobs return 404. Creator originals and Studio project assets remain independently owned. WAV output is never silently truncated or transcoded. Incomplete physical cleanup returns 503 and retains the job record; retry delete after cleanup completes. Startup likewise refuses edit storage readiness while an orphan cleanup failure leaves unaccounted content behind. If recording a source/result transport failure encounters an uncertain index write, the edit service cancels its retained work and returns 503 until its index is reopened. Unrelated API serving continues; an unwritten terminal outcome is never reported as durably committed.

Source separation​

Source separation creates an asynchronous, API-node-local four-stem job for an already mounted AudioSeparation model. The initial native adapter estimates drums, bass, other accompaniment and vocals with HTDemucs. These are model estimates; the original is preserved independently and is never overwritten. Use the same API node for creation, status, cancellation and downloads. Jobs are not forwarded to another API node when it restarts or becomes unavailable. These routes use the existing API access policy; the authenticated operator gateway requires the existing inference (chat:write) scope.

Create a job​

POST /v1/audio/separations accepts multipart/form-data containing exactly:

FieldTypeContract
requestJSON encoded as a text field, at most 4 KiB{"model":"mounted-model-id"}. Extra fields, native options and server-local paths are rejected.
fileOne WAV upload1–120 seconds, mono or stereo, 8–192 kHz. The complete original is at most 64 MiB and its decoded float32 geometry at most 128 MiB. PCM8/16/24/32 and float32/64 are accepted; samples must be finite and supported WAV structure must be valid. The supplied filename is ignored.

The body has a streaming limit of 64 MiB plus 32 KiB multipart overhead, even without Content-Length. At most four upload handlers and four active jobs are admitted on an API node. A slot remains reserved while its bounded reverse acknowledgements or cancellation terminals drain, including after cancellation. A model selection or ordinary mount prepares its engine separately; creating a separation does not install or mount a model implicitly.

curl -X POST http://localhost:52415/v1/audio/separations \
-F 'request={"model":"adefossez/HTDemucs"}' \
-F 'file=@original.wav;type=audio/wav'

Success returns 202 with an audio.separation object containing id, model, independently measured source, status, created_at, nullable completed_at, expires_at, error and output. Status is queued, in_progress, completed, failed or cancelled. source contains the complete encoded SHA-256 and size, sample rate, channels, frames, encoding and bit depth; it contains no file path or samples. output remains null until successful rendering, all four verified local files agree with the complete manifest, and their return-path acknowledgements have been admitted. An unavailable return transport or acknowledgement deadline fails the job, including when every WAV has already verified; it cannot silently report completion. Repeated completion packets also require manifest verification; arrival of the manifest rechecks settlement after any previously admitted acknowledgements. The manifest's JSON stems array contains drums, bass, other, and vocals exactly once in that order. The same complete-set, strict field and WAV geometry checks apply when the worker and accepting API run on different nodes. The native task remains owned until every stem acknowledgement drains. Render metadata alone cannot retire the worker's result producer. Failure or cancellation submits task cancellation before finalizing its metadata stream.

Uploads have a three-minute deadline; a stalled body returns 408 and its partial spooled files are closed. Requests with invalid metadata or WAV data return 422; malformed multipart returns 400, an unsupported request content type 415, and byte-limit violations 413. Capacity or unavailable storage returns 503. An unavailable model or a later placement/execution failure is recorded as an actionable terminal error. The available placement or native reason is retained in error, bounded to 1,024 characters. When every matching separator is occupied, the job fails with the idle-capacity reason and output: null; callers can submit a new request after capacity returns. The initial queued receipt does not promise an inference queue on an occupied model. Submission occurs once: after an interrupted response, inspect the retained job before retrying. The API never automatically replays an uncertain edit.

Inspect and retrieve content​

GET /v1/audio/separations lists newest-first jobs. limit is 1–63 (default 20); after is a retained last-ID cursor. The response has object: "list", data, first_id, last_id and has_more. An unknown cursor returns 400. At most 64 job records are retained; unexpired complete results are not silently evicted to admit another job.

GET /v1/audio/separations/{separation_id} returns committed metadata or 404 when this API node does not retain that ID. A completed output has the original source, ordered stems, shared common_gain and pre_gain_peak. Each stem reports its name, MIME type, size, SHA-256, sample rate, complete frame count, channels, bit depth and measured peak. All four stems share the original timebase, including any explicit resampling to the model's native 44.1 kHz.

GET /v1/audio/separations/{separation_id}/content/{stem} downloads drums, bass, other or vocals as PCM24 stereo WAV at 44.1 kHz. There is no per-stem automatic normalization: one shared attenuation avoids clipping while preserving relationships between the stems. Increasing export precision does not recover details absent from the source. Each complete WAV is capped at 64 MiB, and the four-file set at 256 MiB. ETag is the quoted complete WAV SHA-256. Partial sets return 409; absent or expired content returns 404. An already opened download holds its file descriptor, so deleting the job cannot truncate that download. At most eight downloads run concurrently per API node.

Verified content is retained for 24 hours, under a 2 GiB aggregate API media budget. Capacity exhaustion requires deletion or content expiry; results are never truncated. Complete retained sets are independently verified on API restart. Interrupted jobs become failed, partial files remain unservable, and no native generation is replayed automatically.

Cancel and delete​

POST /v1/audio/separations/{separation_id}/cancel requests native-task and media cancellation, removes partial API content and retains terminal metadata. An already terminal job is unchanged. The response is the current job object; unknown IDs return 404. Native readers and active file senders drain before their Worker-owned copies are reclaimed.

DELETE /v1/audio/separations/{separation_id} cancels active work, removes owned content and forgets the record. It returns id, object: "audio.separation.deleted" and deleted: true, or 404 for an unknown ID. Neither route deletes the creator's original Studio asset. Admission waits at most 45 seconds for placement, the full placed job has a 40-minute ceiling, and completed-output delivery has a five-minute budget. Source transfer is bounded to three minutes. Bytes and local paths never enter replicated State or event logs.

Benchmark Endpoints​

Benchmark variants of the generation endpoints run the same admission and validation as their non-bench counterparts, force a non-streaming run (stream=false, and partial_images=0 for images), and flag the task so the serving runner collects generation statistics. The response extends the normal response shape with two extra fields:

  • generation_stats: runner-reported timing/throughput statistics for the run, including the non-identifying serving_batches batching-mode flag and in_flight_at_admission request count. Serving node ids and backend tags are redacted from client responses.
  • power_usage: per-node and total system power sampled from live cluster telemetry while the request ran

Endpoints:

  • POST /bench/chat/completions takes the same body as POST /v1/chat/completions and returns the chat completion plus stats. The same TextGeneration admission applies.
  • POST /bench/images/generations takes the same body as POST /v1/images/generations.
  • POST /bench/images/edits takes the same multipart form as POST /v1/images/edits.
curl -X POST http://localhost:52415/bench/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "mlx-community/Llama-3.2-1B-Instruct-4bit",
"messages": [{"role": "user", "content": "Benchmark me"}]
}'

Cancel an In-Flight Command​

POST /v1/cancel/{command_id}

Requests cancellation of one in-flight generation command by its command ID. It covers text generation, image generation, embeddings, speech synthesis or transcription, and active video or music jobs owned by the API node you call. Skulk closes the local response stream or job, stops an in-flight runner, and aborts any unfinished media delivery.

Steward turns (skulk/steward) are covered too. The command ID a steward response advertises cancels the whole turn: the investigation step that is generating stops, and the steward starts no further steps or tool calls. The cancelled turn then ends the way any cancelled generation does: a streaming response sends an error event saying the generation ended before completing, followed by data: [DONE], and a non-streaming response returns an error body instead of a partial answer.

Finding the command ID:

  • streaming chat completions open with the SSE comment line : command_id <id>, and every streamed chunk's id field carries the same value
  • non-streaming chat responses use the command ID as the response id
  • Skulk control responses such as POST /place_instance return an explicit command_id field plus the exact resulting instance_id (those placement commands complete immediately and are not cancellable here)
curl -X POST http://localhost:52415/v1/cancel/<command_id>

A cancelled command returns {"message": "Command cancelled.", "command_id": "..."}; a cancelled steward turn returns {"message": "Steward turn cancelled.", "command_id": "..."}. An unknown or already-completed command returns 404 Command not found or already completed. Command streams are node-local, so call the same API node that accepted the original request. Simply disconnecting from a streaming response triggers the same cancellation path implicitly.

Model Discovery​

List models​

GET /v1/models

curl http://localhost:52415/v1/models

This returns known model cards, not just running instances. GET /models serves the same catalog through the same handler; prefer the /v1/models path for OpenAI-compatible clients. Complete installed cards load first so an air-gapped node keeps the exact generation it can actually launch. Temporary qualification_only installed records are the exception: once a normal signed catalog card owns the same alias, /v1/models reports the signed card and does not use the retained qualification record to claim that signed generation is installed. The current supported catalog comes from the external TUF-signed registry and refreshes at most every 60 seconds; a previously verified catalog may be used for up to 30 days during an outage. That age limit does not apply to complete installed artifacts. Skulk ships no model cards: without the registry or its acceptable cache (or with SKULK_OFFLINE=true), the catalog is the installed and custom cards, and a node with neither lists no models. Registry entries include immutable card and snapshot identities; local custom cards retain final override precedence.

Each entry also separates discovery truth from runtime truth:

  • separation, when present, describes an explicit AudioSeparation model's family, ordered stems, sample_rate, audio_channels, and trained_segment_seconds. It is independent of speech's audio and text-to-music's music metadata. This optional object describes model truth and does not imply a mounted separator or grant execution.
  • registry_architecture is the trusted open architecture identifier retained from the signed catalog.
  • capability_claims reports signed model/artifact capabilities even when no current Skulk engine can serve them.
  • engine_support reports the active signed engine/build decisions matching that exact architecture, artifact format, quantization, capability, and any required immutable card identity. These may include experimental or unsupported history. Active supported upstream_compatibility mappings may identify additional compatible engines. Empirical load/feature qualifications retain their exact tested card, build, hardware and workload for reporting; missing or differently scoped results do not revoke declared compatibility. Known-incomplete artifact capability evidence remains distinct from test coverage.

Installed sidecars retain the intrinsic architecture and capability claims for air-gapped use. A hash-bound support matrix that was previously TUF-verified is also usable offline; it never converts an experimental or negative decision into an upstream compatibility mapping; empirical results are reporting evidence.

Assess local fit and external capacity​

GET /models/assessment

ParameterRequiredBehavior
model_idYesExact authorized artifact alias. Unknown aliases return 404; no repository discovery occurs.
context_tokensNoInput plus output tokens per request, 256–1,048,576; default 8192.
concurrent_requestsNoSimultaneous requests, 1–16; default 1.
excluded_node_idsNoRepeatable node IDs excluded from the local dry-run.

The camel-case response binds cardDigest, sourceRepository, immutable sourceRevision, selectedFile, quantization and the requested workload. weightEvidence: card_declared identifies the card's selected weight size; it does not claim a measured runtime footprint. No benchmark is required. status is local, external_required, blocked, or insufficient_evidence. Reasons, assumptions and uncertainty accompany every result. Missing immutable identity or cache sizing abstains; a known context or artifact blocker is distinct from insufficient memory. Observed llama-server slots share an aggregate context pool. Other engines use conservative serial replicas; missing concurrent-engine evidence prevents a claim that those replicas establish external necessity. Management-only nodes do not require inference-memory telemetry. External groups respect effective speculative-vision slots and the command's aggregate context maximum; fixed-window RAM hosts include production context-window headroom. Incomplete artifact claims restrict matrix-derived admission while independent legacy compatibility remains available; legacy fit does not verify completeness.

Local candidates use ordinary placement, supported sharding and current reservations. Idle ready instances of the same artifact can be reused. Memory/GPU receipt ages are bounded to 60 seconds and backend observations to 120 seconds; receipt age is not the age of the underlying measurement. readiness distinguishes not_observed from loaded_not_workload_verified. Neither establishes successful inference for the requested workload.

externalConfigurations contains hypothetical, independently admitted complete remote allocations. Each reports backend/build/hardware constraints, replica count, request count, aggregate context pool, estimated usable memory, minimum physical memory and selected-weight disk bytes per node. Disk numbers exclude installation/staging overhead; discrete-GPU host RAM is unknown. These are single-host replicas, with no local/remote hybrid sharding or unsupported GPU pooling. They are alternatives, not additive resources or provider offers. Price, stock, startup time, latency and throughput are unverified. An engine-family support row alone does not identify a concrete compute lane or memory pool. The assessment omits that hypothetical variant and reports missing evidence when no concrete alternative exists. Legacy card compatibility remains available alongside deduplicated matrix-specific build/hardware alternatives.

This read never provisions, places, reserves or downloads. provisioning is recommendation_only; provider discovery and spending permission remain separate. Steward's assess_inference tool reads this same contract with bounded details and explicit coverage. Model selection displays this assessment; the coarse discovery Burst chip remains only a browsing hint.

Engine order for a model​

Several engines can often run the same model. Placement ranks them by the first of these that has an answer for a node:

  1. the order a person set for that model, described here;
  2. the model card's default order (placement.backend_preference);
  3. the built-in fallback: built-in engines first, installed engine packages after them.

An order is a list of backend tags, most preferred first. Each entry is an engine name, optionally followed by its hardware, such as llama_server-vulkan; an engine name on its own accepts whichever hardware a node has. An order only ranks. Entries a node does not have are skipped, and where a person's order names nothing a node has, the card's default decides for that node. An order therefore never makes a model impossible to launch.

An order is set only by these routes. Launching a model, on any engine, never sets one. It is kept by model name rather than on the model card, shared with every node, and saved on each node so it survives a restart. It takes effect at the next launch; running instances are not moved.

GET /models/engine-orders

Returns orders, one entry per model that has an order of its own, sorted by model name. Each entry has modelId, engineOrder and cardEngineOrder (the card's default order, empty when the card has none or the model is no longer in the catalog).

PUT /models/engine-order

FieldRequiredBehavior
modelIdYesExact model name in the catalog, 1 to 512 characters. An unknown name returns 404.
engineOrderYes1 to 16 distinct backend tags, most preferred first. A malformed list returns 422.
curl -X PUT http://localhost:52415/models/engine-order \
-H 'Content-Type: application/json' \
-d '{"modelId": "organization/model", "engineOrder": ["llama_server-vulkan", "llama_cpp-vulkan"]}'

The new order replaces any earlier one for the model. The response is the model's entry as the cluster now holds it. The cluster keeps an order for at most 512 models; a further model returns 409 until one is cleared. If the change is sent but the cluster does not confirm it within ten seconds, the route returns 503: read /models/engine-orders to see what is in force before trying again.

DELETE /models/engine-order

ParameterRequiredBehavior
model_idYesModel name, 1 to 512 characters. It need not be in the catalog, so an order left by a removed model can be cleared.
curl -X DELETE --get http://localhost:52415/models/engine-order \
--data-urlencode 'model_id=organization/model'

Clears the model's order, so its card's default decides again. Clearing a model that has no order succeeds. The response is the model's entry with a null engineOrder. An unconfirmed change returns 503, as for the PUT.

Engine packages across the cluster​

GET /v1/engines

Lists every engine package a node holds or may install, grouped by engine ID. An engine package adds an engine that is not built into Skulk; built-in engines are not listed here and appear in each node's resources in /state.

The route is read-only. It is assembled from what each node last advertised about itself, so it reads no disk, starts nothing and installs nothing. A node that stops reporting drops out of the list.

curl http://localhost:52415/v1/engines
FieldMeaning
packagesEnabledWhether engine packages are turned on for the node that answered. A node on which they are turned off reports none.
engines[].engineIdThe publisher.engine identity, such as foxlight.tensorfold.
engines[].nameThe engine's name in backend tags and engine orders, such as tensorfold.
engines[].nodes[]One entry per node and lane, sorted by node then lane. Each has nodeId and package.

Each package describes one lane (one engine on one accelerator class) on one node:

FieldMeaning
lanemetal, cuda, rocm, vulkan or cpu.
backendTagThe backend tag placements are stamped with, such as tensorfold-rocm.
statusactive: the node holds a usable build and new launches use it. unusable: the node holds a build it cannot offer; problem says why. offered: the node holds none and may install this build the first time a model placed there needs it.
buildManifest digest of the active or offered build. This is the build identity stamped on a placement. Null when the node cannot tell which build is active.
engineVersion, generationVersion of the engine inside the build, and the package generation.
publisherTrust ID of the publisher that signed the active build. Null for an offered or unusable build.
channelstable or candidate for an offered build. Null for a held build.
installedBuildsManifest digests of every build of the lane on the node's disk, at most 16.
rollbackBuildThe build a rollback would return to, or null when none is kept.
problemFor an unusable build, a short refusal code such as installation_damaged or skulk_version_unsupported.
downloadBytesFor an offered build, the bytes an install downloads.
overheadBytesMemory the build declares beyond a model's weight bytes, which admission counts for a launch.
loadResultsHow the last model load on each build of the lane ended on this node since it started, newest first, at most 16. Empty until a model is loaded there.
unsupportedModelsModels a build of the lane refused to load with the code unsupported_model since the node started, newest first, at most 32. Each entry has the shape of a loadResults entry.

Each entry of loadResults:

FieldMeaning
buildManifest digest of the build that was loaded.
outcomeloaded: the model became ready. refused: the engine answered the load with a typed refusal, named in code. failed: the runner ended while loading for another reason; the node's log holds it.
codeThe engine's refusal code, such as load_refused or settings_changed. Null unless outcome is refused.
modelIdThe model that was loaded.
atUnixMsWhen the load ended, by the node's own clock.

A load result is evidence about one build and one model. It is kept in the node's memory, so a restart clears it, and it never changes where a model may be placed.

unsupportedModels does change placement. A build listed there for a model is not given that model again, on any node that holds or could install the same build: a launch, a repair or a preview uses the next engine in the model's order. An entry leaves when the node restarts, when the build leaves the node, or when the build later loads the model.

When an engine refuses a load, Skulk places the model again on the next engine that can run it, on the same machine when it has one. The instance that was refused is deleted with a placement_failed record in /state instanceFailures that names the engine's code, and the model comes up under a new instance ID. A client that follows an instance ID should read that record and then find the model's new instance.

An active status says the node holds an intact build that this Skulk version can run. It does not promise that a given model loads on it; only a launch answers that. With no engine package anywhere in the cluster, engines is empty.

Change an engine package on a node​

Three routes change a package a node already holds. Each names the engine in the path and the node and accelerator class in a JSON body, takes effect on that node only, and answers with the lane as the node reports it straight after the change. Through the operator gateway they need the operations:write scope.

None of them downloads anything, starts an engine or touches a model that is running: a running model keeps the build it started on until it stops. Model files are never touched.

POST /v1/engines/{engine_id}/activate

Makes one build that is already on the node's disk the build new launches there use. The build is hashed in full first. The build that was active becomes the one a rollback returns to.

curl -X POST http://localhost:52415/v1/engines/foxlight.tensorfold/activate \
-H 'Content-Type: application/json' \
-d '{"nodeId": "<node id>", "lane": "rocm", "build": "<manifest digest>"}'

POST /v1/engines/{engine_id}/rollback

Makes the build that was active before the current one the build new launches use again. The two swap places, so a second rollback undoes the first. The body has nodeId and lane.

POST /v1/engines/{engine_id}/remove

Deletes one build from the node's disk when the body names a build, or every build of the package when it does not. The build new launches use cannot be removed alone. After the whole package is removed the node may offer it again, and installs it again the first time a model placed there needs it; to keep an engine from being used, change the model's engine order or turn engine packages off in Settings.

Body fieldMeaning
nodeIdThe node whose package is changed, as GET /v1/engines names it.
lanemetal, cuda, rocm, vulkan or cpu.
buildManifest digest of a build on the node's disk. Required to activate, optional to remove, not used to roll back.

The answer has nodeId, engineId, lane, action and package, which is the lane in the same shape GET /v1/engines gives, or null when the node no longer holds or is offered the package.

StatusWhen
404The node reports no installed package for that engine and lane, the build is not on its disk, there is no earlier build to return to, or the node has left the cluster.
409The build's files are not intact; the node's Skulk version cannot run the build; the build is the active one and was asked to be removed alone; a model on the node is running on a build that would be deleted; or engine packages are turned off on the node. Nothing was changed.
500The node did not confirm the change. Read GET /v1/engines to see what it holds now.
503The change was sent and the node did not answer in time. Read GET /v1/engines before trying again.

The same four routes are available from a terminal on any machine that runs a Skulk node. Each command asks the node on that machine, which passes a change on to the node that holds the package:

skulk engines list
skulk engines activate foxlight.tensorfold <manifest digest> --node <node id> --lane rocm
skulk engines rollback foxlight.tensorfold
skulk engines remove foxlight.tensorfold <manifest digest>
skulk engines remove foxlight.tensorfold

Without --node the node on this machine is meant. Without --lane the node's only package for the engine is meant; a node that holds the engine for more than one accelerator class must be told which. list --json prints the report as JSON, and --api-port names the local node's port when it is not 52415. A command exits 0 when it did what was asked and 1 when the node refused or did not answer.

The dashboard reads the same report and makes the same changes under Settings, in the Add-on engines section, behind "Engines on your machines". It lists each engine, the machines that hold it or are offered it, and the builds on each machine's disk. "Use this build" activates a build, including the earlier one, and "Remove" deletes one build or the whole engine from a machine after a second click. A change there is sent at once; it is not part of the Settings draft and needs no Save.

Read model capacity requirements​

GET /models/requirements

Query parameters:

ParameterRequiredBehavior
model_idYesExact known selectable alias, 1–512 characters. Unknown aliases return 404; lookup never discovers or authorizes a repository.
context_tokensNoInteger 1–1,048,576, default 8192, per sequence. A request above the card's advertised positive context limit returns 422; it is never silently reduced.
curl --get http://localhost:52415/models/requirements \
--data-urlencode 'model_id=organization/model' \
--data-urlencode 'context_tokens=8192'

The response uses snake-case fields. It selects the same effective card as /models, including central-store installed generations, local fallback, custom overrides and qualification-card visibility. Store outages may retain the same last-known installed snapshot as the catalog; this read is not a freshness or placement guarantee.

  • model_id, nullable registry_card_id, and card_digest bind the selected card. The digest is SHA-256 of its JSON-mode model dump with snake-case names, sorted keys, compact separators, ASCII escapes and no non-finite values, excluding only registry_snapshot_id. It includes complete card contents, even when a signed card ID exists. It is a content binding, not a signature.
  • context_tokens echoes the requested budget; context_limit is the advertised card limit or null when unknown.
  • storage_bytes includes declared weight bytes and a declared GGUF vision projector. Runtime images, download staging, caches and other disk headroom require separate accounting.
  • estimated_memory_bytes uses core's whole-model footprint estimate at that context. It is null for non-text-generation tasks or missing KV geometry. Known geometry still uses core's head-dimension and KV-dtype assumptions; an estimate is not a measured load guarantee.
  • discrete_gpu_memory_fraction and unified_memory_fraction expose core's usable discrete-VRAM and Apple RAM working-set fractions. Compare the estimated footprint to usable capacity; summing device memory does not prove that the engine supports the required sharding.
  • compatible_backends contains declared artifact/engine compatibility tags. required_capabilities reports positively evidenced intrinsic capabilities; engine_support reports matching compatibility mappings and scoped qualification evidence. Tested build/hardware provenance is not an eligibility list. Missing qualification does not revoke declared compatibility. incomplete_capabilities reports missing components for the affected operation.
  • estimate_only is always true. No resource reservation, spending approval, download or placement occurs.

External controllers must bind their approved workload to the returned card identity and context, recheck that identity before execution, and use the joined node's compatibility, placement admission and runner readiness as runtime proof. A registry alias can change between planning and execution. See External controller integration.

Legacy repository-code approvals​

GET /models/remote-code-approvals

Deprecated compatibility endpoint. It lists approval identities retained from older deployments, but those values no longer participate in model execution. Signed publication and explicit model addition are the active repository-code authorization boundaries. An installed card without a registry identity stays authorized by the earlier Skulk release that shipped it.

Ordinary reads and launch endpoints never fetch an unknown Hugging Face repository or persist a card implicitly. An external repository must first enter through authenticated POST /models/add or POST /models/add-card.

POST /models/remote-code-approvals/{card_id}

Deprecated compatibility endpoint. Current cards return HTTP 409 because publication or addition already authorized them; Skulk does not create a redundant approval entry.

DELETE /models/remote-code-approvals/{card_id}

Removes an inert approval retained from an older deployment. It does not revoke a published, installed, or explicitly added card.

Search Hugging Face​

GET /models/search?query=...&limit=...&mlx_only=...&offset=...

curl "http://localhost:52415/models/search?query=qwen3&limit=5"

Behavior note:

  • mlx_only=true restricts results to the mlx-community author; the default searches all Hugging Face model repositories.
  • An empty query returns repositories sorted by Hugging Face's trending score; text queries sort by downloads.
  • offset skips that many leading results, for "show more" paging.
  • pipeline_tag restricts results to one Hugging Face task (for example text-generation or automatic-speech-recognition).
  • Ordinary text queries use Hugging Face repository search.
  • A query ending in .gguf also performs a bounded filename-aware fallback: Skulk broadens the model-name prefix, inspects those candidate repositories' manifests, and returns only exact filename matches. Exact matches carry a matched_file repo-relative path so the dashboard can preserve that quant.
  • Each result additionally carries discovery metadata when Hugging Face reports it: pipeline_tag (task), library_name, gated (license acceptance plus an HF token are required to download), license, param_count (total parameters from safetensors or GGUF metadata), total_file_size (exact GGUF artifact bytes), context_length, base_model_repo and base_model_relation (derivation lineage: finetune, quantized, merge, or adapter), arxiv_ids, languages, and architecture.

List a GGUF repository's quantizations​

GET /models/gguf-quants?model_id=owner/name

curl "http://localhost:52415/models/gguf-quants?model_id=unsloth/DeepSeek-V4-Flash-0731-GGUF"

Returns { "model_id": ..., "options": [...] } where each option is one downloadable quantization: its repo-relative first shard (gguf_file, the value to pin when adding or downloading), human label, exact total_bytes, and shard_count, sorted smallest first. Companion artifacts (speculative drafters, imatrix calibration files, multimodal projectors) are excluded; options is empty for a non-GGUF repository. The dashboard's Hugging Face results use this for the per-quant download chooser.

Fetch a model card summary​

GET /models/card-summary?model_id=owner/name

curl "http://localhost:52415/models/card-summary?model_id=LiquidAI/LFM2.5-2.6B"

Downloads the repository's model card README and returns { "model_id": ..., "summary": ... }, where summary is the card's first prose paragraphs with markup stripped (bounded length). The summary is empty when the README is missing or has no usable prose. Summaries are cached per API process; the dashboard's discovery popovers fetch this lazily when opened.

Add a Hugging Face model​

POST /models/add

{
"model_id": "satgeze/Hy3-1M-GGUF",
"gguf_file": "hy3-1M-MTP-IQ3_XXS.gguf",
"source_revision": "0123456789abcdef0123456789abcdef01234567"
}

Resolves the repository to one immutable commit, fetches metadata, and adds a custom model card to the cluster catalog. The dashboard and operator API may call this through the normal cluster control surface when the request comes from a direct loopback or trusted-fabric socket peer (private LAN or CGNAT, with no proxy-forwarding headers and, for browser requests, an Origin on the same trust classes or naming one of this node's own hostnames, which is how a dashboard opened via my-node.local or the node's MagicDNS name qualifies while a DNS-rebound attacker hostname does not), or has passed the authenticated operator gateway with operations:write. The trusted-fabric admission matches the cluster's standing posture (a peer on those networks can already join the mesh as a full member) and is what lets a dashboard browsed from another machine on the LAN add models. Forwarded requests and public peers are still refused. The explicit add action authorizes repository code selected by that card; there is no second approval step. A successful response waits for the exact add command to be ordered, persisted, and visible in the responding API's catalog, so an immediate download or placement cannot race catalog convergence. Historical executable custom cards that lack an immutable source revision fail closed after upgrade; re-adding the model resolves and persists a pinned revision. A generated GGUF card is compatible with both llama.cpp engines and prefers the served llama_server tags, so on a node running llama-server it gets that engine's concurrency slots and is eligible for multi-node pooling via RPC; nodes without a served binary fall through to the in-process engine. When the signed registry has a card for the repository (its own id, or any signed alias of it such as one per quant), generated metadata retains that card's hard pipeline-split constraint, the strictest among the aliases; adding a curated model through the dashboard therefore cannot erase an architecture safety boundary. A hand-authored card remains an explicit operator override. The model_id field is required. gguf_file is optional; when supplied it must be an exact repo-relative GGUF weight path and the card pins that quant instead of using Skulk's default GGUF preference. If the selected quant is split, Skulk stores its first shard as the backend entrypoint while downloading the full shard group. source_revision is also optional; when supplied it must be a full 40-character Hugging Face commit hash. When omitted, Skulk resolves main once to the Hub's full commit. Card metadata and subsequent artifact downloads are therefore always pinned to an immutable revision. When the Hub refuses the metadata fetch with 401 or 403 (a gated or private repository), the 400 response explains the concrete fix for this node: configure a Hugging Face token, accept the model terms on the repository page, or accept them under the same account the configured token belongs to. Like every HTTPException from this API, the explanation is serialized in the OpenAI-style error envelope, so clients read it from error.message.

Add an exact unsigned model card​

POST /models/add-card

{
"model_card": {
"modelId": "org/model@q4-k-m",
"sourceRepository": "org/model",
"sourceRevision": "0123456789abcdef0123456789abcdef01234567",
"storageSize": {"inBytes": 1234},
"nLayers": 32,
"hiddenSize": 4096,
"supportsTensor": false,
"tasks": ["TextGeneration"],
"ggufFile": "model-Q4_K_M.gguf"
}
}

Persists a complete operator-supplied card without fetching or regenerating Hub metadata. This is intended for exact pre-publication qualification and other trusted operator workflows. The endpoint preserves the pinned artifact contract but always forces unsigned custom-card semantics: is_custom becomes true, and every supplied registry_* identity, provenance, architecture, format, or capability claim is removed. Service-bearer installs additionally receive qualification_only; operator installs do not. A full 40-character immutable sourceRevision is required. For an exact video bundle, local latent_upscaler, duration_head and video_decoder companions must occur in the manifest with matching declared sizes and local revisions. An explicit reference to the base repository is local too. Source-audio conditioning and editing cannot set the aggregate referenceLimits.maxFiles to zero. These inconsistent cards return 422 before catalog mutation; independently pinned external packs retain separate downloads. Every external vision, MTP, assistant, or draft repository must also declare its matching immutable companion revision. A card whose minSkulkVersion is above this node's release is refused with 422 and the reason, since the node would persist it and then skip it on every load. The exact add action authorizes repository code selected by the temporary card. Unlike /models/add (which also admits direct trusted-fabric peers for the dashboard), this mutation accepts only direct loopback access or an authenticated operator gateway with operations:write. A headless registry qualification worker may instead present Authorization: Bearer <token> when the node configures the same high-entropy value in SKULK_EXACT_CARD_QUALIFICATION_TOKEN. That credential is deliberately valid only for this exact-card install and DELETE /models/custom/{model_id} cleanup; it grants no general model, inference, configuration, or operator authority. The service bearer cannot replace or delete any pre-existing non-qualification card; cleanup requires the server-assigned qualification_only marker. Service cleanup must also send the complete original candidate as the DELETE body:

{
"model_card": {
"modelId": "org/model@q4-k-m",
"sourceRepository": "org/model",
"sourceRevision": "0123456789abcdef0123456789abcdef01234567",
"storageSize": {"inBytes": 1234},
"nLayers": 32,
"hiddenSize": 4096,
"supportsTensor": false,
"tasks": ["TextGeneration"],
"ggufFile": "model-Q4_K_M.gguf"
}
}

Skulk applies the same unsigned normalization and deletes only if that complete temporary card still owns the alias. These ownership preconditions are rechecked by the elected master when it orders the mutation, so a concurrent operator or newer qualification change cannot be overwritten or deleted through stale API-node state. The master also folds newly refreshed signed-registry truth into this ownership view, so publication prevents a later temporary override even though registry refreshes do not traverse the command log. The endpoint returns success only after the exact card has round-tripped through that ordering boundary, its originating command ID has been acknowledged after local persistence/cache application, and the card is visible in the responding node's catalog. Service-authenticated cleanup likewise waits for its exact delete event and suppresses retained qualification_only installed sidecars from catalog projection while preserving the downloaded artifact bytes; a conflicting winner returns 409, and convergence timeout returns 504.

Per-node storage breakdown​

GET /store/storage

Returns the local node's storage picture: every installed artifact across the configured staging cache, SKULK_MODELS_DIR, and read-only model search roots, with its size, last-use time, and whether a live instance (or one of its companion repos: MTP sidecar, assistant, vision weights) currently depends on it, plus event-log usage and free disk on the models volume. Cluster-wide views query each node's API.

Each artifact entry also reports installedIdentity, manifestSha256, verificationState, manifestComplete, artifactRole, and ownerModelId. locationKind is store_local when the directory belongs to the canonical store on this node and node_cache for a launchable node-local copy. registryCardId identifies the full card retained with the bytes, while a companion additionally reports its immutable ownerCardId; reconciliation uses those fields to select one current generation per artifact alias. Directories that cannot be associated with trusted card truth appear with an unresolved verification state and are not imported or launched automatically.

The request has one side effect. A complete directory that predates card records, and that a current card recognizes, gets its card record written (.skulk/installed-card.json, or a detached record for a read-only root). The model then joins this node's live catalog at once. While the registry cannot be read, the last verified registry catalog is also used for that match. The node runs the same association on its own, at start and about once a minute, whether or not a model store is configured.

curl http://localhost:52415/store/storage

Staged copies are managed automatically when the model store is on: when an instance shuts down (and at node startup, which reconciles copies orphaned by a crash while keeping any copy used within the last 30 minutes), staged models that no live runner uses and no instance placed on the node needs are kept newest-first up to the staging_keep_recent_gb grace budget (default 40 GiB) and evicted beyond it. Set cleanup_on_deactivate: false in the staging config to keep every staged copy while disk is healthy. Independently, before each store-backed transfer the worker may evict idle copies inside that grace budget until the exact additional registered artifact bytes fit with 10 GiB of operating-system headroom. Base and companion transfers are serialized, resumable manifest data is credited, and same-filesystem hardlinks count as zero allocation. Live runners, active model transactions, and the incoming partial model stay protected; an unsatisfied capacity target becomes DownloadFailed before transfer.

The canonical store host applies the same exact-byte, serialized admission to its Hugging Face download transaction. It never evicts authoritative models; insufficient canonical capacity fails the store download before file transfer. Store-unreachable direct fallback applies the reserve to the node's actual model-cache filesystem and does not run staging eviction.

Placement and Instance Management​

These endpoints are the heart of the Skulk control plane.

Quick launch​

POST /place_instance

curl -X POST http://localhost:52415/place_instance \
-H 'Content-Type: application/json' \
-d '{
"model_id": "mlx-community/Qwen3.5-9B-4bit",
"sharding": "Pipeline",
"instance_meta": "MlxRing",
"min_nodes": 1,
"excluded_nodes": []
}'
FieldMeaning
model_idExact alias already present in the signed, installed, or operator-added catalog
shardingPipeline or Tensor
instance_metaMlxRing, MlxJaccl, or LlamaRpc (multi-node GGUF pooling: one driver node holds the model and each donor node lends GPU memory over the network)
min_nodesMinimum nodes required for the placement
context_tokensOptional context window for this placement, 256 to 1,048,576 tokens. The placer honors it exactly up to the largest window the chosen nodes hold (the preview's max_context_tokens) and answers 400 naming that maximum for a larger request; it is never silently lowered. Repair re-placements of the instance keep the same request. When omitted, llama-server, in-process llama.cpp and vLLM placements take the fleet default inference.served_context_tokens (32768 unless changed in Settings), because those engines reserve the whole window's KV memory at load; MLX placements keep the full memory fit, since MLX grows its cache per request.
excluded_nodesOptional. Node IDs the master should treat as if absent when scoring this placement. Already-running instances on those nodes are unaffected (exclusion is per-placement, not cluster-wide), and automatic repair re-placements of this instance (memory refusal, download failure) keep honoring the same exclusions. Default: []. Note: node IDs are per-session, so they change when a cluster session restarts.
engine_orderOptional. Engines to try for this launch only: 1 to 16 backend tags, most preferred first, such as llama_server-vulkan. They are consulted ahead of the model's person-set engine order (see Engine order for a model) and the card's default. This sets no standing order; it is how a person tries an engine before settling on one. Automatic repair re-placements of the instance keep the same order. An order only ranks: a launch that cannot run on any listed engine starts on the next engine in line (the model's order, the card's default, then the built-in fallback), and the response's engine_pick reports it (asked, the planned engines, and used, which is false when another engine is used and null when the plan does not name its engine yet). A launch brought back after every node restarted, and one made by an approved Steward proposal, follow the standing order instead.

The placement is validated against the current cluster state before the command is forwarded, so an impossible placement fails at the API instead of silently failing on the master:

  • 404 when model_id is not already present in the authorized local catalog. Use the authenticated model-add flow first; launch never performs implicit Hub discovery.
  • 400 with the specific reason: no connected cycle of min_nodes nodes, exclusions removed every candidate, every candidate has a positively known isolated Zenoh inference data plane, the model does not support Tensor sharding, or a node cannot fit its weight shard plus runtime headroom (the error names the node and the GB arithmetic).
  • 503 when cluster info is still being gossiped (a cluster that just formed): connection edges lag node identities by a few gossip rounds, and per-node memory info lags the edges. The request internally waits up to 15 seconds for the info to arrive before giving up, so retry shortly on 503.

For text-to-music, Skulk prepares audio.cpp on one eligible node and verifies its ready build and signed model support before placement. On Linux amd64, a matching signed Vulkan claim selects the separately installed Vulkan package; CPU and Vulkan executable identities stay distinct. The API dry-run and master then place on that prepared node; if preparation fails, the request returns 503 with a diagnostic and leaves the node healthy.

The request expresses intent, not a reservation of a prior preview. A card may declare any number of open backend tags plus an ordered preference. The planner first removes candidates blocked by participation policy, engine/build evidence, data-plane health, topology, or capacity; it then ranks what remains. If preference 1 is unavailable it automatically falls through to 2, then 3, without requiring the client to select a concrete engine or host. An explicit excluded_nodes value remains an operator constraint, not the normal selection mechanism.

Placement failures preserve the human-readable error.message body and include a stable X-Skulk-Placement-Failure response header. Current categories are no_valid_placement and placement_info_pending; exact-placement requests may additionally return model_card_identity_mismatch. model_code_approval_required remains in the response schema only for compatibility with older nodes and is not emitted by current authorization policy.

POST /instance additionally requires every caller-embedded shard card to match the current effective catalog card exactly, not merely reuse its alias. This prevents an otherwise valid signed or operator-added identity from being attached to caller-selected repository code or artifact fields.

A successful response includes both command_id and instance_id. For POST /place_instance they contain the same stable value: the accepted command owns exactly that resulting placement identity. Clients should retain instance_id and correlate progress against that runtime rather than guessing from model name or observation order. The field is additive for older clients. POST /place_instance also returns engine_install, the same object a placement preview carries (see below), when the accepted placement installs an engine first, and null otherwise. It comes from the receiving node's dry run of the placement, so a client that launches without a preview, such as the dashboard's quick launch, can still tell the operator that placement will take longer.

Memory fitting is checked per node, not summed across the cycle: Tensor sharding splits weights evenly, Pipeline allocates layers proportionally to each node's available memory, and every node must hold its share times a runtime-overhead factor (KV cache, activations, runner) on top of the raw weight bytes. A model that exactly equals a node's free memory is rejected, because that placement would thrash, not run.

The dry-run uses the same hardware-memory classification as the master. In particular, a unified-memory GPU may use its combined VRAM/GTT pool for model fit while fixed-window llama.cpp engines keep their conservative startup context. The accepted command therefore cannot change context policy between API validation and master placement.

Preview valid placements​

GET /instance/previews?model_id=...

curl "http://localhost:52415/instance/previews?model_id=mlx-community/Qwen3.5-9B-4bit"

This is usually the best first Skulk-specific endpoint to call. It shows which combinations of sharding mode, networking mode, and node count are valid, and why invalid combinations fail. Each unavailable entry also carries an error_code with the same stable category vocabulary as placement responses.

Each preview's instance_meta reports the shape placement would actually mint for that combination, not the shape that was asked about: for example a GGUF model previewed at two GPU nodes reports LlamaRpc (driver plus memory donors) even though the request enumerates the generic metas. Trust the preview's reported meta when constructing a follow-up POST /place_instance. The embedded instance's contextTokenLimit is the largest window the placement holds, and each preview also carries max_context_tokens (the same value), default_context_tokens (what a launch without context_tokens stamps: the fleet default for engines that reserve at load, otherwise the maximum), reserves_context_at_load, and kv_bytes_per_token (the estimated KV cost of one token of window across the placement, null when the card's attention geometry is unknown), so a client can show what a chosen window reserves before launching. Posting the preview's instance to POST /instance keeps its stamped maximum; the fleet default applies to POST /place_instance, while an exact instance keeps its own contextTokenLimit (or the legacy backfill, the 8192 floor for engines that reserve at load, when it omits one). The window an exact instance is stamped with is recorded as its repair intent, so a memory-refusal or download-failure re-placement rebuilds the same window rather than the fleet default. Unified-memory GPUs are not previewed with a discrete-VRAM context lift that the master would later remove.

Besides the planner's ranked pick per shape, the response also contains per-host single-node previews marked "alternative": true for every other host that passes admission. On a heterogeneous fleet the ranked winner is typically the node with the most free accelerator memory; the alternatives explain the full set of valid hosts. They are not reservations: ordinary POST /place_instance recomputes and launches the best candidate against current facts. Operators who intentionally want to steer policy may use node exclusions and request a fresh preview. Alternatives are omitted when node_ids already constrains the hosts.

Every preview additionally reports compatibility_source (card or signed_engine_support), the exact support_claim_ids used when a signed matrix expanded placement, and an operator-readable compatibility_detail on engine/package, resource or incomplete-artifact gaps. The claim IDs identify upstream compatibility mappings used by this preview, not an empirical GPU permit list. Declared compatible engines remain valid without qualification. Real compiled-target, ABI, implemented-operation and live capacity requirements still apply.

Each preview also exposes memory_estimate_notes, an array describing effective cache storage, allocation padding/workspace and conservative unknown-layout fallbacks. Its returned instance carries memorySettings in each shard metadata object. Preserve those settings when submitting an exact placement: a changed effective cache policy requires a fresh preview. Weight quantization is independent of cache quantization, and estimates describe this serving configuration.

A preview whose placement would install an engine first carries engine_install; otherwise the field is null. Video cards can install comfy, text cards can install vllm, and native image cards can install stable_diffusion_cpp on an eligible node before their first load. This happens beside the model download, so first use takes longer. The object holds engine, node_ids (the nodes that would install it), approximate_download_bytes, and detail, a sentence to show the operator before placing ("The video engine (about 7 GB) will be installed with this model, so placement will take longer."). Among otherwise equal candidates, placement prefers a node whose engine is already installed. While the install runs, the instance's InstallEngine task is pending or running in GET /state tasks, carrying the same approximateDownloadBytes; a failed install fails the instance with engine_install_failed in instanceFailures, and the message names the step that failed (the download, the disk-space check, or the GPU check).

An engine package a node does not hold but can install is announced the same way. engine is then the package's engine name (for example tensorfold), and approximate_download_bytes is read from the answering node's own copy of the engine store's package list, so it is 0 when that node does not list the build. The node advertises the package's backend tag in onDemandBackends and the exact build in installableEngineBuilds; the placement is stamped with that build, and the worker installs and activates exactly that build before the model loads. The InstallEngine task's engine is the package's engine name and its approximateDownloadBytes is 0. A node that is offline, has engine installs turned off (SKULK_NO_ENGINE_AUTOPROVISION=1), does not run models, or has engine packages turned off offers no package this way.

Two cluster settings in the engines section of GET /config and PUT /config govern engine packages. They are settings and not launch switches, so they work the same in a packaged Skulk, and a node applies a change within about a minute, without a restart. The dashboard edits both under Settings, in the section named Add-on engines: "Use add-on engines" is packages_enabled, and "Install test builds" switches package_channel between stable and candidate.

  • engines.package_channel: stable (the default) installs released builds only; candidate makes every node also install builds that are still being tested. A package a node already holds is never replaced by this setting.
  • engines.packages_enabled: true by default. Set to false, every node ignores the engine packages it holds: it offers none, installs none and loads no model on one. Packages on disk stay there and come back when it is turned on again. A model already running on a packaged engine keeps running until it is stopped. SKULK_ENGINE_PACKAGES_DISABLE=1 at launch turns packages off on that one node, whatever the setting says.

A compatible Comfy renderer update can also be prepared through this flow while the base engine is already installed. The notice then quotes the small published wheel and names a renderer update. The instance retains its exact stamped build; ready older instances are not changed by a new install offer. Model load waits for that instance's archive-backed verification, and offline preparation requires an intact cache. Engine availability and hardware qualification remain separate.

Query parameterMeaning
model_idRequired. Hugging Face-style model ID.
node_idsOptional, repeatable. Restricts previews to candidate cycles that contain all of these node IDs (subset matching).
excluded_node_idsOptional, repeatable. Excludes the listed node IDs from candidate cycles for every previewed combination. Mirrors the excluded_nodes field on POST /place_instance so dashboards can render an accurate preview against the post-exclusion topology.
# Preview with one node excluded:
curl "http://localhost:52415/instance/previews?model_id=mlx-community/Qwen3.5-9B-4bit&excluded_node_ids=12D3KooWAbc..."

Build a placement manually​

GET /instance/placement

Use this when you want a specific combination and want to inspect the exact instance shape before launch, including the hardware-aware contextTokenLimit that the master would stamp. Query parameters are required model_id, optional sharding (default Pipeline), instance_meta (default MlxRing), and min_nodes (default 1). This computes a placement; it does not launch or reserve it.

Create an instance from a fully specified placement​

POST /instance

Use this when you already have an instance object and want exact control. A successful response returns the accepted command_id, the submitted instance_id, and its model_card; clients can use that exact instance identity to correlate the acknowledgement with later runtime and failure truth. The API requires every embedded shard card's modelId to match the assignment's canonical modelId before acknowledging creation. An inconsistent shard card returns HTTP 400 with X-Skulk-Placement-Failure: model_card_identity_mismatch, and no instance state is created. The instance's optional excludedInstallIds accepts an array of UUID strings and retains these persistent machine exclusions in the placement and subsequent repairs. Restart recovery retains every original stable exclusion even while the machine is connected, so a later rejoin or a fresh recovery recorder does not lose the setting. Malformed UUIDs, numeric entries, and a scalar instead of an array return HTTP 422 before a placement command is sent. For vLLM, exact placement fills a missing shard resolvedEngineBuild from the node's advertised installed or first-use runtime, just like automatic placement. Missing backend telemetry or a missing first-use recipe prevents an unbound launch. An existing build binding is preserved for worker verification; a newer managed default cannot silently replace it. For a text-to-music instance, the placement must name exactly one node. The API prepares audio.cpp on that node and verifies a ready build and signed support claim before accepting the command. A matching Linux amd64 Vulkan claim prepares the separate Vulkan package. Music admission checks the selected backend's memory pool; GPU lanes use their accelerator memory budget. If the node cannot be prepared, the request returns HTTP 503 with the node's preparation or compatibility diagnostic. The accepted placement carries the verified preparation snapshot so delayed node telemetry cannot replace the ready engine view during that request.

Persist the submitted instance identity before sending. HTTP acceptance is not download or runner readiness. If the response is lost, reconcile that exact ID against GET /state and instanceFailures; this endpoint does not document a client idempotency-key guarantee. See Controller integration for bounded readiness observation and cleanup responsibilities.

Inspect one instance​

GET /instance/{instance_id}

Pass the exact instance ID as the path parameter. Returns its current instance object, including shard assignments and context limit; an unknown ID returns 404. Presence alone does not imply all runners are ready.

Delete an instance​

DELETE /instance/{instance_id}

Takes an instance ID and no body. Sends a deletion command and returns message, command_id, and instance_id; observe /state for completion. An unknown ID returns 404. Deleting the maintained Steward instance while intelligent fabric is enabled returns 409; disable that mode to remove it. Deletion interrupts work on the instance and is not a model-file deletion.

Bind a placement preview to model requirements​

GET /instance/previews retains its existing model_id, node_ids and excluded_node_ids query parameters. Each preview with an instance now includes card_digest, using the same canonical complete-card digest as GET /models/requirements; previews without an instance return null. Before submitting POST /instance, compare that digest to approved requirements and retain the exact returned instance. A matching alias or registry ID alone does not establish identical card contents. The preview digest grants no admission: the API/master card checks and resource-derived context ceiling still apply. The exact-instance creation path does not atomically revalidate current topology or backend/build support. Controllers must obtain a fresh target-specific preview, verify live node support before submission, and continue checking support and readiness afterward; an accepted command alone is not proof of usable capacity.

The requirements response's required_capabilities and scoped qualification claims are reporting evidence. Controllers must not require a retained benchmark, a complete qualification matrix, or a tested build/hardware tuple before accepting otherwise compatible capacity. Untested compatible hardware remains eligible. Use those claims to describe observed results and recommended workloads; verify the live advertised backend and its actual architecture, ABI, compiled-target, dependency and resource requirements separately. Missing artifact components or an unimplemented operation still block that operation. Actual platform/runner admission and exact selected-runtime integrity checks remain in force after a node joins; qualification evidence cannot substitute for live readiness.

A controller also checks the preview's contextTokenLimit against its approved per-sequence context budget and verifies the live accepted instance after submission: the master computes the limit from current resources. Keep watching the exact instance's card, resolved backend, context capacity and node assignment; metadata from a previous preview is not fresh readiness evidence.

For POST /instance, a positive contextTokenLimit is an upper bound chosen by the caller. The master preserves a smaller requested window and lowers an inflated one to its current resource-derived ceiling; it never raises the request to the preview maximum. Nonpositive explicit limits are rejected during placement. An omitted limit retains the instance schema's model/engine backfill, still bounded by admission. Controllers budgeting a specific load-time KV allocation should set that exact limit and verify it on the accepted instance.

Committed GPU capacity during placement​

Placement previews and normal launch admission account for existing concrete GPU shards, including their stamped context windows, before load telemetry catches up. The master also reserves newly accepted creations while their indexed events are pending. Previews themselves do not reserve capacity. A later request can therefore be refused when another placement has committed the remaining memory. POST /instance also checks its GPU shard footprint against that remaining pool. An exact GPU placement with no usable VRAM observation is refused; it cannot substitute a system-RAM estimate for the missing GPU budget. Unstamped non-RPC shards resolve against the target node's advertised compatible backends before admission; missing backend evidence causes refusal. Accepted shards retain that backend choice. Restored unstamped shards on GPU hosts reserve capacity conservatively until their engine ownership is known. If capacity changes after acknowledgement and the master refuses either an exact-create or quick-launch command, /state retains instanceFailures with the acknowledged instance ID and errorCode: placement_failed; controllers should use this terminal evidence rather than wait for a runner. Removing a placement does not promise immediate GPU memory release. RPC instances continue using observed memory because their per-device allocations are chosen by llama.cpp at runtime; UMA nodes retain their combined host/GPU memory rules.

Intelligent Fabric​

When intelligent-fabric mode is enabled in the cluster configuration (intelligent_fabric.enabled), the fabric keeps a small resident model (the steward) placed as a hidden system instance. The steward investigates the cluster through a bounded tool surface and answers operator questions. Its read tools return evidence; its basic-action tools can only create inert, expiring proposals. Read-only questions remain available to ordinary clients, but the server exposes proposal-creation tools to the model only when the chat request has trusted-fabric or authenticated operator-gateway mutation authority. The model never receives a direct mutating tool, and a separately authenticated operator must approve the exact proposal before the master can dispatch it. steward remains the internal role and compatibility identifier, but operator surfaces present this cognition as Skulk itself rather than as a separate assistant or character.

Talking to Skulk: the virtual model​

Clients talk to Skulk through the standard OpenAI-compatible POST /v1/chat/completions endpoint using the reserved model id skulk/steward. Any OpenAI-compatible client works, streaming included; no steward-specific client code is required beyond the model id.

Semantics of the reserved id:

  • The server runs the steward's investigation loop (up to 8 tool calls per turn: cluster state, node resources, telemetry and data-plane diagnostics, version status, performance envelopes, named-node doctor results, the model catalog, and a search over Skulk's own bundled documentation, plus inert basic-action proposal tools) and answers from the evidence. get_node_diagnostics requires a friendly node_name and returns that node's complete diagnostic bundle; run_doctor also requires node_name and returns the selected node's bounded doctor findings. Both resolve only unique live friendly names and refuse missing or ambiguous targets rather than exposing node IDs.

  • Ordinary clients receive the same read tools and may ask diagnostic or advisory questions. The four proposal tools are included only for a direct trusted-fabric request or an authenticated operator-gateway request; this prevents public chat access from filling the bounded proposal queue.

  • The tool trace is returned as reasoning content: in streaming responses, each tool step arrives as a reasoning_content delta while the investigation runs, followed by the answer as content; non-streaming responses carry the trace in the message's reasoning_content field.

  • Every Steward turn obtains a fresh, bounded get_cluster_state tool result before any model generation, after client history and middleware context. The harness supplies the tool exchange itself; model tool selection cannot skip it. An unavailable or invalid baseline ends the turn with the normal chat error and no generated answer. This also applies to follow-ups, greetings, and both streaming and non-streaming clients. Additional investigation remains model-directed; the baseline guarantees evidence availability, not perfect interpretation.

  • Steward omits resident-model/service details from routine cluster summaries; explicit questions about the steward or internal services may include them. Its version tool returns actual per-node Skulk versions and commits, not just comparison status. Standalone version questions receive verified build listings with unknown/partial coverage preserved; matching builds do not establish release currency. The read-only get_capability_nodes tool projects current /state.capabilityNodes advertisements, owner status and bundle versions separately from hardware and inference backends. Standalone capability-inventory questions use these observations directly; no current advertisements does not prove nothing is installed, and discovery grants no execution authority. Capability-only hosts without identity telemetry receive safe fallback names and remain in this inventory without increasing the topology node count or becoming targets for node-diagnostic tools. Blank, unknown, none, or null build identifiers are missing observations, including when diagnostics returned successfully. These Steward views leave capability lifecycle and authorization unchanged.

  • Steward also projects immutable inventory observations before compaction, with API read time, explicit scope, and null counts for missing or malformed source sections. Read time is not telemetry freshness. A bounded set of standalone node-count and download-status questions (for example, “How many nodes do you currently have?” and “Are there any downloads in flight?”) receives a deterministic answer from those observations without model generation. Compound, per-model, action and other diagnostic requests continue through the model investigation. Counts describe topology transport peers and node-staging records, not physical hosts, capability nodes, Pods or model-store fetches. Queued, transferring and retained terminal downloads remain distinct; unavailable per-transfer timestamps prevent a claim that bytes are moving now. Exact counts survive detail compaction, which prioritizes active downloads over terminal history. Backend support is inferred only from advertised backend tags, never hardware vendor. This protects the supported inventory answers; it is not a general semantic validator for model-generated diagnostic prose.

  • Client-supplied tools are rejected with 400: the steward's tool surface belongs to the server.

  • Client system messages are ignored in favor of the steward's own system prompt; user and assistant turns form the conversation history, which the client owns and resends each turn (the server is stateless).

  • The steward always runs with thinking disabled, regardless of what the brain model supports. Requests to the reserved id cannot turn it back on; addressing the underlying card directly still gives you the model's normal reasoning behavior.

  • Requests to the id while intelligent-fabric mode is disabled return 404 with an explanatory message.

  • If the mode is enabled but the steward is not ready to answer (still being placed, still downloading its weights, still loading), the request is refused with 503 before any streaming begins, carrying a Retry-After header and a JSON body whose detail is the GET /v1/steward payload (enabled, present, ready, steward_model, instance_id, state) plus a human-readable message. Clients should back off and retry, or poll GET /v1/steward and show the state while they wait.

  • A steward that disappears in the window between that check and dispatch (a repair starting at exactly the wrong moment) still surfaces as an error chunk in the normal chat-completions error shape, because the response has already begun by then.

  • The underlying model card id (for example the registry's Qwen3.6-35B-A3B) remains addressable as an ordinary model and answers WITHOUT tools or cluster access: only the reserved id selects model-plus-harness.

The steward appears in GET /v1/models as an entry flagged with system_role: "steward" while the mode is enabled, so model pickers can recognize the fabric cognition without listing it as an ordinary model. Its operator-facing name is Skulk; clients should retain the system_role value only for discovery and compatibility.

Extensions on a steward turn​

If the serving node has an extension installed that provides chat middleware, its two hooks run on steward turns as well as on ordinary chat completions. A node with no such extension behaves exactly as described above.

The turn is presented to middleware in the same canonical form the ordinary chat path uses: the steward's system prompt as instructions, and the user and assistant history as input. Only those two channels are read back:

  • instructions becomes the turn's system message, so a middleware can augment (or replace) the steward's prompt. This is how, for example, an ambient-memory extension adds recollections from earlier conversations.
  • input becomes the conversation history, keeping only user and assistant messages with non-empty content.
  • Everything else a middleware returns is ignored. The model, sampling parameters, and tool surface belong to the steward, so a middleware cannot reroute the turn to another model or arm a different tool set.

If a transform leaves the turn without a trailing user message, the whole transform is discarded (prompt and history both) and the turn runs on the operator's original conversation, because a steward turn exists to answer an operator question. Whatever a middleware returns, the params handed to the response observer always describe the turn that actually ran: the reserved model, the filtered history, and the effective system prompt.

The response observer fires exactly once per steward turn, receiving the final answer. The investigation's individual tool steps and the steward's periodic liveness probe are not observed: they are internal machinery, not conversations. A middleware that raises is logged and skipped, and the steward answers as though no extension were installed. None of this changes the request or response wire format.

GET /v1/steward​

Returns steward availability. Clients use this to decide whether to show a steward surface at all.

Response fields:

  • enabled: whether intelligent-fabric mode is enabled in Settings.
  • present: whether a steward placement currently exists.
  • ready: whether every steward runner reports Ready or Running. Present but not ready means the model is still downloading or loading; clients should keep showing a preparing state and hold chat until ready.
  • steward_model: model card id of the steward brain when present, else null.
  • instance_id: the steward instance id when present, else null.
  • desired_model: the better brain currently being prepared, or the serving brain when no transition is active.
  • transition: controlled brain lifecycle: idle, prestaging, replacing, or repairing after the placement disappears.
  • progress: aggregate prestaging completion from 0 to 1 when byte totals are available, else null.
  • state: a one-word lifecycle summary derived from the fields above plus the liveness canary's history, for clients that want to render a single line instead of re-deriving the precedence rules. The booleans remain authoritative. Values:
    • disabled: intelligent-fabric mode is off.
    • downloading: a placement exists and the brain's weights are still being staged. This is the long first-run wait.
    • starting: the fabric is placing the steward, or it is placed and loading.
    • ready: serving, with no outstanding liveness failure.
    • degraded: serving, but the elected API node's liveness canary has at least one failed probe outstanding. The steward may still answer; three consecutive failures make the fabric replace the placement.

Note: deleting the steward instance through DELETE /instance/{instance_id} is refused with 409 while intelligent-fabric mode is enabled; disable the mode in Settings to remove the placement (the fabric then tears it down automatically).

GET /v1/steward/proposals​

Returns the bounded, newest-first audit of steward action proposals. This route uses the same trusted-fabric or authenticated operator-gateway authorization as operator mutations. It does not expose internal node IDs, instance IDs, command IDs, or embedded model-card payloads.

Each response item contains:

  • proposal_id, created_at, and expires_at;
  • action: place_model, stop_model, restart_model, or cancel_download;
  • a safe target label, rationale, bounded evidence, and expected_effect;
  • status: pending, approved, dispatched, rejected, expired, failed, or stale; and
  • optional decided_at (when the proposal left pending), safe actor class in decided_by, and outcome.

stale means the target the operator would be approving changed before anyone decided. The master rechecks every pending proposal on each planning pass (about every ten seconds) with the same checks approval runs, and marks one stale as soon as it no longer fits, with decided_by: "fabric_staleness" and an outcome that names what changed, for example "The instance changed after review: it now runs on kite2 instead of kite1." A proposal becomes stale when:

  • a stop or restart target was removed or replaced, now serves a different model, or changed its nodes, runners, layer split, context window, excluded nodes, or model card;
  • another approved stop or restart already owns the same instance;
  • a restart's model card is no longer the catalog's card;
  • a cancel-download's reviewed attempt finished, failed, or was replaced by a retry; or
  • a placement's model card changed or left the catalog.

A cancel-download whose attempt the master simply cannot see is not marked stale while it waits: live download progress is node telemetry, which a change of master clears until the nodes report again. Approving it is still refused, since cancelling nothing would not do what the operator reviewed.

Free capacity is not part of staleness: approving a placement recomputes it at that moment. stale is terminal; a still-needed action is proposed again against current state. A proposal already past its deadline is left to expiry, so expired and stale each keep one meaning.

Proposals created by the built-in harness expire after ten minutes. The master refuses already-expired proposals, proposals with a lifetime over fifteen minutes, automatically publishes expiry when the deadline passes, and refuses more than 32 simultaneously pending proposals. State targets a 128-record audit window by pruning the oldest completed terminal records; pending, approved, and dispatched records still inside their five-minute failover-recovery window are never pruned to make room.

The action set is intentionally narrow:

  • place_model revalidates exact authorized catalog truth and runs the normal placement planner. Normal placement also stages missing shards.
  • stop_model deletes the exact ordinary instance selected when proposed.
  • restart_model first tears down that exact ordinary instance, records approved, then re-places the captured intent only after replicated deletion and live capacity truth show that the old allocation has been released. It fails if replacement capacity does not become available within five minutes.
  • cancel_download cancels the exact model transfer attempt on the selected named node. Approval fails closed if that attempt finishes or is replaced by a retry, and the worker repeats the attempt-identity check when the command arrives so a later retry cannot be cancelled.

System-role instances are never eligible. Targets are resolved before proposal creation and revalidated by the elected master at approval, so stale or ambiguous proposals fail without mutation. A refusal at approval records failed with an outcome that names what changed, worded as for stale.

POST /v1/steward/proposals/{proposal_id}/decision​

Submits one explicit operator decision for a pending proposal. The path parameter is the proposal_id; the JSON body is:

{"approved": true}

approved: false rejects the proposal. This route requires trusted-fabric or authenticated operator-gateway authority. Decisions are single use. Missing proposals return 404; proposals already decided, expired, or stale in the local replicated view return 409 whose detail carries the status and, when present, the outcome, for example Steward proposal is already stale: The instance changed after review: its runners were replaced.

A successful response contains the proposal ID, the decision command ID, and an acceptance message. Acceptance means the decision entered the ordered command path. Clients should poll GET /v1/steward/proposals for the master-authoritative result. dispatched means the approved action was translated into and accepted by an existing typed placement, deletion, replacement, or download command; it does not claim that an asynchronous model start, stop, or download has already completed. For restart only, approved means the decision is durable and the planning loop will dispatch teardown before waiting for released capacity. Stop and restart download cleanup likewise waits for the replicated decision before it is forwarded. Restart also revalidates its captured model-card identity before teardown. For five minutes after the separate timestamp of any dispatched transition, a promoted master compares the proposal's exact command identity with replicated state and reissues a missing action effect once. Download cancellation uses an additional durable step: the replicated approved decision is indexed before dispatch is armed. The armed dispatched transition must then be indexed before a later planning pass forwards the attempt-bound cancellation.

Setting SKULK_FABRIC_CAPABILITIES_DISABLE=1 on the elected master is the global fail-closed kill switch. It converts an otherwise valid approval into failed without dispatching the proposed action, and a promoted master fails carried dispatch recovery rather than reissuing its effect. There are no autonomous approvals or per-action grants in this release: every proposal requires a separate operator decision.

Restart Recovery​

GET /v1/internal/restart-recovery/record​

Returns the record this node keeps so a cluster can come back after a single-node reboot or a whole-cluster restart. A master that starts with no surviving cluster state compares every node's record freshness (the RestartRecoveryAdvert telemetry reading: when the record was last confirmed current, how many placements it holds, and the port of the node's API) and fetches the freshest record from the node that holds it, trying the addresses in the node's replicated interface list and then the addresses its advert lists (so a node without a worker, which publishes no interface list, can still serve its record). Operators and clients normally have no reason to call it.

Authorization: loopback, a direct trusted-fabric peer (private LAN or CGNAT socket without proxy-forwarding headers), or the authenticated operator gateway. Because peers fetch each other over every link they share, it also admits a direct request from a link-local IPv4 or IPv6 peer (the self-assigned addresses a Thunderbolt-only cluster uses) or an IPv6 unique local peer, provided the request carries no Origin header and no proxy-forwarding headers, so no browser page can use that path. Anything else receives 403.

The response is:

  • nodeId: the node that answered, so a caller reaching a shared address can confirm it reached the node it meant;
  • record: the record, or null when the node has none. A record holds:
    • stamp: writtenAt (UTC, when the content was last confirmed current), plus the session and event index it was written in;
    • placements: ordinary placements as intent: modelId, sharding, instanceMeta, minNodes, requestedContextTokens, and the machines it ran on and the machines the operator excluded, as stable install IDs;
    • stewardProposals: the bounded steward proposal audit.

The record never holds live node IDs, runner IDs, credentials, or model data.

Progress and settings. GET /state carries restartRecoveryPending (true from a cold-started session's first event until restore finishes) and restartRecoveryPlacements (how many models the restore is bringing back, once the master has chosen its record; null outside a restore). The restart_recovery.enabled section of GET /config and PUT /config turns placement restore off (default on). Steward proposal history is restored either way, nodes keep recording what runs, and the setting applies to the next restart.

Download Management​

Start a node download​

POST /download/start

Lower-level endpoint for explicit node download control. It accepts a target node and shard metadata only from direct loopback or trusted-fabric callers (private LAN or CGNAT socket peers without proxy-forwarding headers; browser requests must also present an Origin on those trust classes or naming one of this node's own hostnames) or an authenticated operator gateway. The embedded model card must exactly match current authorized catalog truth apart from a snapshot-only publication stamp; unknown aliases return 404, and stale or forged content returns 409 without dispatching a download.

Body fieldMeaning
targetNodeIdNode that should stage this exact artifact.
shardMetadataServer-defined shard metadata containing the current authorized model card.

A successful response returns commandId after dispatch; it does not certify completed bytes. Inspect the node's download outcome in /state. Repeating this explicit request after a terminal failure starts a fresh attempt with a new attempt identity, retaining local files for the normal verifier/resume path. Active same-artifact downloads are not duplicated, and verified completed ones remain completed. If the failed task is still cleaning up, the new attempt waits for its existing ownership handoff. Offline and capacity checks still apply.

The target node must support the explicit-retry command; upgrade participating nodes before relying on this behavior. Periodic planner starts retain terminal failures, and ordinary placement recovery is a separate path. No retry requires calling the destructive delete endpoint.

Delete a node download​

DELETE /download/{node_id}/{model_id}

Path parameters select the target node and repository-form model ID; there is no request body. The response contains a command_id acknowledging dispatch, not confirmation that deletion has finished. Observe node download progress for the result.

This removes the model's ordinary default or staging cache, including flat or nested GGUF files. Read-only external search roots and canonical Model Store artifacts are protected even if an older download status labels them writable. Canonical artifact removal uses the Model Store lifecycle instead.

Model Store Endpoints​

These endpoints are available when the model store is configured.

If it is not configured, Skulk returns 503 Store not configured.

Store health​

GET /store/health

Use this to confirm whether the store is configured and reachable.

Store registry​

GET /store/registry

Use this to inspect which models the shared store knows about.

Each registry entry records nullable source_revision and source_repository metadata. Cache hits require the effective repository and revision to match, so an unchanged alias cannot reuse bytes from a different signed source.

For registry v2 cards, the nested installed card may also contain artifact_bundle: its exact repository-relative root and required-file manifest, immutable bundle identity, download size, and equivalent alternate locations. Bundle identity is part of installed-generation matching, allowing multiple card aliases from one repository and revision without a store-key collision. V1 cards omit this additive field and retain prior behavior.

Entries also include the full installed_card record, verification state, artifact role and owning card, current_registry_identity (the signed card the registry currently publishes for the alias, when one exists), installed_not_current (no current signed card, or the installed generation is not under it), update_available (a current signed card exists and the installed generation is not under it: an older signed card, a custom card, or a legacy record without a registry identity), active signed advisories, cached_on_nodes (identity, completeness, bytes, last use, in-use state, and location_kind), and reconciliation state plus last verification time. location_kind distinguishes canonical store_local availability from a node_cache copy. Companion artifacts are first-class entries grouped under their owning base card by the dashboard. An update is applied with POST /store/models/{model_id}/download naming current_registry_identity as registry_card_id: when the installed bundle is the signed card's bundle the store rewrites the sidecar and answers complete without transferring bytes, otherwise a download of the signed artifact starts.

Every node places a model the store holds with the store's card, whether the node has a copy of its own, a copy of another generation, or none. A node reads the store's registry once a minute and whenever its API lists models, so after an update the new card takes effect on each node within a minute. Until the store takes an update, the newer signed card stays an update on offer.

An installed-card schema-3 record recovered through the local preservation tool additionally carries preservation: exact owner manifest/card IDs, independently checked publication assurance, original SHA-256 file coverage and the receiver's separate repository-code observation. These fields are evidence, not another receiver's trust enrollment or permission. Legacy schema-1/2 records omit this field. See Offline model recovery for admission rules; the store registry read endpoint does not import or authorize bundles.

The top-level cache_inventory reports observed_nodes, expected_nodes, and a coverage state. Its additive store_nodes list identifies live nodes currently advertising the canonical-store role, including when a legacy entry has not yet resolved to an exact installed identity:

  • syncing: at least one newly live node has not published its first inventory.
  • current: every live node has a fresh, complete reading.
  • degraded: known locations are partial because a reading is stale, missing after convergence, or truncated by the fixed telemetry bound.
  • unavailable: no usable node inventory exists.

Canonical store entries are not copied into telemetry. Store hosts publish only their role. Each API synthesizes exact store_local entries when an installed identity is available; clients can combine store_nodes with canonical store truth for unresolved legacy entries without weakening identity verification. Other cache locations come from compact, last-write-wins node telemetry. Stale known locations remain visible while the top-level state is degraded; callers must not treat this operator/read projection as transfer authorization. Reconciliation continues to query GET /store/storage directly and verifies the exact installed identity and manifest before import or export.

The response is {"entries": [...], "cache_inventory": {...}} and is fully described as StoreRegistryResponse in generated OpenAPI.

The dashboard combines registry results with GET /v1/models metadata so it can display derived tags such as vision, thinking, embedding, tensor, and optiq in the Store list.

GET /registry (internal model-store transport port)

Returns the authoritative store index consumed by Skulk nodes. The optional recover_installed_cards=true query first rebuilds installed-card associations from complete local sidecars and trusted catalog cards. Every entry is emitted with JSON-native values; in particular, the nested installed card's captured_at value is an ISO 8601 UTC string rather than a native datetime. This endpoint is cluster-internal transport; operators and dashboards should use the enriched public GET /store/registry endpoint above.

Store downloads​

GET /store/downloads

Use this to inspect shared-store download activity. The listing carries pending, in-progress, and failed downloads; each failed entry keeps an actionable error explanation (for example how to authenticate for a gated Hugging Face repository) and stays listed until a retry replaces it or the store host restarts. Cancelled downloads are not listed.

Request a store download​

POST /store/models/{model_id}/download

Use this when you want the store host to fetch and register a model.

When no model store is configured, the endpoint downloads the model onto the node that answered instead, the same whole-model download a launch starts, and returns status: downloading with destination: node (a store transfer reports destination: store). That fallback needs the operator access a direct node download needs (403 otherwise) and serves only a catalog model's base artifact at its card's own pins: a companion artifact role, extra GGUF files, an artifact bundle, repository or owner override, or a file, revision or card that differs from the catalog card answers 409 with how to turn the store on.

The response reports the store's current transfer state. A store-host rejection (for example an immutable-card conflict or a capacity limit) is reported in the same 200 response with status set to error and the store's operator-readable reason in error; callers must check the body's status rather than treating any 200 as an accepted transfer.

One such rejection is recoverable by reading model truth again. While the store holds the current signed card for an alias, it refuses a base request that names another signed card, with the reason "the model store already holds the current signed card for <model>; refresh model truth and retry". The store adopts the card a request names for bytes it already holds, and a node reads the store up to a minute late, so without the refusal a launch made just after an update would put the older card back. This differs from "store host cannot verify the requested registry card", which means the store host does not know the named card at all. In both cases the caller reads GET /store/registry or GET /v1/models again and retries with the card the store holds.

For signed-registry artifacts, Skulk's internal request also carries the immutable card ID. The store host verifies that identity against its own signed catalog and applies the synchronized cluster repository-code decision before fetching bytes. A v2 card makes the signed bundle manifest authoritative: only its required files are fetched, directory layout is preserved, and every declared size and available upstream object identity is verified. Trust does not depend on which node initiated the request.

When registry_card_id names a signed card for an alias that a custom card overrides, the API also retires that custom card once the store has adopted the signed generation: immediately for a byte-free adoption, otherwise when the download completes (a failed or cancelled download leaves it). Before retiring, the API confirms the store's installed record names the signed card as registry-verified, so a store that restarted mid-download and reports the alias complete from its older generation retires nothing. Only the exact custom card present before the store was asked is retired: the deletion carries that card and the master refuses it when the catalog card has changed by the time it orders, so a custom card replaced during the download stays. The retirement is the same replicated deletion as DELETE /models/custom/{model_id} and requires the same operator-mutation authority; a caller without it still gets the download and the override stays until an operator deletes it. An API restart during the download forgets the pending retirement; requesting the update again after the download has completed retires the override without a transfer.

The optional JSON body accepts the following fields:

  • gguf_file: non-empty repo-relative GGUF path selecting the base or companion quant.
  • extra_gguf_files: list of non-empty repo-relative GGUF paths to co-fetch from the same repository, such as a same-repo served draft.
  • source_revision: full 40-character immutable Hugging Face commit.
  • source_repository: upstream owner/repository containing the bytes when the store entry's model_id is an alias; identifiers longer than 512 characters are rejected.
  • registry_card_id: immutable card_<content-derived-id> selecting the signed base-card generation.
  • artifact_bundle_id: immutable bundle_<content-derived-id> selecting the exact v2 file bundle. Automated pre-publication qualification uses this pin so an alias replacement cannot redirect the download.
  • owner_model_id: owning base-model alias for a companion artifact. It is required for non-base roles and must be an owner/model identifier no longer than 512 characters.
  • owner_registry_card_id: immutable signed identity of that owning base card. Omit it only for installed or custom owner cards without a registry identity.
  • artifact_role: one of base, vision_weights, mtp_sidecar, assistant, served_draft, vllm_draft, video_companion (a video card's externally hosted companion, such as guide preprocessor weights), image_component (an image card's external component repository/revision group), or music_component (a native music card's external encoder/autoencoder source group); defaults to base.

A complete companion request names the companion repository and immutable revision, its role, and its owning card:

{
"gguf_file": "draft.gguf",
"extra_gguf_files": [],
"source_revision": "0123456789abcdef0123456789abcdef01234567",
"source_repository": "owner/draft-repository",
"owner_model_id": "owner/base-model-alias",
"owner_registry_card_id": "card_<content-derived-id>",
"artifact_role": "served_draft"
}

gguf_file pins which quant the store fetches for a multi-quant GGUF repo (that file's shard group plus config.json). source_revision pins all repository reads to a full immutable Hugging Face commit. When either value is omitted and a curated model card declares it, the endpoint uses the card value. Otherwise, omitting source_revision follows mutable main. A GGUF pin naming a file not present in the selected revision falls back to the default at the store protocol layer; the /models/add card-building endpoint validates exact pins before requesting a download.

When registry_card_id is omitted, Skulk selects the current card when one exists. A Hugging Face search result absent from the catalog may still be downloaded with no card ID; the store records it as unverified rather than claiming signed registry provenance. Supplying registry_card_id requests that exact immutable generation and returns 409 Conflict when the store host cannot verify it. Supplying artifact_bundle_id additionally requires both the API node and the canonical store to resolve that exact bundle for the alias. A changed, missing, or legacy bundle returns 409 Conflict instead of downloading different bytes. Companion requests instead bind owner_registry_card_id to owner_model_id and require the repository, revision, selected file, and artifact_role to match that owning card's signed companion declaration. A mismatched alias, role, or artifact selection returns 409 Conflict; malformed identifiers and roles return 400 Bad Request.

For a typed image card, the store derives the exact component selection from its independently verified complete card. The base transaction includes every primary-repository component, including the VAE. An image_component request omits gguf_file and selects every declared file in its pinned external source group, including both text and vision encoders when declared. The store HTTP download endpoint accepts this role and verifies its owning card before starting the component transfer; an undeclared source revision returns 409. Missing files, listing-size conflicts, or failed object verification fail the transaction; unrelated quants and projectors are excluded. A cached base GGUF alone does not mark the group complete: missing components trigger recovery.

For a native music card, a base Download also acquires every required external source before returning a complete transfer state. A music_component request names its owner and exact source revision, omits gguf_file, and selects all declared encoder/autoencoder files at that source. The store verifies both the role and revision against the owning card; mismatches return 409. Shared sources transfer once. Missing files, incorrect sizes or object pins fail the request. Completed source groups remain reusable after cancellation of the base request; an incomplete base is never reported complete. Offline reuse requires all source records and files. This operation downloads model data, not an engine package, and does not mount or advertise native music execution capacity.

Native music_component path aliases are skulk-native/<digest>, derived from the exact repository, immutable revision and complete grouped bundle identity; source_repository still names the upstream repository. A mismatched alias is rejected with 409. Existing repository-only aliases remain accepted for legacy caches, with the same complete-selection checks. Shared data reuse does not replace another owner's installed card or transfer its execution permissions. Different selections have independent active transfers and cache generations. An already completed native Download rechecks the exact owning card and every required source before repeating success; lost files cause repair online or an actionable offline failure. A deleted source alias is not resurrected through a legacy-cache fallback. Failed or cancelled replacements retain the previously registered complete generation. Completed native store-cache reuse verifies retained digests and original object pins before accepting success. A native source's retained owner_model_id is historical provenance: deleting that base model preserves other models' shared source discovery and preservation. Deleting the source alias itself still suppresses automatic recovery and peer import. Cache verification waits for the publication fence and hashes outside the short download-admission lock, then rechecks the selected status before returning. Unrelated admission and active-transfer cancellation remain available. Cancelled verification drains its file thread before releasing that fence. Pinned existing files are checked against their original object identity during download reuse: online retries replace corrupt bytes; offline reuse refuses them. Cancellation settles queued downloads even before their transfer coroutine starts.

The response reports modelId, nullable sourceRevision, status, and progress; transport or store rejection additionally reports error. The generated StoreDownloadResponse schema describes this wire contract.

Reconciliation status​

GET /store/reconciliation

Returns state, inventory_only, scanned node and discovered/imported artifact counts, pending identities, failures, and last_verified_at. Automatic imports are enabled by default (inventory_only: false); inventory-only is an optional production rollout mode rather than a prerequisite. If cluster configuration removes or disables the local store or automatic reconciliation, the lifetime task becomes idle and checks for restored eligibility every ten seconds. It resumes automatic scans when this node becomes an enabled store host again, without restarting the API. An already running pass keeps its original interval before the next eligibility check.

POST /store/reconciliation/rescan

Runs one immediate retry. This mutation accepts only a loopback socket peer, rejects proxy forwarding headers, and requires a loopback browser origin when an Origin header is present.

Internal cache export​

POST /store/internal/exports

Creates a random short-lived capability bound to one installed identity, manifest digest, target store node, byte ceiling, and expiry. The caller's socket address must also match an advertised interface of the claimed store node; the node-id field and header are not accepted as self-asserted identity. Finding the artifact runs the same inventory as GET /store/storage, with the same side effect: a recognized legacy directory gets its card record and joins the live catalog.

GET /store/internal/exports/{capability_token}/{relative_path}

Serves only paths in the granted manifest, requires the bound target-node header, rejects files changed after capability issuance, supports HTTP byte ranges for restart recovery, and enforces the capability's cumulative byte ceiling across requests. These endpoints are internal reconciliation transport, not a public model-download API.

POST /imports (internal model-store transport port)

Asks the authoritative store to pull and atomically publish one artifact from a node cache. This endpoint is internal reconciliation transport and accepts only a direct loopback socket peer with no proxy-forwarding headers (X-Forwarded-*, Forwarded, X-Real-IP) and no browser cross-origin headers (Origin, Sec-Fetch-Site); remote, forwarded, or browser-originated callers receive 403. Requests must send Content-Type: application/json (415 otherwise). The JSON body contains:

  • record: the complete versioned InstalledCardRecord, including its full card and canonical file manifest.
  • source_base_url: the selected source node's internal export URL, whose resolved addresses must all belong to loopback or trusted-fabric networks (redirects and proxy overrides are disabled).
  • capability_token: the short-lived token issued by that source for this manifest and target store node.
  • target_node_id: the store node identity bound into the capability.

The store resumes individual files with HTTP ranges, enforces its capacity floor, verifies every size and SHA-256 digest, writes the installed-card sidecar, and publishes the new generation and rebuildable registry entry only after complete verification. A peer record claiming registry_verified is also rebound to the store host's independently TUF-verified card: its full immutable card payload, alias, repository, revision, selected file, artifact role, and companion ownership must agree before any transfer starts, and a non-registry_verified peer import cannot overwrite an existing registry_verified canonical store entry. A successful response is the resulting store registry entry. Malformed records or missing fields return 400; invalid or expired capabilities, unsafe manifest paths, untrusted source_base_url targets, insufficient capacity, source loss, digest mismatch, or signed card disagreement fail the import without replacing the active generation. Operators do not call this endpoint directly; the reconciler uses it after POST /store/internal/exports grants a transfer.

Store download status​

GET /store/models/{model_id}/download/status

Pass the complete model ID; no body is required. Returns store progress as modelId, sourceRevision, status, progress, and error. With no matching store response, the public adapter returns {"status": "not_found"}; a transport failure returns {"status": "error", "error": "..."}. Inspect the JSON status even after HTTP success. An unconfigured store returns HTTP 503.

Cancel a store download​

DELETE /store/models/{model_id}/download

Cancels one pending or active canonical-store download. Partial files remain in the store staging directory so a later request can resume instead of starting over. Repeating cancellation for an already-cancelled transfer succeeds. The endpoint returns 409 when no cancellable transfer exists.

Delete a model from the store​

DELETE /store/models/{model_id}

Removes the model from the store host (registry + disk) and broadcasts a cluster-wide eviction so every node also drops its locally-staged copy, freeing disk fleet-wide instead of leaving worker copies until they age out under staging pressure. Returns 404 if the model is not registered in the store. (To clear staged copies without deleting the store copy, use POST /store/purge-staging.)

Before deleting bytes, the store durably tombstones the alias against automatic reconciliation. A stale node cache that missed eviction remains visible in cached_on_nodes but cannot recreate the base artifact or its owned companions. The tombstone survives restarts and is cleared only after a later explicit store download for that alias completes successfully.

Purge staging caches​

POST /store/purge-staging

Use this to remove staged model artifacts from nodes without deleting the store copy itself. Each artifact directory is removed as one unit, so its model bytes, installed-card sidecar, revision markers, and last-use marker are evicted together. The optional JSON body accepts modelId to restrict the purge to one model; omit it for a general purge. The response acknowledges commandId and message; it does not prove every node has finished eviction.

Start optimization​

POST /store/models/{model_id}/optimize

Starts an OptiQ mixed-precision optimization for the path-selected stored model. An optional JSON body sets target_bpw (default 4.5) and candidate_bits (default [4, 8]). Returns modelId, status: "started", and targetBpw. Unavailable optimization returns 503; a conflicting optimization returns 409.

GET /store/models/{model_id}/optimize/status takes the same model ID and no body. Poll for status, progress, message, resultPath, achievedBpw, estimatedSizeMb, and error. No known job returns 404; an unavailable optimizer returns 503. A started job is not a completed or placed model.

Internal store transport​

The store host also runs a separate HTTP transport on store_port (default 12415). These paths belong to that listener, not the dashboard/API port and not its generated OpenAPI document. Workers and the store client use them for artifact transfer. Applications should use the public /store/... routes above. Keep the internal listener within the trusted cluster network; it does not provide paired-operator authentication. Mutating internal store routes (POST /models/{model_id}/download, DELETE /models/{model_id}/download, DELETE /models/{model_id}, and POST /imports) reject proxy-forwarding headers (X-Forwarded-*, Forwarded, X-Real-IP) and browser cross-origin headers (Origin, Sec-Fetch-Site) with 403. The import route additionally requires a direct loopback peer (403) and Content-Type: application/json (415).

For these internal paths, encode the complete repository-style model_id as one URL component (org%2Fmodel). The server also supplies HEAD counterparts for its GET routes.

Method and pathParameters and behavior
GET /healthNo parameters. Returns store path and disk free_bytes, total_bytes, and used_bytes.
GET /registryOptional recover_installed_cards=true rebuilds installed-card observations before returning the full entry list. This recovery option performs work; ordinary reads do not request it.
GET /modelsNo parameters. Returns the model-ID list present in the store.
GET /models/{model_id}/filesOptional source_revision must be a full 40-character commit. Returns relative file names after revision and artifact-completeness checks; unavailable or incomplete models return 404.
GET /models/{model_id}/{path}Relative artifact path, optional source_revision, and optional single Range: bytes=start-end header. Returns raw bytes (200) or a bounded range (206); invalid ranges return 400 or 416, missing files 404, and paths escaping the model directory 400.
POST /models/{model_id}/downloadOptional JSON fields gguf_file, extra_gguf_files, source_revision, source_repository, registry_card_id, artifact_bundle_id, artifact_role, owner_model_id, and owner_registry_card_id carry the exact artifact/companion selection described under public store downloads. Starts or observes the store transfer; completion is separate. A base request naming a signed card other than the registry's current one answers 409 while the store holds that current card; the caller reads the store's registry again before it retries. An explicit registry_card_id the store host cannot verify also answers 409.
GET /models/{model_id}/download/statusModel ID only. Returns modelId, sourceRevision, status, progress, and error; an unknown transfer returns 404.
DELETE /models/{model_id}/downloadModel ID only. Cancels the transfer and returns progress plus cancelled: true; no cancellable transfer returns 409. Partial files remain resumable.
GET /downloadsNo parameters. Returns pending, active, and failed transfers, including progress and actionable errors.
DELETE /models/{model_id}Model ID only. Removes the stored model and returns modelId and deleted: true; an absent model returns 404.
POST /importsLoopback-only JSON record, source_base_url, capability_token, and target_node_id. Uses the capability-bound import and verification contract under Internal cache export.

Models​

Model cards identify artifacts and compatible engines. Qualification records are scoped evidence, not hardware eligibility lists. Placement previews resolve the actual engine/cache configuration and expose memory_estimate_notes for storage, workspace and conservative unknown-layout assumptions. Their instances carry per-shard memorySettings; node resources expose engineMemorySettings. Weight and cache quantization are independent. The worker rejects settings drift before load so its guard, reservations and context sizing agree with placement. A memory refusal applies to the assessed configuration and workload, not permanent model/ hardware compatibility. See the compatibility contract.

List models​

GET /v1/models

Returns the known model catalog, including downloaded models and catalog-backed entries. Each item includes nullable source_revision metadata identifying the qualified Hugging Face commit when its card pins immutable artifacts.

When an alias has an active installed generation, artifact, capability, runtime, trust, and registry_card_id fields describe that retained full card. The separate current_registry_identity and update_available fields describe a newer signed catalog generation without pretending it is already active.

When a registry-verified installed generation's identity matches the signed catalog's immutable card ID, current verified catalog metadata takes precedence over the retained sidecar: architecture, capability claims, snapshot, and runtime projections can refresh without reinstalling weights. Installed identity and verification remain those of the retained generation. Custom overrides and different card IDs do not inherit another artifact's metadata.

Important fields:

FieldTypeMeaning
idstringCanonical model ID
capabilitiesarrayFunctional capabilities such as text, vision, thinking, code, embedding, tts, or stt
tagsarrayUI-friendly derived labels such as vision, thinking, embedding, tts, stt, tensor, and optiq
supports_tensorbooleanWhether tensor parallel launch is supported
base_modelstringBase family or upstream source model when known
artifact_repositorystringUpstream repository containing the artifact bytes; may differ from id when several exact files or quants share one repository
artifact_filestring or nullExact selected file for file-addressed artifacts such as GGUF
catalog_sourcestringregistry (signed registry card), installed (a card recorded with an installed model that carries no registry identity; omitted on the operator relay listener for compatibility with released mobile clients), bundled (a built-in virtual service or delegated capability descriptor, without claiming installed model weights), or custom (operator-added card)
registry_card_idstring or nullImmutable content-derived identity of the active installed card, or the effective catalog card when not installed
registry_snapshot_idstring or nullSigned catalog snapshot that supplied the card
registry_provenancestring or nullAudited signed-registry origin (foxlight, agent, or community); null for installed and custom entries
installedbooleanWhether the authoritative cluster store has a complete active generation, falling back to the API node's local sidecar when the store has no record
active_installed_identitystring or nullDurable identity of that cluster-store generation, or the node-local fallback generation
installed_verificationstring or nullregistry_verified, local_legacy, custom, or unresolved
current_registry_identitystring or nullCurrent signed identity for the alias, which may differ from the active install
update_availablebooleanA newer signed generation exists but is not active until transfer commits
advisoriesarrayActive signed warn-only security notices affecting the installed or current card
remote_code_approval_requiredbooleanDeprecated compatibility field; current cards return false because publication, explicit addition, or the earlier Skulk release that shipped an installed card is the authorization boundary
remote_code_trust_identitystring or nullDeprecated identity from the retired secondary approval ceremony; current cards return null
remote_code_approved_for_clusterbooleanDeprecated compatibility state; current cards return false
remote_code_approved_on_this_nodebooleanDeprecated compatibility alias for remote_code_approved_for_cluster
remote_code_automatically_trustedbooleanWhether repository code is authorized by signed publication, explicit addition, or the earlier Skulk release that shipped an installed card, for this exact card
audioobjectDeclared speech metadata from the model card, including kind, audio response formats, streaming/realtime flags, built-in voices, default_voice, voice/reference-audio flags, translation support, and sample rates
musicobject or nullIntrinsic music family, lyric requirement, declared duration bounds and WAV output format; native ACE base additionally has native variant, editing_modes, part_classes, sample_rate, and audio_channels. Metadata does not imply ready execution capacity. Null for non-music cards.
imageobject or nullNative image family, immutable components, optional SDXL unetStructure, default canvas/steps/guidance, dimension and area limits, reference-image limit, alpha support and optional fixed sigma schedule; null for legacy or non-image cards
videoobject or nullDeclared video generation contract from a video model card: modes (t2va, fl2va, ref2va), min_seconds/max_seconds, fps, frame grid (frame_grid_multiple, frame_grid_offset), canvas_multiple, default_short_edge, max_pixels, aspect_ratios, audio_output with audio_sample_rate/audio_channels, default_steps, reference_limits, adapters (named LoRAs with modes, steps, strength, and the video_shift/audio_shift a render with the adapter uses when the request sets none, selectable through the video job lora field), styles (the card's style embeddings with modes, selectable through the video job styles field), and every engine setting the job accepts with its default: samplers and default_sampler, schedulers and default_scheduler, the card's trained video_shift/audio_shift (null keeps the model's built-in value) with shift_bounds, reference_fidelities and default_reference_fidelity (empty and null unless the card serves ref2va), codecs and default_codec, guides (each guide the card derives from a control clip: kind, the modes it applies to, and the preprocessor weights it loads with their repository and license; empty without a ControlNet), default_guide (the guide a control clip gives when control_kind is omitted), and the ControlNet's own settings: control_strength_bounds, default_control_strength (the card's ControlNet's strength, else 1; null without a ControlNet), and default_control_window (the control_start/control_end a render takes when omitted). The lists are the engine's own, not a recommendation. Null for non-video cards
licenseobject or nullOperator-facing license facts from the card: name, url, spdx_id, notice, and display_name (a product name the license requires in a UI). Informational; nothing is enforced
resolved_capabilities.supports_speech_synthesisbooleanWhether clients should treat the model as a text-to-speech model
resolved_capabilities.supports_transcriptionbooleanWhether clients should treat the model as a speech-to-text model
resolved_capabilities.supports_speech_translationbooleanWhether clients should treat the model as supporting speech translation
resolved_capabilities.supports_audio_outputbooleanWhether the model produces audio output
resolved_capabilities.supports_realtime_audiobooleanWhether the model declares realtime audio support
resolved_capabilities.audio_response_formatsarrayEncoded audio formats the model can produce for speech synthesis
runtime.mtp_sidecar_repostringRepo of this model's MTP sidecar (prediction heads), when it declares one
runtime.mtp_sidecar_revisionstringImmutable commit of a separately hosted MTP sidecar
runtime.assistant_model_repostringRepo of this model's speculative-decoding assistant (drafter), when it declares one
runtime.assistant_model_revisionstringImmutable commit of a separately hosted assistant model
runtime.served_spec_draft_repostringRepo of this model's separate served-engine draft GGUF, when it declares one
runtime.served_spec_draft_revisionstringImmutable commit of a separately hosted served-engine draft
runtime.vllm_spec_draft_repostringRepo of this model's separate vLLM drafter, when it declares one
runtime.vllm_spec_draft_revisionstringImmutable commit of a separately hosted vLLM drafter

The dashboard uses tags for compact badges and capabilities for filtering and richer tooltips. The audio and resolved_capabilities.*speech* fields identify speech-capable models; supports_speech_synthesis models can serve non-streaming /v1/audio/speech when mounted, and supports_transcription models can serve non-streaming /v1/audio/transcriptions. The chat dashboard uses the same metadata to show TTS playback and STT microphone controls only for ready mounted speech models. Browser microphone capture is a browser security feature, so STT recording controls require a secure origin such as HTTPS or localhost even though the API endpoint itself is ordinary multipart HTTP. Speech translation metadata remains reserved for later audio endpoints. The four runtime.*_repo fields name a model's speculative-decoding companions (a draft model or an MTP-head sidecar). Those companion repos are downloaded and loaded automatically with their parent and are not independently placeable, so the dashboard marks any store entry matching one of these repos as a companion (a "Drafter" or "Sidecar" badge) rather than offering it launch, placement, or optimize actions. For signed cards, every separately hosted companion has a matching full commit revision; companions stored in the base artifact repository inherit the base card's source_revision.

Configuration Endpoints​

Get config​

GET /config

Returns the current cluster config and config path. Sensitive values (hf_token) are stripped from the response.

The response also carries an effective block describing runtime-resolved values that are not part of the persisted file:

  • kv_cache_backend: the KV cache backend actually in effect (config value or SKULK_KV_CACHE_BACKEND override)
  • has_hf_token: whether a HuggingFace token is configured (via the file or HF_TOKEN), without exposing the token
  • experimental_mode_enabled: whether this node runs with SKULK_ENABLE_EXPERIMENTAL_MODE set; when a release carries active experiments, the dashboard uses it to reveal the gated Experiments settings section
  • model_store_defaults: the store a fresh node starts with: store_host (this node's short hostname), store_port (12415), store_http_host (127.0.0.1) and store_path (model-store in Skulk's data folder). Settings fills a switched-on store's blank fields from these values

The persisted experiments section is deprecated compatibility surface: every speech feature that incubated there has graduated to standard, and no built-in experiment is currently active. The fields remain accepted (the strict config would otherwise refuse an existing skulk.yaml that carries them) but are all ignored:

  • experiments.tts_streaming: deprecated compatibility field. Stable TTS streaming ignores this value and follows mounted model capability metadata.
  • experiments.stt_realtime: deprecated compatibility field. It remains accepted in existing configuration but is ignored; realtime STT is selected from card truth, reachable transport, and ready mounted capacity.
  • experiments.speech_translation: deprecated compatibility field. Speech translation is a standard capability; /v1/audio/translations serves for any mounted card declaring audio.supports_translation = true, and this value is accepted but ignored.

The optional model_trust.approved_remote_code_identities list is deprecated compatibility state from the retired secondary repository-code approval ceremony. Strict config parsing still accepts and preserves the values during rolling upgrades, but current placement, store, and runner paths do not consult them. The dashboard no longer presents a Model trust editor.

Update config​

PUT /config

Accepts a JSON configuration object directly, or wrapped as {"config": {...}}. This is a replacement-style update with the preservation exceptions below; send the full desired configuration rather than assuming every omitted field is retained. All PUT /config mutations enforce operator-mutation authorization: direct loopback or trusted-fabric requests (without proxy-forwarding or cross-origin browser headers) are accepted, while public, reverse-proxied, or cross-origin browser requests require authenticated operator-gateway credentials and otherwise return 403. Invalid configuration returns 422. Important behavior:

  • if you omit hf_token, Skulk preserves the existing value
  • if you omit logging, Skulk preserves the existing logging config
  • if you omit experiments, Skulk preserves the existing experiment toggles
  • if you omit model_trust, Skulk preserves the deprecated compatibility state during rolling upgrades
  • an enabled model_store with a blank store_host or store_path takes this node's model_store_defaults instead of failing; a blank host also takes the loopback store_http_host. Named values, and a disabled store, are saved as sent
  • model_trust cannot be replaced through PUT /config; authenticated operators receive 409 because the current API has no secondary model-trust ceremony
  • hf_token propagates over the PSK-encrypted cluster fabric: a token entered in any node's Settings converges onto every node, including the model store host that actually fetches from Hugging Face. A broadcast carrying no token (or a blank one) never erases a receiving node's existing local token; every write remains atomic and owner-only (mode 0o600), and GET /config still never returns the token
  • logging changes (enable/disable) take effect immediately on all nodes
  • inference changes affect future launches
  • historical model-trust commands and state remain wire-compatible but have no effect on current authorization
  • model-store location changes generally require restart

Filesystem browse​

GET /filesystem/browse

Query parameter path defaults to /Volumes. Returns the resolved path and sorted, non-hidden child directories, each with name and path. Only directories beneath /Volumes, /home, /mnt, /tmp, and /opt are allowed; symlinks are resolved before checking. A non-directory or path outside those roots returns 400, and insufficient filesystem permissions return 403. This lists directories for configuration pickers; it does not read files.

Node identity​

GET /node/identity

Takes no parameters. Returns nodeId, hostname, and ipAddress. The address is a preferred non-loopback IPv4 interface when available, otherwise the hostname.

GET /node_id is the minimal companion route: it returns only this node's ID (the same value /node/identity reports, without the hostname and IP fields). Node IDs are per-session and change when the process restarts.

Restart a node​

POST /admin/restart?node_install_id=<stable id>

Gracefully restart the Skulk process on this or a remote node. Operator clients should pass the stable UUIDv4 node_install_id published under GET /state → nodeIdentities[*].nodeInstallId. Skulk resolves that identity against current live telemetry immediately before dispatch, so a process restart cannot leave the client targeting an expired libp2p session. A missing stable target returns HTTP 404; an ambiguous target returns HTTP 409.

Legacy local clients may continue to pass the session-scoped node_id=<runtime id>. Supplying both target forms returns HTTP 400. Omitting both restarts the API node itself. A local target replaces the current process image in-place via os.execv (same PID); a remote target sends the existing RestartNode command via pub/sub.

  • GPU/Metal memory is released when the process image is replaced
  • the node rejoins the cluster automatically on startup
  • active inference is interrupted

Returns {"status": "restarting", "node_id": "...", "node_install_id": "..."} for stable local targets, or the corresponding "restart_sent" status for stable remote targets. Legacy session-targeted responses retain their existing shape without node_install_id. If a local restart is already scheduled, returns HTTP 409 with {"status": "restart_already_pending"}.

Onboarding status​

GET /onboarding

Returns whether the dashboard onboarding flow has been completed on this node:

{"completed": false}

POST /onboarding

Marks the local onboarding flow as complete and returns {"completed": true}. The request takes no body. The flag is a node-local marker file, not cluster state: each node tracks its own onboarding status, and the dashboard uses it to decide whether to show the first-run setup flow.

curl http://localhost:52415/onboarding
curl -X POST http://localhost:52415/onboarding

State, Events, and Tracing​

Cluster state​

GET /state

Returns the cluster state as Skulk currently sees it.

instanceFailures is a newest-first, event-sourced history of the 64 most recent terminal placement failures. Each entry includes the vanished instanceId, modelId, optional systemRole, stable errorCode, bounded operator-safe errorMessage, assigned affectedNodeIds, and UTC recordedAt. Ordinary instance, model, and assigned-node identifiers remain unchanged; an identifier exceeding 256 UTF-8 bytes is represented as a stable sha256:<digest> reference. The assigned-node list retains at most 64 entries and rejects non-string values during strict replay, so hostile explicit placement input cannot inflate replicated state and corrupted snapshots cannot invent authoritative identities. Skulk records the entry before removing the failed instance, so operators can distinguish a runner crash, unresponsive or wedged runner, trust rejection, unrecoverable placement, or lost node from a clean operator stop. Prompt and generated-response content never enters this history. Replacing the same model creates a new instance identity and does not erase the earlier failure.

The response also carries a derived nodeHealth map (keyed by node id) so a problem on a node is visible rather than silent. Each entry is a level (ok, warn, or error) plus a list of reasons, where each reason has a code, a message describing what is wrong, and a remediation describing how to fix it. It is computed read-only from state already in the response (terminal download failures, low or full models-volume disk, and late liveness signals), so it adds no new polling. Liveness uses the freshest of the dedicated telemetry heartbeat, ordinary telemetry fallback, and lastSeen. The lastSeen response field is only the last indexed control-plane event and may be stale for a healthy node; it must not be interpreted as a heartbeat. A node with no problems reports level: "ok" with an empty reasons list.

When known live node identities report different Skulk package versions or source commits, every topology entry receives the warning-level version_mismatch reason. This marks a staggered deployment as degraded until all nodes converge. Operational visibility remains available, but events, commands, state, and inference are not cross-version-compatible; finish the deployment before starting new inference work.

nodeResources[node_id].engineMemorySettings maps engine names to observed cache controls: cacheBackend, keyBits, valueBits, groupSize, fp16EdgeLayers, and nullable configurationError. These are runtime observations, not a request to enable compression. Placement captures them on shard memorySettings; the worker verifies them before allocation. Invalid active cache controls affect that engine configuration and leave unrelated engines available. Missing geometry or an unknown cache layout remains visibly uncertain or uses the shared conservative budget. Stored artifact sizes already reflect weight quantization; they do not determine cache precision.

The response also carries a capabilityNodes map (keyed by host node id) describing the managed capability nodes each live host runs: extension-owned children such as an installed plugin bundle with its own user interface. Each entry is a bounded, credential-free summary: pluginId, nodeId, bundleId, version, optional title, owner-reported status (installed, starting, ready, degraded, disabled, configuration_invalid, or failed), ownerAvailable, operationsActive, surfaces (at most four; today every surface is kind: "link" with an absolute url and a ready flag), actions (at most eight surface, link, or descriptor entries; a descriptor action carries the capabilityId and a fixed payload for POST /v1/capabilities/call on that host), and observedAt, the local receipt time of the host's last reading. The summaries ride the telemetry plane; a host that stops publishing ages out with its other readings, and a host whose last reading is older than ninety seconds (three republish intervals) is dropped from the map, which also covers a peer that missed the host's withdrawal reading. The dashboard mutes a satellite at the same age. The dashboard draws each summary as a satellite of its host in the topology and opens its surfaces from a flyout. Hosts with no capability nodes are absent from the map.

On the experimental native host, a declared management proxy also becomes a kind: "link" opening action after its owner supplies an answering, isolated loopback facade. The URL belongs to the owner host and is intended for a browser on that host. It carries no credential and does not disclose the child's private listener port. Native health withdrawal, process retirement or owner shutdown withdraws that origin and its active connections. Application scripts are served on the separate facade origin, never below the Core dashboard origin; opening a management page grants no inference permission or remote operator delegation.

The response carries a live nodeResources map as well. Each node entry includes its placement backends, declared participation, apiAvailable (whether the node process exposes the HTTP API), resolved dataTransport (gossipsub or zenoh), zenohConnectedPeers (the number of cluster members the node holds an authenticated Zenoh transport to, sampled at each advertisement; a peer counts only when its links present the cluster's member certificate; null when the node runs gossipsub or while the count is not yet trustworthy after startup), and capabilityConflicts: loud observation-vs-declaration disagreements from backend derivation, each with a code, message, and remediation. Conflicts also surface as nodeHealth reasons on the same response: gpu_serving_disabled (error level: a visible GPU that no engine would use, so serving would run far below hardware speed), and the warning-level gpu_detection_degraded (an NVIDIA device present but not fully detectable), invalid_engine_binary (an engine binary override pointing at an unusable path), and backend_override_conflict (a declared backend the observed hardware cannot support; the declaration is still honored). A live fleet that advertises both transports receives the error-level data_transport_mismatch reason in every nodeHealth entry. Mixed DATA transports are unsupported: the signal is diagnostic and does not bridge traffic. Configure and restart every node uniformly before serving inference. A node advertising Zenoh with a trustworthy peer-transport count of exactly 0 while at least one other live node also advertises Zenoh receives the error-level zenoh_isolated reason: its control plane looks healthy but every remote model or provider stream through it will fail. The typical cause is a node that cannot reach peers via local multicast (for example one joined over a routed or overlay network); the remediation is an explicit SKULK_ZENOH_CONNECT peer endpoint (tls/HOST:PORT) plus a dialable SKULK_ZENOH_LISTEN address. Data-plane links are mutual TLS keyed by the cluster namespace, so a node with a different SKULK_LIBP2P_NAMESPACE or Skulk network version also reads as isolated, and multicast discovery needs the scouting UDP port that the node logs at startup. The API includes fresh telemetry-only management nodes, local or remote, even when replicated worker membership does not carry their entries. For mixed-version state that predates this field, a missing apiAvailable decodes conservatively as true; current --no-api workers advertise false explicitly.

The topology map lists each node's connections. A socket edge carries the peer's sinkMultiaddr plus a boolean session annotation distinguishing its two sources: session: false (the default) marks an HTTP-probe-verified advertised address, which is dialable and eligible as a placement host, while session: true marks a live, authenticated fabric connection recorded as a path in its own right. Session edges are what keep a NAT'd or proxied remote member visible and placeable when none of its advertised addresses are reachable; their recorded address is the connection's observed remote endpoint, so placement host selection never uses them as a dial target. Consumers rendering or analyzing the graph should treat session edges as proof of connectivity, not as routable addresses.

Operational note:

  • a follower may briefly report a local view that is behind the elected master while it is catching up
  • on newer builds, catch-up can start from a snapshot plus retained replay tail instead of always rebuilding from event 0
  • if your cluster is mixed-version during rollout, upgrade all nodes before you rely on bounded replay retention on the master; an older restarted node may not be able to fully resync after old history has been compacted away

Event log​

GET /events

Takes no parameters. Returns the retained API-side event log as one JSON array (application/json), streamed while reading it. This is a finite export, not an SSE subscription. An API with event logging disabled returns [].

Diagnostics​

  • GET /v1/diagnostics/node
  • GET /v1/diagnostics/telemetry
  • GET /v1/diagnostics/performance-envelopes
  • GET /v1/diagnostics/performance-envelopes/cluster
  • POST /v1/diagnostics/node/capture
  • POST /v1/diagnostics/node/runners/{runner_id}/cancel
  • GET /v1/diagnostics/cluster
  • GET /v1/diagnostics/cluster/timeline
  • GET /v1/diagnostics/cluster/{node_id}
  • POST /v1/diagnostics/cluster/{node_id}/capture
  • POST /v1/diagnostics/cluster/{node_id}/runners/{runner_id}/cancel

Use these endpoints when a node appears stuck loading, warming up, decoding, or shutting down and you need a read-only snapshot without SSHing into every node.

Behavior notes:

  • GET /v1/diagnostics/telemetry takes no parameters and returns aggregate metrics for the API node's isolated telemetry transport: fixed admission and network-queue capacities, current and maximum depth, offered/coalesced/dropped readings, successful publishes, publish failures and bytes, no-peer publish count (noPeerPublishes: publishes that found no peers subscribed on the telemetry protocol; sustained growth on a connected node means its heartbeats reach nobody and it will not appear in membership, typically a build/wire mismatch), plus oldest pending and last-successful-publish age. It never returns telemetry payloads, node/model maps, or completed attempt identifiers. Query each node directly for its local counters; this endpoint is deliberately separate from the node diagnostics bundle so additive telemetry instrumentation does not change that bundle's rolling-window schema.
  • GET /v1/diagnostics/performance-envelopes returns this node's observe-only performance envelopes: for each (hardware class, model, engine+backend, quantization) it has served, a throughput-and-latency-versus-concurrency curve. Each envelope lists per-concurrency buckets (request count, mean/p50 decode tokens/second, aggregate decode tokens/second, p50/p90 time-to-first-token) and a simple kneeConcurrency estimate: the concurrency past which aggregate throughput stops rising. It is data only (no serving behavior is driven from it), kept in bounded memory, and never touches State, the event log, or the telemetry gossip plane. Concurrency is the serving instance's own in-flight load when a generation began: the served engines (llama.cpp server, vLLM) report their true in-flight count, so the curve is accurate across replicas and when several API nodes drive one instance; the single-stream engines report none and fall back to this API node's outstanding-request count. GET /v1/diagnostics/performance-envelopes/cluster fans out to every reachable member and returns each one's report, with unreachable members listed as explicit failures. The dashboard's Performance tab renders these.
  • GET /v1/diagnostics/node returns the local node's runtime/config facts, resources, process tree, live runner-supervisor state, flight-recorder phase state, placement analysis, a bounded doctor array, and dataPlane plus provider blocks. The runtime block never contains the cluster namespace: the namespace seeds the cluster key that authenticates the control and data planes. It reports namespaceConfigured (whether SKULK_LIBP2P_NAMESPACE holds a non-blank value; a blank value is as public as the default and reports false) and namespaceFingerprint, the same domain-separated SHA-256 digest of the network-version and namespace token as the startup log and GET /v1/plugins/host-network; equal fingerprints mean two nodes share a cluster key. The former libp2pNamespace field is removed. Each doctor entry contains checkId, title, verdict, detail, consequence, remediation, and fixAvailable from the node-local doctor registry. The array is capped at 64 entries. The proxied GET /v1/diagnostics/cluster/{node_id} response carries the same complete bundle, including doctor results for the selected node. DATA diagnostics include transport/reorder mode; active and terminal lifecycle counts; first-byte and stream-span timing; duplicate, reordered, skipped, late, idle-timeout, transport-failure, and missing-lifecycle counters; plus router egress queue depth, independent command-queue count, per-owner pressure, drops, publish failures, idle stream reclamations, byte volume, and enqueue/publish latency. dataPlane.egress.idleStreamReclaims and each owner's matching counter increase when a remote command queue emits no frame for its 30-minute resource lease and is forcibly terminated and released. The dashboard Node tab renders the operational subset and highlights non-zero failure counters. Provider diagnostics report active unary calls and streams, concurrency limits and high-water marks, admissions and overload rejections, caller input queue depth, input/output frame and inline-media byte volume, first-output and total stream latency, terminal outcomes, cancellation requests, and missing-terminal streams. The same counters are grouped by qualified capability ID without retaining call IDs, audio, transcripts, or payloads.
  • POST /v1/diagnostics/node/capture collects an on-demand local diagnostic bundle. Body fields are runnerId, taskId, includeProcessSamples, and sampleDurationSeconds; all are optional. When a runner/task is provided, the response includes that runner's bounded flight recorder, latest MLX memory snapshot, and best-effort macOS sample, vmmap -summary, and footprint -p output. Sampling failures are returned as structured partial failures instead of failing the bundle.
  • POST /v1/diagnostics/node/runners/{runner_id}/cancel requests cooperative cancellation for one task that the local runner supervisor still knows about.
  • GET /v1/diagnostics/cluster fans out to reachable peer APIs and returns partial results when some peers are unavailable. The sweep uses a fail-fast probe budget (single attempt, short timeout per advertised address) so one unroutable address cannot stall the response. Every topology member appears in nodes: peers with no reachable API route are explicit ok: false entries with a no reachable API route error rather than being omitted, so an overlay-joined node always has an observability presence. Peer diagnostic reads ignore unknown additive fields recursively and use compatibility defaults for additive counters. The response returns aggregate versionStatus (consistent, mixed, or unknown) and per-node versionStatus (current, version_mismatch, or unknown). This tolerance applies only to operational diagnostics, not correctness-bearing wire types.
  • GET /v1/diagnostics/cluster/timeline stitches every reachable node's runner-supervisor diagnostics into one cross-rank chronological view. The response carries a per-runner synopsis sorted by (modelId, deviceRank) and every flight-recorder entry across all ranks merged and sorted by at. Use this when debugging a distributed deadlock: the rank-disagreement signature ("rank 0 entered pipeline_last_eval_output at T while rank 1 is still in pipeline_first_recv_like") is invisible from any single node's local diagnostics but obvious top-to-bottom in the merged timeline. Unreachable peers are returned in unreachableNodes instead of failing the request.
  • GET /v1/diagnostics/cluster/{node_id} proxies one reachable peer bundle or returns the local bundle if node_id is the current API node.
  • POST /v1/diagnostics/cluster/{node_id}/capture proxies the same on-demand capture request to a reachable peer node.
  • POST /v1/diagnostics/cluster/{node_id}/runners/{runner_id}/cancel proxies the same cooperative live-runner cancellation request to a reachable peer.
  • Placement diagnostics explicitly include whether the current master is part of each model placement, which helps investigate hangs where the master is not one of the inference ranks.
  • The dashboard node inspect icon uses these endpoints to open live diagnostics for any reachable node. DATA pressure appears in the DATA Plane section.
  • The diagnostics drawer prefers Capture bundle before cancellation so operators can collect phase, MLX memory, and process samples before changing the runner state.
  • Runner cancellation is best-effort only. A wedged native/MLX runner may ignore the request and still require stronger intervention.
  • Diagnostics endpoints do not currently kill or restart runners. Capture is read-only; the only mutating diagnostics action is the cooperative task-cancel request above.

Example:

curl http://localhost:52415/v1/diagnostics/node
curl http://localhost:52415/v1/diagnostics/telemetry
curl http://localhost:52415/v1/diagnostics/cluster
curl http://localhost:52415/v1/diagnostics/cluster/timeline
curl http://localhost:52415/v1/diagnostics/cluster/<node_id>
curl -X POST http://localhost:52415/v1/diagnostics/node/capture \
-H 'content-type: application/json' \
-d '{"runnerId":"<runner_id>","taskId":"<task_id>"}'
curl -X POST http://localhost:52415/v1/diagnostics/cluster/<node_id>/capture \
-H 'content-type: application/json' \
-d '{"runnerId":"<runner_id>","includeProcessSamples":true}'
curl -X POST http://localhost:52415/v1/diagnostics/node/runners/<runner_id>/cancel \
-H 'content-type: application/json' \
-d '{"taskId":"<task_id>"}'
curl -X POST http://localhost:52415/v1/diagnostics/cluster/<node_id>/runners/<runner_id>/cancel \
-H 'content-type: application/json' \
-d '{"taskId":"<task_id>"}'

Field telemetry​

  • GET /v1/telemetry/preview

GET /v1/telemetry/preview

Returns the field-telemetry consent state and the exact pending sample batch that would next be sent to the ingest service, so operators can inspect precisely what leaves the cluster before or after opting in. Collection is opt-in (dashboard consent flow; telemetry: in skulk.yaml) and content-free: samples carry model ids, canonical hardware classes, timing, token counts, and failure-class enums only. No parameters.

{
"enabled": false,
"consent": "unasked",
"pending": [],
"dropped_since_start": 0,
"install_id": "",
"ingest_url": "https://..."
}

Traces​

  • GET /v1/tracing
  • PUT /v1/tracing
  • GET /v1/traces
  • GET /v1/traces/cluster
  • POST /v1/traces/delete
  • GET /v1/traces/{task_id}
  • GET /v1/traces/{task_id}/stats
  • GET /v1/traces/{task_id}/raw
  • GET /v1/traces/cluster/{task_id}
  • GET /v1/traces/cluster/{task_id}/stats
  • GET /v1/traces/cluster/{task_id}/raw

Use these endpoints when you are debugging generation behavior, cluster execution, or performance.

Behavior notes:

  • GET /v1/tracing returns whether runtime tracing is currently enabled for new requests across the live cluster session.
  • PUT /v1/tracing toggles tracing cluster-wide for new requests only. It does not retroactively trace in-flight work.
  • GET /v1/traces* reads local trace artifacts stored on the current node.
  • GET /v1/traces/cluster* fans out to reachable peer APIs, deduplicates by task_id, and proxies read-only trace access from any reachable node.
  • POST /v1/traces/delete remains local-only in v1 even when cluster browsing is enabled.

Runtime tracing control​

GET /v1/tracing

Returns the current cluster tracing state:

{"enabled": false}

PUT /v1/tracing

Enable or disable tracing for new requests across the current cluster session.

Request body:

{"enabled": true}

Response body:

{"enabled": true}

Operational notes:

  • this is a runtime toggle, not a restart-required config edit
  • it applies to new requests only
  • it does not retroactively trace work already in flight
  • the dashboard traces page uses this same API

Local trace endpoints​

These endpoints operate on trace artifacts stored on the current node:

  • GET /v1/traces lists local trace artifacts with metadata such as task kind, model, source nodes, and tool-activity tags
  • GET /v1/traces/{task_id} returns structured trace events for one task
  • GET /v1/traces/{task_id}/stats returns aggregated timing summaries
  • GET /v1/traces/{task_id}/raw downloads Chrome-trace-compatible JSON
  • POST /v1/traces/delete accepts {"taskIds": ["<task-id>"]} and deletes those local trace artifacts, returning deleted and notFound ID lists

Example:

curl http://localhost:52415/v1/traces
curl http://localhost:52415/v1/traces/<task_id>/stats
curl -OJ http://localhost:52415/v1/traces/<task_id>/raw

Cluster trace endpoints​

These endpoints let a dashboard or script on any reachable node browse traces across the cluster:

  • GET /v1/traces/cluster
  • GET /v1/traces/cluster/{task_id}
  • GET /v1/traces/cluster/{task_id}/stats
  • GET /v1/traces/cluster/{task_id}/raw

Operational notes:

  • cluster browsing is read-only in v1
  • the API fans out to reachable peer APIs and deduplicates traces by task_id
  • if some peers are unreachable, cluster results may be partial
  • source node metadata in responses tells you which nodes contributed trace content

Example:

curl http://localhost:52415/v1/traces/cluster
curl http://localhost:52415/v1/traces/cluster/<task_id>/stats
curl -OJ http://localhost:52415/v1/traces/cluster/<task_id>/raw

Plugin Node Configuration​

Plugin management addresses a stable installed node, not a capability method or transient cluster peer. Several capabilities can share one node's settings. The Plugins dashboard page uses the same plugin-owned configuration store and validation as its terminal interface. These endpoints expose ordinary settings; credential values must use a separate write-only provider interface.

Locally registered managed owners use these same routes through the generic Unix-socket adapter. They remain in inventory when their process is unavailable; no private SDK is loaded into the API process. The adapter fences the exact node, revision and schema and never automatically replays a mutation after transport failure. Service paths and executable selection are not HTTP request parameters.

Method and pathParametersBehavior
GET /v1/pluginsNoneReturns installed plugins with pluginId, available, and nodes; each node has nodeId, bundleId, version, status, configurable, and credentialsConfigurable (false for legacy nodes without credential inputs). Disabled nodes remain listed. An unavailable management provider has available: false. Requires plugins:read.
GET /v1/plugins/{plugin_id}/nodes/{node_id}/configurationExact installed plugin and stable node IDsReturns nodeId, revision, schemaDigest, configurationSchema, ordinary values, and enabled. Requires plugins:read.
POST /v1/plugins/{plugin_id}/nodes/{node_id}/configurationJSON operation (validate, edit, enable, disable), expectedRevision, expectedSchemaDigest; values is required only for validate/editValidates a draft or changes one node through its provider. Both revision and schema fences must match. Returns configuration and validated. The provider owns validation, persistence, preflight and any necessary child restart. Requires plugins:manage; this route cannot approve spending.
GET /v1/plugins/{plugin_id}/nodes/{node_id}/credentialsExact installed plugin and stable node IDsOptional credential-management facet. Returns nodeId, credential revision, schemaDigest, and up to sixteen credentials, each with credentialId, title, description, required and ready. No values, value fingerprints or backend paths. Requires plugins:read.
POST /v1/plugins/{plugin_id}/nodes/{node_id}/credentialsJSON operation (replace or retire), operationId (32 lowercase hexadecimal characters), plugin-declared credentialId, expectedRevision, expectedSchemaDigest, and write-only value for replacement onlyApplies one revision-fenced credential mutation and returns metadata. Values are nonempty UTF-8 and at most 4096 bytes. The provider durably deduplicates exact operation IDs, preserves prior credential versions needed for cleanup, and owns readiness checks. Retirement withdraws future credential use; it does not erase cleanup history. Requires plugins:manage; no enable or spending approval is conveyed.
GET /v1/auth/plugin-grantsNoneDirect owner administration only: lists device deviceId, deviceName, grant revision, explicit plugin scopes, and active. No credential material.
PUT /v1/auth/plugin-grants/{device_id}JSON expectedRevision, scopes (unique subset of plugins:read, plugins:manage, plugins:approve)Direct owner administration only: replaces that device's plugin grants, retaining other scopes. An empty list revokes all plugin grants. Existing tokens use current grants immediately.

Existing pairings and newly paired devices receive no plugin grants automatically. operations:write does not imply plugin management, and plugins:manage does not imply approval. Grant routes reject relay access and any presented paired bearer, even with matching direct-owner origin headers; a paired operator cannot grant itself greater authority. These refusals return 403. Unknown devices return 404, stale grant revisions return 409, and malformed grants return 422.

Credential values never enter ordinary configuration, replicated State or ordinary diagnostic exports. Validation failures and provider exceptions do not echo them. Credential metadata responses are bounded to 64 KiB. Unsupported credential facets return 404; declarations, revisions and retention remain plugin-owned. A lost credential response requires a status read before further action. Exact operation ID reuse must not repeat a committed backend write; changed intent must be refused. The Plugins page renders these inputs separately, clears values before submission, and keeps them out of Redux/browser persistence. A concurrent or unconfirmed change requires explicit metadata refresh before another write. Required credential readiness is an admission prerequisite, not full provider preflight or proof that external services are reachable.

Direct owner requests use the existing dashboard boundary: the actual socket peer must be loopback or verified Tailscale, the browser Origin/Referer must exactly match the direct dashboard URL, and X-Skulk-Dashboard: pairing-v1 must be present. Forwarding headers are refused. Scoped paired operators send Authorization: Bearer <access token> over HTTPS, the authenticated relay, or the verified direct owner transport. An invalid bearer token never falls back to local owner authority. Read and mutation responses use Cache-Control: no-store. A request without a credential from anywhere else answers 403 saying how plugins are managed: from a browser on the node itself (localhost) or through Tailscale by its MagicDNS name or Tailscale IP, or, for routes that accept a scope, by a paired device granted plugin access. An owner-only route names only the direct routes. A request carrying a paired credential to an owner-only route is told that the change needs direct owner access: a browser on the node or over Tailscale chooses "Use direct host access", and an API client sends the request without the credential.

Unknown providers or nodes return 404. Revision/schema conflicts and provider validation refusals return 409; callers must reload before retrying a stale edit. Malformed actions return 422, saturated management returns 429, and unavailable/timed-out providers return 503/504. Provider exception text is never returned. Ordinary configuration responses are bounded to 128 KiB; password/write-only schemas are refused. Inventory is bounded to 32 providers and 128 nodes per provider. Configuration dispatch has an eight-request concurrency limit and a cooperative thirty-second deadline. In-process extensions remain trusted code.

Managed Plugin Lifecycle and Setup​

Local managed-runtime lifecycle control​

The local manager is separate from the HTTP API and remains available when a plugin child is disabled or broken. Local setup provisions its protected host.json with a generated local profile ID and the current Skulk transport identity. Its fixed service command is python -m skulk.extensions.runtime_manager serve --root <service-root>. The terminal transport is python -m skulk.extensions.runtime_manager call --root <service-root>, reading one JSON request from standard input. These low-level lifecycle entry points share the installed service created by skulk-plugin-service setup.

The local socket accepts these typed requests:

ActionParametersBehavior
listNoneLists registered installation IDs, selected runtime digests, selection revisions, retained operation references, observed process status and stale/unavailable observations. Process existence does not imply capability readiness.
registerplugin_idRegisters an empty managed.* installation, up to sixteen per manager. Provisions its existing host identity automatically; an existing mismatched identity is refused without replacement. No provider request is made.
getplugin_idReturns desired selection and process observation without paths, credentials or raw output.
submitplugin_id, requestAccepts a local lifecycle request after validating its revision and target. The nested request contains operation_id (32 lowercase hexadecimal characters), action (activate, select, disable or uninstall), expected_revision, and for activation or stopped selection runtime_digest, optional rollback and accept_permissions. No spending authority is conveyed.
operationplugin_id, operation_idReads retained progress. Reconnect reads this result; reusing an ID with different intent is refused.
recoverplugin_id, operation_idExplicitly resumes only that retained local intent after its fault is corrected. Completed or superseded operations remain unchanged. No new request or provider operation is created.
reload_runtimegeneration, manifest_sha256Selects a manager generation staged from the live Skulk build, verifying its seal under the manager's own fences, then stops so the OS service restarts on it. Refused when the generation is not staged or differs.
read_catalog(none)Fetches the host's one configured signed catalog, verifies it against the host's discovery trust (publisher known and not revoked, trust and catalog unexpired, Ed25519 signature over the canonical document, protocol window) and returns its review: publisher, revision, window, the document digest, and per entry the bundle identity and title, sequence, release and artifact digests, size, platforms, Skulk build, signed permissions, capability ids, surface titles, durable operations, steward risk classes, and whether the release matches this host. Selects and installs nothing; returns no addresses or credentials.
catalog_status(none)Catalog source readiness: revision, whether configured, the opaque credential reference and whether it is readable, and the discovery trust revision. No network I/O.
configure_catalogrequest (expected_revision, optional base_url, document_filename, trust, write-only token, clear_token)Sets the host's catalog address and discovery trust under the catalog fence; the same revision, trust-monotonicity and credential-replacement rules as a release source.

Activation validates signed artifacts, permission expansion and migration compatibility before stopping the owner; it repeats admission checks before switching. select performs the same checks and publishes enabled: false, allowing verified host-local setup or migration before any owner startup. A later activate request must use the new selection revision; selection itself performs no migration or identity initialization. Interrupted stopped selections revalidate trust and artifacts before completion. Disable retains runtime generations, identities and cleanup material, even when release trust is invalid. An explicit disable may withdraw a stalled activate or select using the actual current selection revision (zero when initial publication never happened). Live work still must finish; a pending disable uses recovery rather than another disable. The new operation retains withdraws_operation_id for its prior local intent. An unpublished prior transition becomes superseded; one already atomically published is recorded as complete. Its runtime is never executed to finish withdrawal. Both journals retain their history, including when withdrawal itself is interrupted. Operations move through accepted, applying, complete, failed, recovery_required or terminal superseded; completion confirms the local desired-state change, with service and capability readiness observed separately. Pending local selection recovery never replays provider requests. A retained accepted record without live owned work is reported as recovery_required. An accepted operation outlives its requesting socket. Validation failures do not interrupt a healthy owner.

The socket is owner-only and accepts eight concurrent clients, one request per connection, at most 16 KiB request and 256 KiB response, with a thirty-second request deadline. Errors contain the stable manager_operation_refused code, with three named exceptions: a host whose live Skulk build differs from the manager's answers manager_build_differs with the two build digests, a verified release outside this host's protocol window answers release_protocol_unsupported with kind (release or runtime), the integer offered and the integers accepted, nothing else, and an install or retry into a folder whose path is too long for Windows answers runtime_path_too_long with the integer excess (how many characters too long), never the path; local operation records distinguish validation, ownership and local I/O failures. This transport is not a LAN listener or remote authorization mechanism. The HTTP lifecycle routes below enforce the existing explicit plugin operator scopes.

Plugin proposal review​

These read-only routes require direct owner authority or explicit plugins:read. Responses use Cache-Control: no-store. Disabled installed nodes may retain reviewable intent; proposal state is an observation, never execution authority.

  • GET /v1/plugins/{plugin_id}/nodes/{node_id}/proposals accepts integer offset (default 0, range 0..127). It returns at most sixteen summaries in proposals and an optional nextOffset. Each summary includes an exact reference, plain text summary (1–1,024 characters), expiresAt (UTC Unix seconds) and state. Concurrent journal changes can move entries between pages; review a selection freshly before taking any later action.
  • GET /v1/plugins/{plugin_id}/nodes/{node_id}/proposals/{proposal_id} requires query parameter proposal_digest (64 lowercase hexadecimal characters). The provider must match both its opaque ID and immutable intent digest. The response contains proposal, observedAt (UTC Unix seconds), and 1–32 fields, each with a plain-text label (1–64 characters) and value (1–2,048 characters). Facts cover applicable model/context, resource selection, prices, limits and cleanup terms.

The reference contains pluginId, nodeId, proposalId, and proposalDigest. Proposal IDs are 1–128 characters from a-zA-Z0-9._:@-; they are opaque identifiers, not paths or serialized workflows. A digest need not equal its proposal ID. Read responses are bounded to 128 KiB and reject another installation's reference. Malformed parameters return 422; unsupported nodes/providers return 404; changed or inconsistent references return 409; unavailable providers return 503 or 504. Failures contain no rejected canonical input or private provider diagnostics.

The core receives safe review data. Canonical execution arguments, approvals and execution journals remain with the provider. These GET requests neither create intent, grant approval nor replay a prior effect. Clients render fields as text.

Plugin owner proposal actions​

Review responses carry approvalRevision: a 64-character lowercase hex fence binding the provider's reviewed terms, or null when approval is unavailable. The optional owner action facet uses the exact reference returned by review. Direct owner authority or explicit plugins:approve is required for both POST routes on direct and relay connections. plugins:manage cannot approve; plugins:read authorizes observation. Responses use Cache-Control: no-store and contain at most 16 KiB of safe progress metadata.

  • POST /v1/plugins/{plugin_id}/nodes/{node_id}/proposals/{proposal_id}/approve accepts operationId (32 lowercase hexadecimal characters), reference, and reviewRevision (the exact review fence). The route and reference must match. The API supplies the authenticated operator identity; caller-selected actors, executable inputs and approval proofs are rejected. Providers durably accept intent before work and revalidate terms and authority before execution.
  • GET /v1/plugins/{plugin_id}/nodes/{node_id}/proposal-operations/{operation_id} observes the original action without signing, executing or replaying it.
  • POST /v1/plugins/{plugin_id}/nodes/{node_id}/proposal-operations/{operation_id}/resume takes no replacement intent (empty body or {}). It explicitly recovers an interrupted approval using the original action ID. A currently authorized owner may recover another owner's retained action. Submitted or uncertain work must only be observed, never replayed.

Responses contain operationId, exact reference, phase, updatedAt (UTC Unix seconds), nullable safe code, and nullable correctiveAction (up to 512 characters). Phases are accepted, approving, approved, dispatching, acknowledged, succeeded, refused, approval_interrupted, and uncertain. acknowledged means the capability controller durably accepted the exact approved request for asynchronous processing. The provider request may still be queued; this is neither provider completion nor inference readiness. Observe reconciliation; acknowledged work survives owner restart and cannot be replayed or resumed. Success describes completion of the selected action; it does not universally mean resource absence. Malformed inputs return 422, missing scopes 403, unsupported facets 404, inconsistent references or refused actions 409, and unavailable owners 503/504. An unconfirmed HTTP reply does not prove that the action was refused.

An optional nullable reconciliation object reports later cleanup evidence without rewriting phase: state is pending, active, releasing, absent, attention or unknown; observedAt is the cleanup journal read time in UTC seconds (null before any successful observation); stale marks unconfirmed current access or worker health; and code is a nullable safe status code. These are historical receipt observations, not a new provider inventory query or inference-readiness claim. A failed refresh retains previous evidence and marks it stale. Providers must correlate the exact retained request, never infer absence from a missing record, and never replay uncertain work during observation. Confirmed absence remains visible beside the original uncertain submission, including after a later cleanup-connection outage. The dashboard labels absence and stale evidence separately; terminal clients consume the same response fields.

The Plugins page presents provider facts as text with a distinct Approve and execute reviewed proposal button. It saves only an operation lookup ID in browser storage before POST, then observes status after reconnect. It never stores proof or credentials and never automatically resumes an interrupted approval. The separate Resume original approval action is available only for that phase. Providers retain raw failure evidence in protected host-local storage.

Managed plugin HTTP lifecycle​

The Plugins page and these routes use the same independently supervised manager as terminal operations. All JSON fields in this lifecycle contract use snake_case. Plugin service setup (started by the node through the routes below, or by skulk-plugin-service setup) supplies the protected connection; HTTP requests cannot choose a manager root, executable or attachment identity. A running Skulk API discovers subsequent local setup and installation registration without restart. Missing setup returns an actionable unavailable response.

MethodPathParameters and behavior
GET/v1/plugins/managed/serviceRequires plugins:read. Answers before any setup exists. Returns state (absent: never set up; setting_up; ready: the manager answers; unavailable: set up but not answering; failed; unsupported: this host cannot run the manager), scope (user or system, once set up), progress (the current step while setting up), error (why the last setup failed or the host is unsupported) and purpose (while setting_up, and when failed: setup for the first setup or one the owner started, update for bringing the plugin service in line with a Skulk that was updated or moved; null otherwise). After a Skulk update the host brings the plugin service to its new build by itself (see Local plugin service setup); until the manager attaches on that build the status is setting_up with purpose: "update" and the progress sentence Skulk was updated. Updating the plugin service to match; plugins come back in a minute or two., even while the previous build's manager still answers. A first setup keeps its step-by-step progress. An update that is refused, cannot copy this Skulk, or does not bring the manager back within ten minutes reports failed with purpose: "update" and an error that says what happened and the next step (try setup again, free disk space first, or for a system service the terminal repair command); a setup started after it supersedes it. The read never waits on the runtime copy; only the first read after Skulk starts waits, up to fifteen seconds, for the node's first look at its manager.
POST/v1/plugins/managed/service/setupDirect localhost/Tailscale owner administration only; no body. Starts the one-time per-user setup described under Local plugin service setup in the background and returns the status at once; poll the GET route for progress. The first setup copies the node's environment and takes a few minutes. A running setup is not restarted, and none starts while a refresh attempt for a Skulk update is copying a runtime or restarting the manager on it, including a background retry after a reported failure; the response is then the current status. A host connected to a system service is not changed: its status names the terminal repair command, because registering a system service needs local elevation, which a node never requests.
GET/v1/plugins/managedRequires plugins:read. Returns installations, at most sixteen entries, with plugin_id, release, selected_digest, selection_revision, enabled, service, stale, error_code, operation_id and operation_state. release names the selected signed release from its staged metadata: bundle_id, title (null when the manifest declares none), bundle_version, publisher and sequence. It is null before a release is staged or when that metadata cannot be read, and it is display information only, never a trust or compatibility decision. reload_runtime is true when the manager can select a staged runtime and restart on request; a host reads it before asking, so a manager from before that request is told apart from one refusing a generation. store_trust_retry is true while installations following the built-in capability store were busy when its trust was last followed (by any caller, a terminal catalog read included); the host then renews that trust again within five minutes. Pending or selected operation references allow reconnect to resume observation without repeating a mutation.
POST/v1/plugins/managed/installationsRequires plugins:manage. Body: plugin_id in the managed.* namespace. Registers an empty installation and returns its observation. Does not download, stage or enable a release.
GET/v1/plugins/managed/capabilitiesRequires plugins:read or direct owner authority. No parameters. Reads declarations from this API host's configured local manager without attaching, repairing setup, enabling or invoking a child. Returns source, observedAt, scope: local_api_host, and at most sixteen installations: selected metadata plus independent reachable (nullable) and exact readyCapabilities. A ready provisioning capability does not establish allocated inference capacity. release.registration, also additive to the existing manager inventory, contains at most eight purpose/version/operation-digest summaries, declared Skulk/Python/platform requirements, configuration requirement and required credential identifiers only. Optional registration is unavailable when malformed or outside the 8 KiB per-registration or manager response budget; the installed identity remains visible. Uninstalled retained metadata does not imply usable capacity.
GET/v1/plugins/managed/{plugin_id}/capabilities/{qualified_id}Requires plugins:read or direct owner authority. Path: exact installed plugin and declared id@version (at most 256 characters). Required query: revision, the exact lowercase hexadecimal digest from registration (16 characters for legacy descriptors, 64 for native descriptors). Returns the selected generation digest, exact descriptor and revision, including input/output/media schemas. The current selected declaration must still match; a changed/unavailable contract is refused. Reads are bounded to 256 KiB per descriptor and work with disabled children. No operation is invoked and declaration grants no execution authority.
GET/v1/plugins/managed/installations/{plugin_id}Requires plugins:read. Returns installation observation and selection, nullable before a release is selected.
DELETE/v1/plugins/managed/installations/{plugin_id}Requires plugins:manage. No body. Removes one installation that is uninstalled, or that never selected a release, together with everything it retained: lifecycle records, staged generations, feed credentials and cleanup state. Returns plugin_id and purged: true; the installation leaves the inventory. A live installation, or one with an operation or a release download under way, is refused with 409 and left unchanged. The terminal equivalent is skulk-plugin-service purge-plugin <plugin_id>.
POST/v1/plugins/managed/installations/{plugin_id}/operationsRequires plugins:manage. Body: operation_id (32 lowercase hexadecimal characters), action (activate, select, disable or uninstall), expected_revision (nonnegative integer), and activation/selection-only runtime_digest, optional rollback and accept_permissions booleans. Returns the retained LifecycleOperation. Activation and stopped selection accept only an already staged, verified generation. A generation whose configuration schema differs from the selected one is refused with configuration schema requires migration, unless its owner speaks plugin protocol 3 or later and the new schema still accepts every stored setting: only descriptions, titles, defaults, examples or comments changed, optional settings were added to a closed object, or required settings became optional. select keeps its owner stopped until a later explicit activate request. An explicit disable can withdraw a stalled activation/selection, including a revoked release, using the current selection revision. Live work and a pending withdrawal cannot be superseded. activate and select revalidate the staged metadata; a runtime that a host update has moved outside the protocol window answers 409 with the sentence the guided installer prints (which protocol the host accepts, which the runtime offers, and that the fix is to update Skulk on this host or choose a release published for it).
GET/v1/plugins/managed/installations/{plugin_id}/operations/{operation_id}Requires plugins:read. Reads the original local operation's exact request, previewed selection, state, sanitized error_code and optional withdraws_operation_id. Superseded unpublished transitions remain terminal history. Never repeats its effect.
POST/v1/plugins/managed/installations/{plugin_id}/operations/{operation_id}/recoverRequires plugins:manage. No body. Explicitly resumes the existing journaled local operation; completed or superseded operations are unchanged.

Direct localhost/Tailscale owner administration remains available under the existing origin checks. Remote grants are explicit: a broad operation token does not substitute for a plugin grant, and revoked sessions lose access. Responses use Cache-Control: no-store. Unknown fields and malformed identifiers return 422; authorization follows the existing 401/403 contract. Capacity exhaustion returns 429, unavailable local setup/service or operation returns 503, refused selection or conflicting intent returns 409, and a manager deadline returns 504. After an uncertain response, read the original operation; do not generate another mutation to discover whether the first succeeded. No raw provider response, credential value or host-local path is returned.

The dashboard polls inventory and retained operation status, distinguishes stale observations, and supports disabling and explicit local recovery. A confirmed recovery-needed activation/selection offers Disable even before its first runtime was published; the UI explains that this withdraws local intent without running the release. An unconfirmed mutation still requires status readback first. Runtime completion does not prove capability readiness. Disabling preserves cleanup records and independent supervision. These routes convey neither paid approval nor permission to replay an uncertain provider create. Release download/staging uses the routes below; provider credential provisioning and proposal approval are separate operations.

Private release inspection and installation​

Each registered installation has one owner-configured HTTPS release directory and publisher trust view. The release directory contains signed v2 metadata, its bundle.pyz and every exact wheel named by that metadata. URLs are never supplied on install requests. The manager verifies metadata, current publisher trust and exact host compatibility before requesting any artifact, refuses redirects and encoded responses, and checks every artifact size and SHA-256 before offline staging. It resolves no dependency versions and does not modify Skulk's environment.

MethodPathParameters and behavior
GET/v1/plugins/managed/installations/{plugin_id}/sourceRequires plugins:read. Returns revision, configured, opaque credential_reference, credential_ready, trust_revision and follows_store (whether the installation's publisher trust follows the built-in capability store: true after a binding from a store listing, false once its owner configures the source or binds it from a private catalog); no network request or stored token value.
POST/v1/plugins/managed/installations/{plugin_id}/sourceDirect localhost/Tailscale owner only; paired bearers and relay requests are refused. Body: expected_revision (zero initially), optional HTTPS base_url ending in /, metadata_filename, trust, write-only token, and clear_token. Omitted directory, filename and trust retain current values; initial setup must supply any missing values. Returns source readiness. trust contains monotonic revision, Unix expires_at, publishers mapping publisher IDs to Ed25519 public-key hex, and optional revoked_publishers/revoked_artifacts arrays. New trust revisions retain all prior revocations; these cannot be removed through source configuration. Same-revision trust changes, stale source revisions and expired trust are refused.
GET/v1/plugins/managed/catalogRequires plugins:read. Fetches and verifies the host's signed catalog (the read_catalog manager request) from its one source: a private catalog the owner configured, or the built-in capability store. A host with no source and no discovery trust uses the built-in store when its build includes the store's TUF root, so its first read needs no configuration. When the source is the built-in store, the store's publisher trust is verified through its TUF repository from that root before the catalog is read: a newer trust revision is applied, an older one never, and it applies exactly as the store published it, revocations included (revocations a private catalog's trust held never carry to the store, nor the store's to a private catalog). A host that cannot reach the store, or that runs with SKULK_OFFLINE=true or --offline, uses the trust it last verified until that trust expires; the catalog download itself is still made. Returns publisher, revision, created_at, expires_at, catalog_sha256 and entries, each with bundle_id, bundle_version, title, publisher, sequence, release_digest, runtime_platform (the exact artifact family of a runtime-bearing release, else null), artifact_sha256, artifact_bytes, transfer_bytes (the artifact plus every wheel of a runtime-bearing release), platforms, skulk_build_sha256, skulk_requires, permissions, descriptors, surfaces, operations, steward_risks, expires_at and matches_host. skulk_requires is the range of Skulk versions the release runs on, from a catalog protocol 2 listing; skulk_build_sha256 is the build its publisher qualified it against, kept for provenance. matches_host is true when the release's platforms fit this host and this host's Skulk version is inside skulk_requires, whatever build it runs, so a Skulk update keeps a release installable. A protocol 1 listing has no range (skulk_requires is null) and was published for one exact build, so it fits only a host running that build. A release whose served record, signed claims or executable artifact the discovery trust revokes is not listed (wheel revocations are enforced by the release path at inspection and staging). Retained catalog documents are pruned to the newest few beyond every accepted revision. The discovery trust the host accepted is recorded as a floor; a restored older trust file is refused. The accepted catalog revision only moves forward: an older revision, or a different document at the accepted revision, is refused as a rollback. A refused read answers 409 with one sentence naming why and what to do next: no catalog is configured; the catalog address cannot be reached from this host; the catalog server answered an HTTP status other than 200 (the status is named) or an encoded response; the address returned something other than a valid signed catalog; the discovery trust does not accept the publisher or has expired; the signature does not match the publisher's trusted key; the catalog is outside its validity period, or the host clock is wrong; the catalog is older than the one the host already accepted; the stored catalog credential cannot be read; the built-in store's trust could not be verified and the host holds no current verified copy; or another catalog read, install or source change is in progress. No addresses or credentials; nothing is selected, staged or installed.
GET/v1/plugins/managed/catalog/sourceRequires plugins:read. Returns catalog source readiness: revision, configured, credential_reference, credential_ready, trust_revision, builtin_store and builtin_store_available. builtin_store is true when the source is the built-in capability store; such a host reports configured from the start, with trust_revision null until its first read verifies the store's trust. builtin_store_available is true when this build includes the built-in store, so the host can switch to it. assigns_trust_revisions is true when the host accepts assign_trust_revision on a source update; hosts that predate it omit the field. No network I/O.
POST/v1/plugins/managed/catalog/sourceDirect localhost/Tailscale owner only. Body: expected_revision (zero initially), optional HTTPS base_url ending in /, document_filename (default catalog.json), trust (the publishers trusted for discovery, the same shape as release trust), write-only token, and clear_token. Initial setup requires the directory and trust; omitted fields retain current values; revocations stay with the catalog address that set them: a new trust for an address keeps every revocation the host holds for that address, including after a detour through the built-in store or another catalog, and never takes another address's or the store's. With assign_trust_revision, the host gives trust the next revision of the target address's own trust history in place of the revision supplied, so a re-added catalog is never refused as a rollback (the dashboard sets it; it requires trust); moving the catalog requires supplying its credential again. A private catalog replaces the built-in capability store as the source: moving from the store requires both base_url and trust, and the store's own catalog address is refused as a private catalog. Nothing is fetched or installed. A refused change answers 409 naming why: expected_revision is not the current revision, initial setup lacks the directory or trust, the trust is expired or older than the trust the host accepted for that catalog address (each address keeps its own trust history, so leaving the built-in store compares a private trust only with that address's earlier trust, and a round trip through the store never lowers it), the catalog moved without its credential, the address is the built-in store's own, or another catalog operation is in progress.
POST/v1/plugins/managed/catalog/source/builtinDirect localhost/Tailscale owner only. Body: expected_revision (the current catalog source revision). Makes the built-in capability store the source again in place of a private catalog: the store's catalog address, read anonymously, and the store's publisher trust verified through its TUF repository (with SKULK_OFFLINE=true or --offline, the trust last verified), exactly as the store published it: the private catalog's revocations do not carry over. The private catalog's trust revision does not bind the store's; the store's own trust only moves forward. A host already on the store is left unchanged. Returns catalog source readiness as above. Nothing is fetched from the catalog or installed. A refused change answers 409 naming why: this build does not include the built-in store, expected_revision is not the current revision, the store's trust could not be verified and the host holds no current verified copy, or another catalog operation is in progress.
POST/v1/plugins/managed/catalog/installDirect localhost/Tailscale owner only. Body: catalog_sha256 (the reviewed catalog's digest, from the catalog review), bundle_id, sequence, optional runtime_platform (the listed artifact family, matched by canonical family) and optional plugin_id (an existing installation to upgrade; omitted registers a new managed. ID). The listing is taken from the retained catalog under that digest and verified again against discovery trust; the digest must still be the newest listing the host accepted from its source for that publisher, or the request is refused as superseded. The listing must fit this host. The installation's release source becomes the listed feed with release.json as its record, the discovery trust becomes its publisher trust (from the built-in capability store, the store's trust as published, at the installation's next trust revision; the installation then follows the store's renewals and revocations while it runs, and stops following when its owner configures its source directly or binds it from a private catalog), and the catalog credential is presented only when the feed shares the catalog's origin (a credential the installation already holds for the listed feed address is kept; otherwise another origin is read anonymously until the installation is given its own credential). An existing installation keeps its bundle and never goes back: another bundle or a lower sequence is refused before the source is touched. The release record is then inspected through the ordinary path and must be the record the listing names (runtime_digest, signed publisher, bundle and sequence). Returns plugin_id, listing (the catalog entry review), source (source readiness) and review (the release review). Nothing is downloaded beyond the record, staged or activated: continue with the install and activate requests, which remain their own consents. 409 names a refusal without addresses; a listing that a later read superseded, or that this host no longer holds, is named with the remedy to read the catalog again.
GET/v1/plugins/managed/installations/{plugin_id}/releaseRequires plugins:read. Downloads and verifies only metadata, returning runtime_digest, source_revision, publisher, bundle_id, version, sequence, platform, python_requires, skulk_build_sha256, declared permissions, total artifact_bytes and Unix expires_at. The exact verified metadata is retained for a later install request. A verified release outside this host's protocol window answers 409 with the sentence the guided installer prints: which protocol the host accepts, which the release offers, and that the fix is to update Skulk on this host or choose a release published for it.
POST/v1/plugins/managed/installations/{plugin_id}/installRequires plugins:manage. Body: operation_id (32 lowercase hexadecimal characters), exact reviewed runtime_digest, expected_source_revision. Journals intent before returning InstallOperation, then downloads and stages under independent manager ownership. Reusing the ID with the same request reads its retained state; different intent is refused. Does not activate or approve spending. A verified release outside this host's protocol window answers 409 with the sentence the guided installer prints: which protocol the host accepts, which the release offers, and that the fix is to update Skulk on this host or choose a release published for it. On a Windows host without long paths switched on, an installation folder whose path is too long to hold the runtime answers 409 with the sentence the guided installer prints: how many characters too long the path is, and that the fix is to switch on long paths in Windows or keep Skulk's files in a folder with a shorter path. That refusal journals nothing and downloads nothing: no operation exists to poll, and the same request is refused again until the host changes. It counts what is known before a download. A release whose own files turn out to be too deep is refused after the download, before anything is built: its operation then reads recovery_required with error_code runtime_path_too_long and path_excess.
GET/v1/plugins/managed/installations/{plugin_id}/installRequires plugins:read. Returns operation, nullable before installation. The retained operation contains exact request, signed review, state, downloaded_bytes, sanitized error_code, attempt (zero initially) and nullable attempt_source_revision for explicit recovery. error_code is download_failed, installation_failed, installation_interrupted or runtime_path_too_long. The last means the release was downloaded but its files would need a path longer than Windows allows on this host; only then the operation also carries path_excess, the number of characters too long, and the fix is the one the install request's refusal names (switch on long paths in Windows, or keep Skulk's files in a folder with a shorter path). path_excess is null on every other operation. Reconnect polls this route, never resubmits an uncertain request.
POST/v1/plugins/managed/installations/{plugin_id}/install/{operation_id}/recoverRequires plugins:manage. operation_id is the original 32-character lowercase hexadecimal ID. Body: expected_source_revision from current source readiness, including any explicit credential rotation. Revalidates the original signed metadata against current trust and host compatibility, retains prior attempt evidence, and journals another download/staging attempt for the same exact digest. Only recovery_required work is retried; other states return unchanged. Refuses busy installers, changed source revisions and more than eight recovery attempts. Does not activate or approve spending. A verified release outside this host's protocol window answers 409 with the sentence the guided installer prints: which protocol the host accepts, which the release offers, and that the fix is to update Skulk on this host or choose a release published for it. On a Windows host without long paths switched on, an installation folder whose path is too long to hold the runtime answers 409 with the same sentence as the install request; the operation stays recovery_required with its attempt count unchanged, and no attempt evidence is written.

Native-aware built-in Store readers first probe the separately signed protocol 4 catalog-v4.json. Each native entry adds native with runtime_protocol: 5, release_protocol: 3, full manifest_revision, exact kernel source/version and ABI profiles, and sorted unique processing_domains. Legacy entries return native: null. Release inspection and retained install reviews carry the same nullable native binding, so retry and direct-source consent retain these facts without requiring the original catalog. Installation binds them to the independently authenticated runtime before selecting or staging anything. The native catalog uses a separate skulk.catalog/4\0 signature domain. Once accepted, its version and revision floors survive restart and source switches; it never silently downgrades. A genuine initial 404 may probe the older documents.

Older built-in Store catalog reads prefer the separately signed protocol 3 document catalog-v3.json, which supports sixteen capability identifiers per release. The original catalog.json retains its protocol 2 schema and eight-identifier bound. Only an initial HTTP 404 before v3 acceptance permits legacy fallback; other failures are reported normally. A successful upgrade advances the source revision and preserves prior trust and catalog revision floors atomically. Restart or a later missing v3 document does not restore fallback. Private catalog addresses and explicit filenames retain their configured behavior.

Managed discovery permits sixteen contracts per application node and 128 total contracts across one owner's at most sixteen nodes, within its 512 KiB response bound. An aggregate overflow makes that owner unavailable and withdraws ready capabilities; it cannot report ready while silently omitting dispatchable contracts. A later valid discovery restores ordinary readiness.

Installation states are accepted, downloading, staging, staged and recovery_required. Failure codes distinguish download_failed, installation_failed and installation_interrupted. Accepted work outlives an HTTP/browser disconnect. During staging, accepted downloads wait up to 30 seconds for the local installer lock before verification and installation begin. Short service-verification contention resumes the same operation without downloading again. If ownership remains busy, the operation becomes recovery_required with installation_failed; finish the competing management command before explicitly recovering the original operation. Shutdown cancels this wait without starting an installer. Manager shutdown cancels network transfer and waits for owned offline staging; an interrupted operation is retained and never automatically replayed after restart. Partial artifacts and incomplete runtime evidence remain protected for explicit recovery. Recovery retains prior operations, downloaded files and incomplete generations before rebuilding. It never moves a selected generation or one pending activation, and never reseals a damaged completed generation. The original request and review remain immutable even when a rotated credential supplies the next attempt. A staged result proves preparation, not activation, current release trust or capability readiness; activation repeats verification.

The source token is written into a generated protected file before publishing its reference. Omission retains the prior reference; clear_token explicitly selects an anonymous source. Changing a credential-bearing source requires supplying the credential again or clearing it, so management cannot silently forward a stored token elsewhere. Replaced credentials are retained as protected history. Ordinary responses and validation errors never echo token values. A disk fault can apply a stricter trust view before source replacement; runtime admission then refuses invalid releases and the unchanged source revision permits owner correction.

Metadata is bounded to 128 KiB with a twenty-second download deadline. Artifact transfer has a 180-second total deadline and enforces the signed per-file and aggregate bounds. Review and operation histories each retain at most 128 entries; exhaustion requires local maintenance rather than silent deletion. Only one installation download per registered plugin runs at a time. Source replacement is refused while its installation is active. Existing inference and other plugins remain outside this staging lifetime.

After local service setup, skulk-plugin-service manage reads one typed JSON request from standard input and uses the generated protected connection. It needs no service root or executable path argument and invokes no sudo. The existing register, get, submit, operation and recover actions remain available. Release actions are configure_source with plugin_id and nested source-update request; source_status, inspect_release and install_status with plugin_id; install with plugin_id and nested installation request; and recover_install with plugin_id, original operation_id and expected_source_revision. Keep credential input out of shell arguments and shell history. The wire limit remains 16 KiB.

In the Plugins dashboard, Add plugin generates a stable installation identity, then opens the same source setup operation. The owner enters the HTTPS directory, metadata filename, publisher identity/public key, trust expiry and any feed credential. Changing publisher details requires distinct trust confirmation and replaces the publisher list with that key while retaining all revocations. Existing installations expose Configure release source for settings and credential rotation. Credential inputs are cleared before submission and excluded from Redux, browser storage and ordinary errors. Changed source revisions require an explicit status refresh before saving. Retry this installation recovers only the original failed installation after checking current source readiness. During recovery the dashboard shows that retained release's identity, permissions and processing locations even if a different configured release has been inspected; reconnect only reads the retained operation. Release activation still requires separate permission acceptance, and paid-capacity approval remains a separate plugin operation.

The dashboard's Choose another release controls (under Details in a plugin's drawer) inspect the configured release, show its version/permissions and size, stage exact bytes, and require a separate permission acceptance and activation action. Installation progress is restored from the server after reconnect. Source/trust entry is available through terminal, the dashboard and direct-owner HTTP. Provider credential setup, nonbillable preflight and paid proposal approval remain separate from these release-feed operations.

Guided terminal installation​

After local system-service setup, run skulk-plugin-service install-plugin in the nonroot owner's interactive terminal. It generates an installation identity and prints a resume command before registration. Supply the trusted HTTPS directory, metadata filename (default release.json), publisher ID, Ed25519 public key and timezone-aware trust expiry. Confirm publisher trust separately, then enter the optional feed bearer through hidden terminal input. Credentials are never accepted as arguments, printed or included in retained operation identifiers.

The command displays verified release compatibility, exact digest, size, expiry and permissions. Download requires explicit confirmation; starting the plugin owner requires separate permission acceptance. Both use the existing revision-fenced manager operations. Plugin configuration, nonbillable preflight, capability-node enablement and paid approval remain separate plugin operations, available through the plugin's documented terminal commands or the Plugins dashboard.

After disconnect or an uncertain response, run the printed skulk-plugin-service install-plugin MANAGED_ID command. It retains configured trust and credentials, reads accepted installation/activation status, and never automatically resubmits an effect. Interrupted downloads require explicit recovery consent under their original operation ID. An unrelated or failed lifecycle transition requires explicit lifecycle inspection/recovery; it is not replaced. A newer release at the configured source is reviewed, staged beside the selected one and, after explicit consent, activated over it under the selection revision; an older release at the source is a rollback, refused before any transfer, since rollback is an explicit lifecycle operation. Polling is bounded; exiting the terminal leaves manager-owned work running. The command accepts at most one installation ID and no executable, path or provider command. The existing typed-JSON manage interface remains available for automation, source rotation and advanced lifecycle operations.

Stable local manager runtime​

Managed capability installation accepts runtime envelopes 2 and 3. The release inspection, stage and activation routes retain their existing methods, parameters, authentication and explicit consent flow. V3's signed metadata adds application_roots, one to eight unique canonical distribution names contained in the exact wheel inventory. Before installation, the host verifies the complete dependency graph from those roots and launcher-provider wheels; it refuses missing, incompatible, URL/extra-dependent or undeclared packages without contacting an index. Existing v2 releases retain their signed shape and behavior. A host outside the declared protocol window returns the authenticated update-or-select-another- release diagnostic; a compatible reader must be deployed before publishing v3.

The local setup implementation stages a separate service copy through stage_service_runtime(root) and selects it through activate_service_runtime(root, snapshot). These are owner-local setup functions, not HTTP operations; callers do not submit executable or dependency paths through management APIs. Preparation copies the exact installed dependency files, effective Skulk code, native bindings and required declarative resources. It resolves no new dependencies and does not modify the existing Skulk environment. Unknown editable startup hooks and external links are refused rather than borrowed silently.

A complete staged record contains the generation, manifest digest, qualified core digest, copied file count and byte count. An interrupted copy retains its incomplete directory without changing the selected service runtime. Activation requires a stopped manager and preserves plugin installation/configuration and cleanup state. The copied bootstrap runs with -I -S -B and verifies file bytes, permissions, membership and interpreter identity before Python site initialization or manager imports. The manager receives its explicit service state root; stored credentials and ordinary Skulk configuration are not copied into this runtime.

The local setup command below uses this packaging primitive for existing supported isolated Skulk Python environments. Real system-service/reboot qualification on both release platforms remains an acceptance gate.

Automatic local transport attachment​

Skulk currently generates a new transport identity on each process start. Local setup records may include manager_root and profile_id together; the installation must be exactly that manager's installations/<plugin_id>. These protected local fields are never accepted from HTTP callers. Legacy records without them retain manual attachment behavior until migrated by local setup.

The in-process adapters share one process-lifetime attachment.lock. Their internal attach socket request contains the provisioned profile_id, the actual live transport_node_id, the measured live skulk_build_sha256 and, once seen, the node's Tailscale address as serve_host. The manager refuses foreign profiles, competing bridge lifetimes, missing bridge ownership and a live core build different from its independently installed core. A manager's own build measurement alone is not evidence of compatibility with the live API process. This operation is local lifecycle metadata, not a remote operator grant or provider submission; no new cleanup pairing or enrollment protocol is involved.

Renewal stops affected owners, acquires controller/service/child fences, journals the exact old/new attachment, and replaces only transport metadata. Durable plugin IDs, selected generations, configuration revisions, receipts and approval reservations remain unchanged. Startup completes interrupted journaled writes before loading any owner. A foreign installation binding is refused before stopping healthy owners. An incomplete write exposes attachment_recovery_required until local recovery succeeds. Disconnect does not cancel accepted local renewal. API shutdown releases its attachment fence without terminating independent cleanup services.

The serve address tells plugin owners where their capabilities may serve besides loopback. The API process reads it from tailscale status in the background, at most once a minute, so an attachment never waits on it; until the first answer the request omits the field and the manager keeps the address its installations already have. An address stays once seen: a failed or slow query never withdraws it, and only a different address replaces it. When the address changes, the manager stops the owners, writes an owner-only serve.json ({"serve_host": "<address>"}) into each installation, records the same value at its own root last, and starts the owners again, so an interrupted write is finished by the next attachment. Before any owner starts, the manager also brings that installation's serve.json to the recorded address, so a newly registered installation receives it and an installation whose write was interrupted is repaired. The file sits beside owner.json rather than inside it because owners parse owner.json strictly; an owner built before the setting never reads serve.json, and neither does a manager built before it.

Local plugin service setup​

The plugin manager runs as a service of its own, so it stays available while a plugin is disabled, broken or being upgraded. By default it is a per-user service with the same lifetime as the Skulk node itself, and registering it needs no elevation: the node sets it up the first time capabilities are used, through POST /v1/plugins/managed/service/setup (the dashboard's Plugins page does this), or the owner runs skulk-plugin-service setup. From a source environment the equivalent is python -m skulk.extensions.service_setup setup. Either way setup runs as the nonroot Skulk owner and never under sudo. Rerunning setup keeps the scope a host already uses.

skulk-plugin-service setup --system instead registers a system service that also runs with nobody logged in, for hosts that run unattended. It invokes a fixed standard-library-only local helper through sudo for parent-directory provisioning and OS registration; runtime copying, activation, configuration and all manager/plugin processes still execute as the existing owner. No HTTP route invokes this helper, supplies unit contents or accepts an executable.

The command creates an independent verified manager runtime, a generated local profile ID, protected setup operations and SKULK_CONFIG_HOME/managed-service/connection.json. Internal paths and IDs are generated. The connection lives in a private subdirectory; existing non-writable-by-others Skulk configuration directory permissions are preserved. One service is associated with one Skulk configuration per OS account; a different configuration is refused without adopting or rewriting its binding. The base Python installation and existing Skulk configuration must live outside Git checkouts and remain available after boot.

Scope and platformDurable service rootRegistration
User, Apple Silicon macOS~/Library/Application Support/Skulk/plugin-service~/Library/LaunchAgents/foundation.foxlight.skulk.plugins.plist, a launchd agent in the owner's gui/<uid> domain (the domain Skulk's own agent uses)
User, Linux with a running systemd (any architecture)$XDG_STATE_HOME/skulk/plugin-service (default ~/.local/state/skulk/plugin-service)$XDG_CONFIG_HOME/systemd/user/foundation.foxlight.skulk.plugins.service (default under ~/.config), a systemd user unit wanted by default.target; it starts with the user's session, or at boot when lingering is enabled, like Skulk's own user unit
System, Apple Silicon macOS/Library/Application Support/SkulkPluginServices/<uid>/Library/LaunchDaemons/foundation.foxlight.skulk.plugins.u<uid>.plist, using the system domain and a nonroot UserName
System, Linux with a running systemd (any architecture)/var/lib/skulk-plugin-services/<uid>/etc/systemd/system/foundation.foxlight.skulk.plugins.u<uid>.service, using a nonroot numeric User and multi-user.target

A user-scope definition must belong to the owner and not be writable by others; a system definition must belong to root. Both macOS scopes use launchd Interactive scheduling. The manager owns interactive inference and management; its owners, children and bounded schema workers must not inherit background CPU/I/O throttling. Existing macOS services adopt this policy when setup is rerun after upgrading Skulk. Setup accepts the exact previously generated Background definition for this migration; changed accounts, paths, environment or other unit fields remain refused.

Setup copies the node's own Python environment, which must be dedicated to Skulk: a virtual environment, or a packaged runtime whose interpreter prefix holds skulk-packaged-runtime.json (the packaged apps ship a relocatable interpreter with Skulk in its own site-packages, since an app bundle can be moved). On macOS, setup refuses an app running from a translocated location (opened straight from a download) and asks for it to be moved to Applications first. When a user service stops answering because the interpreter it starts was replaced or moved, for example by an app update, the node registers it again once, the next time the status route is read (the Plugins page reads it while open); the route then reports setting_up with purpose: "update". Setup refuses to start when the volume lacks room for the copy (it names the space needed), a copy that fails removes its copied runtime, and SKULK_EXTENSIONS_DISABLE=1 makes the status unsupported and setup refuse.

After a Skulk update, the node finds that its manager runs the previous build and brings it to the new one by itself: it copies a matching runtime from its own environment (about as long as the first setup's copy), asks the manager to restart on it, and, when the service cannot start the new interpreter, registers it again as above. Installed plugins and their settings are kept. The status route reports this whole window as setting_up with purpose: "update", and the Plugins page shows it on every tab and continues by itself once the manager is back, instead of reporting the inventory as unavailable.

Setup records a generated operation_id and phases preparing, staged, selected, registered, ready. The service verifies the digest of every file of its copied runtime before the manager starts, so the first start after setup or a Skulk update can take a few minutes; setup waits up to ten minutes for it to answer. Rerunning after interruption reuses the exact completed staged copy and generated profile. A changed source core, Python or dependency inventory starts a new setup operation, including when a corrected build replaces failed setup. Prior operations, runtime generations and the generated profile remain retained. Preparation does not stop the existing manager. Activation stops only its fixed service, verifies the copied runtime again, preserves the latest transport attachment, and starts the registered service. An unrelated definition occupying the reserved service name is refused. The exact earlier Linux unit with a quoted working directory is recognized for repair; setup replaces it with systemd's literal absolute-path form. No provider request, credential provisioning, approval or implicit enable occurs.

skulk-plugin-service status reports the last setup phase separately from current registered_runtime_verified and management_available. An old ready phase is historical completion, not current service health. Corrective error codes are registration_or_integrity_unavailable and service_unavailable; rerun the same local setup command using its qualified environment after correcting OS access or runtime integrity. When setup's readiness wait expires after successful registration, the command exits with status 1 and prints JSON containing the retained operation_id, phase: "registered" and error_code: "service_readiness_pending". Registration is preserved. Inspect skulk-plugin-service status; when both registered_runtime_verified and management_available are true, rerunning setup in the same qualified environment verifies the binding, selected runtime and fixed OS definition, then completes the original operation without elevation, restaging or restarting the healthy service. A healthy completed setup also needs no elevation. Status itself remains read-only. A different source environment still requests a new runtime generation; an invalid registration follows the privileged repair path. Root-owned unit definitions have fixed arguments; service output is not a channel for private plugin diagnostics. Protected plugin evidence remains host-local.

System services start after OS boot and disk unlock; setup does not bypass encryption authentication. Apple's launchd guidance distinguishes system daemons from login-session agents. Linux uses the systemd service and process-lifetime contracts. The running API discovers the local service and installed runtimes without a restart. Use the Plugins dashboard or the managed-plugin HTTP routes above to inspect releases, install them, and observe retained operation status.

Capability-node preflight​

GET /v1/plugins/{plugin_id}/nodes/{node_id}/preflight runs the installed plugin's bounded, nonbillable setup checks. Path parameters select an exact installed plugin and persistent node; there is no request body or command/path input. Requires direct owner administration or the explicit plugins:read grant. Inventory preflightAvailable indicates support. Disabled or failed children may be checked while their management provider remains available.

The response contains nodeId, configuration revision, schemaDigest, valuesDigest, optional credentialRevision, observedAt in UTC seconds, and checks (one to 32 distinct code, passed, correctiveAction records). No credentials or protected host evidence are returned. The response uses Cache-Control: no-store; unknown/unsupported management returns 404, refused observations 409, capacity exhaustion 429, unavailable providers 503 and timeout 504. Responses are bounded to 64 KiB and calls share the plugin-management concurrency and deadline limits.

A check may create and remove a protected local storage probe. It does not enable the node, approve spending or create paid resources. Results describe the observed configuration and are not reusable admission tokens. Supporting plugins enforce fresh preflight on enable and restart and retain fresh dispatch admission. The Plugins dashboard exposes explicit setup checks and individual corrective actions.

Capability-node public setup files​

GET /v1/plugins/{plugin_id}/nodes/{node_id}/setup reads public setup exports for an exact installed plugin and persistent node. The path parameters select that node; there are no body, query, command or executable-path parameters. Requires direct owner administration or plugins:read on direct and relay routes. Inventory setupAvailable indicates support. Disabled children can expose setup files while their management provider is available.

The response contains nodeId, observed configuration revision and schemaDigest, credentialRevision, and one to eight artifacts. Each artifact has a safe name, owner-facing title, mediaType (application/json or text/plain), and public content of at most 16,384 characters. Names must be unique; the complete response is bounded to 64 KiB and uses Cache-Control: no-store. Credential values, executable content, protected local paths and raw provider evidence must never appear in these exports.

This read cannot generate keys, replace credentials, enable a node or approve spending. Revisions describe an observation, not a lock against later changes; providers must revalidate bindings at enable and dispatch. Unsupported providers or missing selections return 404. Refused operations and invalid responses return 409, unavailable providers return 503, exhausted admission returns 429, and the shared bounded management deadline returns 504. Errors suppress private exception text. The Plugins dashboard fetches files only on an explicit action, downloads them as inert text, and hides an earlier export after a failed refresh.

Installed plugin local setup command​

skulk-plugin-service setup-plugin <managed-plugin-id> -- <plugin-setup-fields> executes the selected verified generation's setup launcher: the archive's optional fixed __setup__.py, or the setup entry a signed wheel declares under skulk.capability_runtime. The managed plugin ID is the same ID shown by inventory. Installation roots and runtime paths resolve from the protected local service connection, never from caller-supplied executable or module paths. No new HTTP endpoint is introduced: this command is an explicit local owner operation, unavailable to remote grants.

The launcher requires a nonroot owner, matching local service profile, retained release/trust history and a selected intact compatible runtime. Disabled selection is allowed for setup. Pending selection recovery, missing entrypoints, tampered bytes or invalid signatures refuse execution. The plugin owns setup field parsing and credential prompts; secrets must be supplied interactively or over protected stdin rather than argv. At most 128 fields and 16 KiB of UTF-8 argument bytes are accepted. Normal terminal input, output and interrupt behavior are preserved.

The installed-runtime lock is inherited through process replacement and released at setup exit. Other runtime activation/staging attempts report contention while it is held. Existing services remain supervised; this launcher does not change configuration, credentials or lifecycle state itself. Each plugin must document and qualify the effects of its own setup entrypoint, including any explicit local privileged registration. The public API setup-file export remains a separate, read-scoped operation.

Capability-node nonbillable setup operations​

An optional installed owner facet exposes fixed setup actions independently of child readiness. Credentials use the existing write-only credential endpoints; setup forms contain ordinary external inputs. These operations do not enable a node, approve spending, or replay uncertain provider submissions.

Method and pathParameters and behavior
GET /v1/plugins/host-networkNo parameters. Requires plugins:read or direct owner authority, including the existing origin and transport checks. Returns the live local nodeId, public networkVersion, domain-separated namespaceFingerprint, numeric control TCP endpoints (host, port), dataTransport (gossipsub or zenoh) and Zenoh data endpoints (empty for gossipsub; the numeric TCP socket under each mutual-TLS tls/ listener, so a peer attaching through a tunnel must hold the same cluster key). Ports come from running native listeners, including OS-assigned ports. The fingerprint is SHA-256 of UTF-8 skulk-host-attachment-v1 + NUL + the version/namespace token, distinct from the routing namespace; no raw namespace or credentials are returned. Responses are Cache-Control: no-store; unavailable or unsupported TCP listeners return 503, concurrency saturation 429. The read has a two-second deadline. This reports addresses local to the serving host, not endpoints guaranteed reachable remotely. A plugin may use its owned secure transport to connect matching peers; the route never dials, changes configuration, restarts the node, or approves acquisition.
GET /v1/plugins/{plugin_id}/nodes/{node_id}/setup-actionsExact installation/node IDs. Returns nodeId, configuration revision/schemaDigest, credentialRevision/credentialSchemaDigest, up to eight installed actions and 32 retained operations. Each action has actionId, title, description, ordinary parametersSchema, schemaDigest, and requiresApproval (default false). Requires plugins:read or direct owner authority. Does not initialize state or perform setup.
POST /v1/plugins/{plugin_id}/nodes/{node_id}/setup-operationsBody: operationId (32 lowercase hexadecimal characters), actionId, values, expectedRevision, expectedSchemaDigest, expectedCredentialRevision, expectedCredentialSchemaDigest, expectedActionSchemaDigest, expectedRequiresApproval (default false; must match the installed action). Encoded intent is bounded to 16 KiB. Requires plugins:manage and, for an action declaring requiresApproval, plugins:approve, or direct owner authority. The provider reserves exact intent durably before background work and returns promptly.
GET /v1/plugins/{plugin_id}/nodes/{node_id}/setup-operations/{operation_id}Exact retained operation ID. Returns last durable progress without waiting for setup completion. Requires plugins:read or direct owner authority.
POST /v1/plugins/{plugin_id}/nodes/{node_id}/setup-operations/{operation_id}/resumeExact retained operation ID; no body or an empty object. Replacement fields are rejected. Revalidates prerequisites and resumes the original accepted intent. Requires plugins:manage and also plugins:approve when either the retained intent or current action requires approval access, or direct owner authority.

Progress contains operationId, nodeId, actionId, retained requiresApproval, phase (queued, running, complete, failed), optional safe code and correctiveAction. Completion means setup finished, not that preflight passed. Run preflight and the separate enable operation afterward. Providers retain enough journal state to reconcile owner restarts and deduplicate exact intents. Conflicting IDs or revision/schema changes are refused. A lost start response must be reconciled through the same operation ID or retained list; reconnect never automatically resubmits. Raw failures and credential values are excluded. Damaged state must preserve disable/management and refuse unsafe admission rather than create replacement identities or credentials.

Approval access for setup permits protected preparation only; signing a paid proposal still requires its distinct review and approval action. Existing setup actions default to management-only access. An action upgrade cannot downgrade the original operation’s retained authorization requirement. Missing or revoked scope returns 403 on direct and relay routes before setup effects.

Responses use Cache-Control: no-store. Missing facets/nodes return 404; malformed requests return safe 422; conflicting/refused setup returns 409 when the provider reports a validation refusal; busy dispatch returns 429; unavailable management or timeouts return 503/504. A timeout does not prove setup was rejected. The same explicit scopes apply through paired-operator relay routes. All nonbillable setup work remains in the plugin owner; core accepts no commands or executable paths.

The Plugins dashboard renders supported ordinary forms from this contract and polls retained progress while open. Drafts retain their observed revision fences; changed prerequisites require an explicit reload. Failed reads mark observations stale and disable actions. Failed operations can be explicitly resumed by ID. Closing or reopening the panel does not cancel or repeat server-owned setup.

Installed plugin terminal command​

skulk-plugin-service catalog reads the host's configured signed catalog in an owner terminal and prints the same review the /v1/plugins/managed/catalog route returns. A refused read exits nonzero and prints the same sentence the route answers with 409, such as an unreachable or unconfigured catalog; the guided installer below names catalog refusals the same way. A host whose build includes the built-in capability store reads that store with nothing to configure. A private catalog's address and discovery trust are configured through the configure_catalog manager request (skulk-plugin-service manage with a configure_catalog document, or the owner-only POST /v1/plugins/managed/catalog/source), and the use_builtin_catalog request (or the owner-only POST /v1/plugins/managed/catalog/source/builtin) returns the host to the built-in store.

The managed release inspection, installation and recovery endpoints accept legacy runtime envelope 2 / release envelope 1 and native runtime envelope 3 / release envelope 2. Native records retain exact canonical protocol-five manifests, full public-kernel profile identities and pinned native binaries; their signatures and generation digests use skulk.runtime/3\0. Installation repeats native-reader identity checks in the fresh offline runtime before completion. Staging does not activate the capability or migrate its protected state. Runtime envelope 4 adds an explicit control_profile: "skulk.calls/1", all six public kernel 0.6.0rc1 profile fingerprints, exact native wheel bytes, and the separate skulk.runtime/4\0 signature/digest domain. The installed interpreter must verify all six fingerprints and the compiled call codec before completion. The bounded migration window accepts runtime envelopes 2, 3 and 4; existing signed closures and signature bytes remain unchanged. Reader compatibility never authorizes changing an issued generation's binary. Ordinary selection/activation refuses a change between legacy, native transport and native calls interpretations, or different profile fingerprints, even when state/schema labels match. Such a transition requires separately qualified explicit state migration. Existing disable and recovery remain available. Native call startup does not make native capabilities invocable or delegable. Catalog consent, installed inventory and exact contract reads unwrap the native manifest for both runtime envelopes 3 and 4 while retaining full descriptor IDs.

skulk-plugin-service install-plugin --from-catalog BUNDLE_ID [--sequence N] [--platform FAMILY] [MANAGED_ID] installs a listed release. The terminal reads the catalog, picks the newest listing of the bundle that fits this host (or the named sequence, or the named artifact family; a listing without an artifact family is not installable on a host, which installs signed runtime records only; two artifacts at one sequence must be told apart with --platform), prints the listing as consent facts and the resume command, and asks whether to bind the installation to the listed feed and publisher. With consent the manager configures the installation's source from the listing (the same binding as the owner-only POST /v1/plugins/managed/catalog/install), inspects the release record and checks it is the one listed; the release is then reviewed, staged and activated through the same prompts as an ordinary installation. Later runs of the plain install-plugin MANAGED_ID resume and upgrade on the bound source.

skulk-plugin-service manage-plugin MANAGED_ID -- PLUGIN_ARGUMENTS is a local terminal command, not an HTTP route. It verifies the protected service profile, selected signed runtime, qualified host and retained trust before executing the management launcher, the archive's fixed optional __manage__.py or the manage entry a signed wheel declares under skulk.capability_runtime. Paths and module names cannot be supplied. The generation fence and terminal I/O survive process replacement; the plugin supplies fixed management verbs and derives its durable state coordinates. Local setup and management wait up to 30 seconds for installation ownership before executing anything. A timeout or selection change refuses the command; this wait does not retry plugin execution or any accepted operation. Neither this command nor generic management grants mint paid approval. The existing skulk-plugin-service manage installation-manager interface is unchanged.

Uninstall a managed plugin while retaining cleanup​

The terminal manager and POST /v1/plugins/managed/installations/{plugin_id}/operations accept action: "uninstall" with the reviewed expected_revision and a new 32-character hexadecimal operation_id. It requires the same plugins:manage authority as disable. No runtime digest, rollback flag or permission acceptance is accepted for withdrawal. For example, send this JSON to skulk-plugin-service manage:

{"action":"submit","plugin_id":"managed.example","request":{"operation_id":"d083ef35f295414188bd7cdb699454f84","action":"uninstall","expected_revision":2}}

Use operation with the same plugin and operation identifiers to read completion; retrying the original request returns its retained result. Browser reconnects also read that result without submitting another operation. In Plugins, a plugin's Uninstall (in its drawer, or Uninstall plugin… in its card menu) invokes this same operation, and Stop plugin submits disable.

Uninstall stops the plugin owner and withdraws future capabilities and acquisition. It retains the installation registration, verified runtime generations, configuration, identities, credentials and receipt history. Independently supervised cleanup remains outside its process ownership. This is not a data purge or proof of provider absence; inspect the plugin's cleanup status separately. Inventory (GET /v1/plugins/managed) reports uninstalled: true from the published uninstall operation, even after manager restart or while a replacement operation is pending. Failed downloads or activation attempts cannot silently reinstall it. A later successful verified select or activate explicitly reinstalls the retained installation. Disable is refused while uninstalled. Uninstall can withdraw a stalled activation or selection, including an invalid release, but cannot replace live work or another pending withdrawal.

Extension Capabilities​

Protocol-4 managed owners participate in the same discovery and stream routes as in-process extensions, including server streaming, client streaming and bidirectional calls. Managed streaming admission/headers have a 64 KiB local limit and raw inline media a 1 MiB per-frame limit, with one active invocation per child and one deadline capped at 300 seconds. Input completion half-closes input. Output completion waits for child cleanup and owner acknowledgment; cancellation or broken IPC triggers child supervision without replay. Older unary owners retain their existing behavior. See Managed streaming transport.

Providers with a dynamic readiness facet appear in capability discovery only while ready. A cached descriptor does not grant continued admission: new unary and streaming calls to an unavailable capability return typed not_found. Readiness is rechecked after asynchronous stream admission. Already admitted calls retain their normal deadline and cancellation behavior.

Cached empty-input unary metadata can declare skulk.admission=metadata with supporting managed SDK owners. One separate metadata slot remains available while stream media is active; the primary control wire stays serialized with health. Core does not queue these reads behind generation or cache old availability. Readiness, descriptor identity, caller deadlines and capability authorization still apply. Workload admission remains fail-fast. Older owners treat the annotation as ordinary unary admission; capabilities must pin a supporting owner.

List a node's served capabilities​

GET /v1/capabilities
GET /v1/capabilities?node_id=<id>

Returns the self-describing capability descriptors served by a node's provider extensions (see Extensions). Without node_id it describes the node serving the request; with a peer's node_id it proxies that peer's describe surface (empty when the peer is unreachable). Each descriptor carries the capability id, semantic version, a human/LLM-readable description, JSON Schemas for input and output, the call's I/O mode, and the response maps each id@version to a content revision digest so callers can pin the exact shape they discovered. Production nodes also include first-party provider descriptors, including the mounted-model speech providers and stable vad@1.0.0, so descriptor presence alone is not always a liveness claim. Extensions consume this through describe_node; the light discovery layer (which nodes offer which capability tag) rides the telemetry plane and appears as nodeCapabilities in GET /state.

Invoke a capability on this node​

POST /v1/capabilities/call

Dispatch one unary capability call to this node's provider extensions. The body is the typed call envelope: call_id, capability_id, exact version, the descriptor_revision pinned at discovery, caller_node, target_node, timeout_seconds, and the opaque payload. The payload is validated against the descriptor's input schema before the provider runs, the result against its output schema after, and payloads are capped at 1 MiB in each direction. A syntactically valid envelope always gets HTTP 200 with a typed result (call_id, ok, result, error); failures arrive as machine-readable codes (not_found, version_mismatch, revision_mismatch, invalid_payload, invalid_result, payload_too_large, overloaded, timeout, provider_error), so callers switch on error.code rather than transport status. A body that does not parse as the envelope at all (malformed JSON, missing fields, out-of-range values) gets the standard 422, since there is no call id to correlate a typed result to. Extensions normally use this through their context's call_capability rather than calling the endpoint directly.

Open a streaming capability on this node​

POST /v1/capabilities/stream

This is the control-sized node-to-node opening verb for a provider descriptor whose io_mode is server_streaming, client_streaming, or bidirectional. The request body is the same pinned CapabilityCall envelope used by unary calls. Skulk checks target identity, handler/version/revision, the 1 MiB request limit, the descriptor's input schema, the per-node stream concurrency bound, and the single deadline budget. Providers may then perform dynamic admission, such as checking that a requested model is mounted and healthy, inside those same bounds and before lifecycle creation. It then returns a typed CapabilityResult: ok: true with {"admitted": true, "io_mode": "..."} means the stream was admitted; a pre-admission rejection uses the same typed call errors as the unary endpoint and creates no stream.

Output is not an HTTP response stream. After admission, the provider emits started, ordered chunk frames, and exactly one completed, failed, or cancelled terminal on the provider DATA topic. The handler must return after yielding that terminal; Skulk withholds it until iterator exhaustion so handler cleanup finishes before dependent calls can observe completion. Malformed or trailing handler output closes a closable iterator before Skulk publishes its synthetic failure terminal. Structured frame metadata is JSON-schema validated against output_chunk_schema; realtime media is an optional raw binary attachment capped at 1 MiB per frame, while large immutable results use staged blob references. The topic is node-addressed to caller_node, short-circuits same-node calls, and uses the DATA plane's bounded per-owner/call/direction Zenoh queues for remote calls. Extensions consume the flow through ExtensionContext.stream_capability(...), which returns a CapabilityStreamSession containing the typed opening result, one output iterator, and an input sink only for client-streaming/bidirectional calls. input.send_chunk() moves structured metadata plus optional raw media to the provider; input.complete() half-closes caller input without closing provider output. Input cancellation, invalid schema, unresolved sequence gaps, and queue pressure produce a typed terminal for only that call.

Cancel an admitted capability stream​

POST /v1/capabilities/stream/cancel

Accepts call_id, caller_node, target_node, and an optional cancellation message. Only the caller identity that opened the active stream can cancel it. Cancellation is idempotent: an active handler is cancelled and emits one typed cancelled terminal; an already-terminal or unknown call returns {"cancelled": false}. stream_capability sends this request automatically when its iterator closes before a terminal frame.

Stream speech through the built-in TTS provider​

Production nodes describe a first-party tts@1.0.0 server-streaming capability. It is a facade over core mlx_audio serving, not a second model runtime: the provider translates the generic call into the existing mounted model SpeechSynthesis command and translates AudioChunk output into raw binary provider media frames.

Its payload accepts:

FieldTypeMeaning
modelstringRequired mounted TTS model id
textstringRequired non-empty text to synthesize
response_formatstringOptional; only mp3 is accepted in version 1
voicestringOptional model-specific voice
streaming_intervalnumberOptional positive generation cadence hint
speed, instruct, lang_codemodel-specificOptional speech controls
temperature, top_p, repetition_penaltynumberOptional model-specific sampling controls
top_k, max_tokens, seedintegerOptional model-specific sampling controls; seed must be unsigned 32-bit

Each chunk payload reports model, format: "mp3", chunk_index, is_partial, and optional sample_rate; the MP3 bytes are carried beside it as an InlineMediaAttachment with media_type: "audio/mpeg".

The descriptor is always available for contract discovery, while the tts telemetry tag is advertised when at least one eligible model is mounted and every routable instance of an eligible model has a ready runner. Dynamic admission rechecks the requested model before started. A caller cancellation propagates to the underlying synthesis command.

Transcribe a bounded clip through the built-in STT provider​

Production nodes describe a first-party stt@1.0.0 client-streaming capability and advertise its stt telemetry tag while a ready, single-host STT runner is mounted. The operation is batch inference: client streaming is used only so encoded audio remains binary provider media instead of base64 in the unary JSON envelope.

The opening payload requires model and optionally accepts filename, content_type, language, prompt, temperature, max_tokens, chunk_duration, frame_threshold, context, prefill_step_size, text, word_timestamps, and timestamp_granularities. Send the complete clip as one or more ordered InlineMediaAttachment values, each at most 1 MiB and at most 25 MiB in aggregate, then call the input sink's complete() method. Empty, oversized, cancelled, or non-inline input fails only that provider call.

After input half-close, Skulk runs the existing mounted-model AudioTranscription path. The provider emits no partial transcript chunks; its single completed payload contains model, text, and optional language and segments. Managed blob references are not accepted until Skulk has a general immutable blob service.

Transcribe realtime PCM through the built-in STT provider​

Production nodes also describe a first-party stt.realtime@1.0.0 bidirectional capability. It is advertised only when eligible mounted capacity is ready and reachable. The owning API may differ from the speech runner node: same-node input short-circuits locally, while remote input requires the node-addressed Zenoh data plane. Remote capacity is not advertised when Zenoh is unavailable.

The opening payload accepts:

FieldTypeMeaning
modelstringRequired mounted realtime STT model id
sample_rateintegerInput PCM sample rate from 8000 through 96000 Hz
temperaturenumberOptional decode temperature; defaults to 0
transcription_delay_msintegerOptional upstream cadence from 80 through 2400 ms, in 80 ms steps; defaults to 480

Each caller chunk must carry an InlineMediaAttachment containing mono, signed little-endian 16-bit PCM. Its payload and attachment metadata must agree on format: "pcm_s16le", sample_rate, and channels: 1. The input sink's complete() method half-closes audio input and lets final decoding finish. Provider output chunk frames contain model, transcript text, and is_partial: true; the completed payload contains the accumulated final text with is_partial: false. Skulk withholds that terminal until core cleanup has sent TaskFinished and replicated state reports the task terminal or deleted, so a following turn cannot be rejected against stale busy state.

Admission pins a RealtimeAudioTranscription task to one selected single-host model instance, and the master reserves that instance against concurrent admission. Audio bypasses event-sourced State and travels through bounded raw PCM packets to the serving worker plus a bounded worker-to-runner channel; only transcript output uses the existing core DATA lifecycle. The mounted upstream model must expose a true create_streaming_session interface. Batch STT cards are never promoted to realtime by buffering a complete recording.

Detect speech turns through the built-in VAD provider​

Every production API advertises vad@1.0.0. Open a bidirectional capability stream with sample_rate set to 8000, 16000, 32000, or 48000 and send ordered mono pcm_s16le inline media. Optional settings are aggressiveness (0-3), frame_ms (10, 20, or 30), minimum_speech_ms, silence_hangover_ms, preroll_ms, and maximum_utterance_ms; the descriptor publishes their exact bounds. Output chunks contain event (speech_started or speech_stopped), timestamp_ms, reason, and preroll_ms. The completed payload reports the turn count. Input must end on an exact classifier-frame boundary. Media is processed within the call and is not retained.

Realtime transcription WebSocket compatibility edge​

WS /v1/realtime?model=<mounted-realtime-stt-model>

This transcription-only WebSocket is an API-edge adapter over the same stt.realtime@1.0.0 provider described above. It does not own model placement, runner sessions, or a second speech implementation. The API node accepting the socket owns the provider call, which may select a speech runner on another node. The same truthful-card, runner-readiness, and Zenoh remote-capacity gates apply. OpenAPI does not model WebSocket operations, so this manual section is the normative edge contract; the underlying provider opening remains represented by the documented HTTP capability endpoints.

The wire contract implements a bounded subset of OpenAI Realtime transcription:

DirectionEventBehavior
server to clientsession.createdReports a type: transcription session with the selected model and fixed PCM input configuration.
client to serversession.updateConfirms the current nested audio.input configuration. turn_detection may be null or a bounded server_vad configuration. Optional response selects a mounted chat model, optional mounted tts_model, optional voice, max_output_tokens from 1 through 4096 (default 256), and enable_thinking (default false); attempts to change the input model/codec, enable noise reduction/language hints, or add unsupported fields are rejected.
server to clientsession.updatedConfirms an accepted current session update.
client to serverinput_audio_buffer.appendAppends one base64 PCM16 frame and immediately forwards its decoded bytes as binary Fabric media.
client to serverinput_audio_buffer.commitHalf-closes the current utterance and triggers final provider drain. Empty commits and duplicate manual commits are rejected. A manual commit racing after server VAD has already auto-committed the same utterance is an idempotent no-op. The next turn may begin after its completed event.
server to clientinput_audio_buffer.speech_startedReports the detected start timestamp and current item when server VAD is enabled.
server to clientinput_audio_buffer.speech_stoppedReports the detected end timestamp immediately before server VAD commits the utterance.
server to clientinput_audio_buffer.committedConfirms the input half-close.
server to clientconversation.item.input_audio_transcription.deltaCarries one provider transcript delta after commit.
server to clientconversation.item.input_audio_transcription.completedCarries the accumulated final transcript, completes the current item, and leaves the socket ready for another turn.
server to clientconversation.item.input_audio_transcription.failedCarries a provider/transport/cancellation terminal failure.
server to clientresponse.createdAnnounces automatic assistant work after a final transcript when session.response is configured.
server to clientresponse.output_text.delta / response.output_text.doneStreams visible assistant text and its bounded final value. Reasoning tokens and tool calls are not exposed or synthesized.
server to clientresponse.audio.delta / response.audio.doneStreams base64 MP3 chunks from the selected mounted tts_model.
client to serverresponse.cancelCancels active model generation or TTS. New speech detected by server VAD performs the same cancellation before starting the next turn.
server to clientresponse.doneTerminates one assistant response with completed, cancelled, or failed status.
server to clienterrorReports invalid client events, unsupported configuration, or response failures. Policy and transport errors may close the socket; response failures are non-terminal to the socket and are followed by response.done.

Version 1 accepts JSON text WebSocket messages and base64-encoded mono, signed little-endian PCM16 at 24 kHz. A decoded audio frame is capped at 1 MiB, the encoded WebSocket event at 2 MiB, and one session at 64 MiB of decoded audio. Provider transcript text is capped at 1 MiB per event and in the pre-commit buffer; overflow emits a typed transcription failure and closes the socket with 1011. input_audio_buffer.clear is deliberately unsupported because the API forwards audio incrementally and retains no replay buffer that could safely retract already-delivered media. Browser connections must be same-origin; SDK clients without an Origin header remain supported.

turn_detection: {"type":"server_vad"} enables server-owned WebRTC VAD. Optional settings are aggressiveness (0-3), prefix_padding_ms (0-2000), silence_duration_ms (20-5000), minimum_speech_ms (20-5000), and maximum_utterance_ms (100-120000). The edge incrementally resamples the 24 kHz input to the classifier's 16 kHz frame contract, emits typed speech boundaries, and commits on silence or the maximum utterance duration. The edge forwards VAD-enabled input in 20 ms source-rate slices and stops at the detected boundary, so the unprocessed remainder of a large append cannot leak into the committed utterance. The socket serializes turns: each utterance opens one bounded Fabric provider call, and audio appended while a committed turn is still draining receives a non-terminal turn_in_progress error. Completed turns rotate item_id, link the next commit through previous_item_id, reset VAD state, and release their provider capacity. The 64 MiB decoded-audio bound applies across the complete WebSocket session.

The dashboard chat microphone uses this edge only when both the selected model declares streaming/realtime audio and the API node currently advertises the stable stt.realtime provider. An AudioWorklet captures mono browser samples, the dashboard continuously resamples them to 24 kHz PCM16, and the client aggregates worklet callbacks into 100 ms transport frames before the mic control commits the socket when recording stops. Realtime mode can retain the socket across server-VAD turns, show partial transcripts in the editable draft, and optionally auto-send final transcripts through the same dashboard POST /v1/chat/completions flow used by typed prompts. This preserves the full dashboard conversation and its ordinary generation, cancellation, and TTS semantics; the WebSocket's optional response participant remains available to API clients but is not a second dashboard conversation. If either capability truth is absent, chat retains the batch MediaRecorder plus POST /v1/audio/transcriptions path.

When response is configured, the API node that owns the WebSocket retains the bounded text-only conversation history for that socket, routes each final transcript through the selected mounted chat model with the configured max_output_tokens ceiling. Hidden reasoning is disabled by default so the bounded budget produces speech-ready visible text; clients may opt in with enable_thinking. The edge then optionally opens a normal tts@1.0.0 Fabric provider stream for the visible final answer. Explicit response.cancel, a new non-VAD audio turn, or VAD speech detection cancels the active model/TTS command before the replacement turn proceeds. Media bytes are not added to conversation history or State.

The edge does not implement noise reduction, G.711, ephemeral session-token creation, client-created conversation items, or tool execution. Provider capacity failures close with retryable WebSocket code 1013; client protocol/policy violations use 1003, 1008, or 1009; internal provider failures use 1011. Disconnecting before a terminal event cancels the provider input and output directions.

For compatibility with clients written against the earlier transcription beta, the edge also accepts transcription_session.update with input_audio_format, input_audio_transcription, turn_detection, and input_audio_noise_reduction, replying with transcription_session.updated.

Compose a typed Fabric speech chain​

WS /v1/fabric/chains/speech?stt_model=<mounted-realtime-stt-model>

This first-class composition surface uses the same hardened event contract as /v1/realtime, but names the endpoint by its Fabric role. After session.created, send session.update to select server VAD and an optional response containing mounted model, tts_model, and voice participants plus optional bounded max_output_tokens and enable_thinking controls. Input PCM, transcript events, assistant text, TTS audio, cancellation, bounded history, and terminal status retain the contracts documented above.

The chain resolves every participant through normal mounted capability and health checks. It does not create a second runtime, persist audio or transcripts in State, perform graph search, or introduce prompt-level authority. Remote participants continue to use the normal bounded provider data plane, and socket disconnect or response.cancel reaches the active provider/model commands.

curl http://localhost:52415/v1/capabilities
{
"node_id": "12D3KooW...",
"capabilities": [
{
"id": "echo",
"version": "1.0.0",
"title": "Echo",
"description": "Returns the input text unchanged.",
"input_schema": {"type": "object", "properties": {"text": {"type": "string"}}},
"output_schema": {"type": "object"},
"io_mode": "unary",
"input_chunk_schema": null,
"output_chunk_schema": null,
"annotations": null
}
],
"revisions": {"echo@1.0.0": "5a1c9e327b6f4d08"}
}

Connectivity Endpoints​

Tailscale status​

GET /v1/connectivity/tailscale
GET /v1/connectivity/tailscale?node_id=<id>

Returns whether tailscaled is running on a node and, if so, the node's Tailscale IP, hostname, DNS name, and tailnet. All fields except running are null when tailscaled is not installed or not running.

Pass node_id to proxy the request to a specific cluster node. Omit it to query the local node directly. Returns 404 if the target node is not reachable.

Response fields:

FieldTypeDescription
runningbooleantrue when tailscaled reports BackendState == "Running"
selfIpstring | nullNode's Tailscale IPv4 address (100.x.x.x range)
hostnamestring | nullNode hostname as registered in the tailnet
dnsNamestring | nullFully-qualified Tailscale MagicDNS name, e.g. my-node.tailnet-abc.ts.net
tailnetstring | nullTailnet name derived from dnsName
versionstring | nullTailscale client version string
# Local node
curl http://localhost:52415/v1/connectivity/tailscale

# Specific cluster node
curl "http://localhost:52415/v1/connectivity/tailscale?node_id=<node-id>"

Remote access info​

GET /v1/connectivity/remote-access

Returns aggregated remote access information for the local node: LAN address, Tailscale address, and a preferredUrl (Tailscale if running, otherwise LAN). When Tailscale is running, preferredUrl uses the node's MagicDNS name (my-node.tailnet-abc.ts.net) if available, falling back to the raw 100.x.x.x IP. operatorUrl appends /operator to preferredUrl (suitable for QR code generation so mobile users land directly on the operator panel).

Response fields:

FieldTypeDescription
local.ipstring | nullPreferred LAN IPv4 address
local.portintegerAPI/dashboard port
local.urlstring | nullhttp://{ip}:{port}
tailscale.runningbooleantrue when tailscaled is connected
tailscale.ipstring | nullTailscale IPv4 address (100.x.x.x)
tailscale.dnsNamestring | nullMagicDNS fully-qualified name, e.g. my-node.tailnet-abc.ts.net
tailscale.portintegerAPI/dashboard port
tailscale.urlstring | nullhttp://{dnsName or ip}:{port} if running
preferredUrlstring | nullMagicDNS URL if available, else Tailscale IP URL, else LAN URL
operatorUrlstring | nullpreferredUrl + /operator
curl http://localhost:52415/v1/connectivity/remote-access | python3 -m json.tool

Example response when Tailscale is running with MagicDNS:

{
"local": { "ip": "192.168.1.5", "port": 52415, "url": "http://192.168.1.5:52415" },
"tailscale": {
"running": true,
"ip": "100.101.102.103",
"dnsName": "my-node.tailnet-abc.ts.net",
"port": 52415,
"url": "http://my-node.tailnet-abc.ts.net:52415"
},
"preferredUrl": "http://my-node.tailnet-abc.ts.net:52415",
"operatorUrl": "http://my-node.tailnet-abc.ts.net:52415/operator"
}

Operator App Integration​

The browser operator panel at /operator uses the same Skulk control API as the dashboard. The native Skulk App uses paired device credentials and the designated gateway, including relay transport where configured; follow Operator Device Pairing for that authenticated connection. A LAN or Tailscale dashboard URL is an address, not a pairing invitation or a grant of plugin management authority.

The following routes support direct dashboard integrations:

Node and cluster state​

EndpointDescription
GET /stateFull cluster state: nodes, instances, recent terminal instance failures, runners, memory, GPU
GET /node_idLocal node's ID
GET /node/identityNode ID, hostname, and preferred LAN IP

Remote access and connectivity​

EndpointDescription
GET /v1/connectivity/remote-accessLAN + Tailscale addresses, preferred URL, operator URL for QR
GET /v1/connectivity/tailscaleTailscale status for local node
GET /v1/connectivity/tailscale?node_id=<id>Tailscale status for a specific peer node

Node management​

EndpointDescription
POST /admin/restart?node_install_id=<id>Resolve a stable installation identity and send a restart command to its current live node

Typical direct dashboard integration workflow​

  1. Call GET /v1/connectivity/remote-access on the initially discovered node to get the preferredUrl, then use that as the base URL for subsequent calls.
  2. Poll GET /state every 5 seconds for node health (memory, GPU, temperature) and stable nodeIdentities[*].nodeInstallId values.
  3. Show restart only when the selected live node reports a stable installation identity, then call POST /admin/restart?node_install_id=<id>.
  4. On first launch or settings screen, show the operatorUrl as a QR code so users can hand it off to another device.

Helpful Next Docs​

Native SDXL metadata​

GET /v1/models entries for native SDXL additionally expose image.unetStructure: inputBlockChannels, middleBlockChannels and outputBlockChannels arrays, plus inputChannels and outputChannels. They describe the selected checkpoint's nonuniform UNet module outputs and boundary convolutions. This is intrinsic geometry, independent of GPU test coverage. Generic card dimensions count those modules and use their maximum output width; they do not imply a uniform transformer or text-cache layout.

Native image implementation provenance​

GET /state includes nodeResources.<node>.nativeImageFamilies, a map from a measured native engine build identity to its implemented image families. Installed build identities remain in engineBuilds; on-demand candidates remain separately in installableEngineBuilds. An absent map is legacy telemetry, not a hardware incompatibility claim. Placement verifies recognized package/source capability, ABI, compiled targets and memory fit. Qualification history does not restrict otherwise compatible hardware. The runner re-probes its stamped executable before load, including explicit family declarations from custom backports.

A custom native --skulk-probe response may add model_families: an array of 1–64 implemented-family identifiers, each matching [a-z][a-z0-9_]{0,63}. An omitted array inherits the recognized source's implemented families; an empty or malformed array rejects the probe. This allows an explicit backport to report its implementation while retaining the existing protocol/source and measured-executable checks. It does not replace ABI, compiled-target or resource admission.

vLLM engine installation in existing placement APIs​

GET /instance/previews and POST /place_instance use the existing placement request parameters. When a selected vLLM backend is installable but absent, their engine_install object names vllm, the affected node IDs, approximately 8 GiB of downloads, and the first-use notice. No new request flag or endpoint is needed. The worker's InstallEngine task proceeds alongside model downloads; model load waits for a verified runtime. Installation failure appears as engine_install_failed in instanceFailures; a later placement can retry.

GET /state retains the existing nodeResources contract: backends describes compatible available or installable engines, onDemandBackends distinguishes pending installation, and installableEngineBuilds binds an engine recipe available for installation. engineBuilds reports completed installed runtimes. The vLLM entry in engineMemorySettings also reports vllmMaxConcurrentRequests, the effective sequence limit stamped into placements and checked again by the worker. Native MTP workspace estimates use this limit and the selected draft depth, independently of stored weight quantization. Invalid sequence overrides retain the documented 32-request fallback. After installation, fresh telemetry removes the on-demand tags. A managed build identity includes vLLM's exact GPU build and the recipe SHA-256. Qualification records are evidence and do not limit compatible untested hardware. See The vLLM engine for installation, cache and override semantics.

Model preservation jobs​

These operator controls run on the configured model-store-owning host. The same direct loopback/trusted-fabric or authenticated operator-gateway policy protects private reads and mutations. A node without the owner returns 503 configure_model_store_on_this_host; a changed store binding requires a restart. No preservation controls are exposed on the unauthenticated store file listener. Responses contain enrolled handles and public fingerprints, not host paths or signing keys.

MethodPathParameters and behavior
GET/preservation/libraryOptional offset (default 0); up to 4 installed selections, copies and jobs (bounded for SDK wire encoding), up to 16 enrolled private destinations with availability/free space, durable default_location_id and next_offset. Installed selections may include details derived from public card semantics, attributed registry capability claims and the installed selected file paths; these display-only claims are not inserted into an owner-asserted public card. copy_details maps exact copy handles on this page to authenticated archive excerpts. Each optional description is bounded to 1,536 JSON bytes and remains a descriptive claim, separate from signed cards, byte verification, registry trust and execution permission. Missing, oversized, older-format or disconnected metadata leaves recovery available. Reads never start/replay jobs or sharing.
POST/preservation/setup/deviceExplicitly enroll Use this device private storage and its protected capture identity. No arbitrary path/key input. Repeating setup retains the identity; unavailable enrolled storage is not recreated.
POST/preservation/setup/folder/reviewTrusted-operator-only path (absolute Core-host folder, up to 4096 characters) and label (1–80 characters). Review an empty owner-only folder or one missing leaf below an existing mounted parent. Returns a ten-minute review_id, label, creates_folder, observed free_bytes and expiry; no archive/key writes.
POST/preservation/setup/folderExact review_id, confirmed: true. Recheck parent and root device/inode; create only the reviewed private leaf, enroll it, keep capture keys on Core and write only public archive-trust.json to the archive. Choose it for new copies after successful setup. Repeat confirmation identifies the same enrollment. Missing/replaced parents, foreign nonempty folders and expired reviews refuse.
POST/preservation/setup/defaultEnrolled private location_id. Select available storage for future new-copy reviews; existing copies/plans/jobs remain bound to their original destination. Never silently fall back when the selected storage disappears.
POST/preservation/planskind (preserve, check, kit_export, recover, publish, receive, mirror_import, http_share, torrent_share or peer_share), location_id; Preserve requires exact model_id + generation_id; Check requires copy_id. Plans expand required companions and expire after ten minutes. An interrupted Preserve job ID may be selected as Check's copy_id to verify its recorded expected outcome. Kit export selects copy_id; recovery selects that copy or a completed upload_id with location_id=kit. historical=true explicitly permits historical proof inspection. Recovery reviews exact members, candidate key fingerprints, original publication/file assurance and separate receiver consent requirements. Existing aliases and deletion tombstones are protected.
GET/preservation/plans/{plan_id}Read an exact retained safe plan without refreshing expiry or executing it.
POST/preservation/jobsplan_id, caller-retained operation_id, optional owner_id (default operator) and explicit consent flags. Returns 202 with a durable job immediately. Exact repeated requests return the original job; changed input refuses.
GET/preservation/jobs/{job_id}Observe one exact retained job and bounded result. Does not queue, retry or reconcile byte work.
POST/preservation/jobs/{job_id}/cancelPersist cancellation intent, request stop, then bound the wait for the exclusively owned process. A committed verified result may win. Copies are retained.
POST/preservation/jobs/{job_id}/reclaimExplicitly reclaim one stopped recovery job's known temporary files. No body or arbitrary paths. Requires the actual store lease, a readable canonical index and exact signed-manifest/worker identity. Returns job_id, generation_removed, temporary_removed and indexed_generation_retained. Indexed models and saved kits remain intact; no job or permission is replayed. Missing/corrupt indexes, links, changed identities and active jobs refuse cleanup. Interrupted cleanup can be retried.
POST/preservation/kit-uploadsExact size_bytes and optional purpose (default kit, up to 8 TiB; invitation / publication, up to 8 MiB; source, up to 256 KiB). Observe actual free space and at most eight retained transfers; return an opaque upload_id and flushed offset. No publisher trust or runtime admission.
GET/preservation/kit-uploads/{upload_id}Read the retained offset for explicit resume. Library inventory also lists bounded transfer handles so a new browser/capability can find them.
PUT/preservation/kit-uploads/{upload_id}Required offset query, application/octet-stream body up to 4 MiB. Exact-offset append; identical completed-chunk replay works after response loss. All weights stay outside SDK/control JSON.
DELETE/preservation/kit-uploads/{upload_id}Remove an unused transfer; queued/running/cancelling job references refuse removal. Frees ingress storage, preserving completed restored models.
GET/preservation/kits/{job_id}Download a completed kit_export artifact with ordinary file/range responses. No arbitrary path or key selection. Save outside the original Core’s storage.

Preserve runs under the existing store owner's mutation fence and independently checks the copied complete closure. Workers use an already opened archive directory; missing/replaced mount paths never become substitute folders. Explicit folder setup is the sole host-path input exception; cards, invitations and ordinary copy controls still use opaque enrolled handles. Paths and custody remain private. Choose a dedicated owner-only folder on a local disk, removable volume or already mounted NAS/remote filesystem. Setup does not mount, configure credentials, recursively create parents or chmod shared NAS roots. Overlaps with Core state, Model Store and custom-card storage refuse. Public archive-trust.json plus the manifest identity allow standalone verification/kit export after Core loss; keep an independent fingerprint record. No private key is copied to the archive. Private audience does not imply encryption: protect storage access and encryption separately. Native object-store adapters and specific NAS/provider qualification are separate from mounted-folder support.

If setup stops after enrollment but before its trust snapshot is complete, that root is unavailable to copy work and the old default remains. Review the same recorded folder and confirm again to finish. Unknown populated folders are not adopted. A crash-created empty leaf can be explicitly reviewed again. Up to 16 private destinations are retained; unavailable roots are never recreated. These setup controls copy no model bytes and start no listener, swarm or model load.

Mounted-destination opens, trust/manifest reads, folder setup, free-space checks and descriptor closes run in a two-slot owned effect lane. Availability has a separate pool capped at sixteen private roots plus publisher custody; stalled probes cannot consume effect or cleanup capacity. Library probes reuse a pending observation and wait at most 250 ms per location; a busy or unfinished check reports unavailable rather than blocking the node event loop or queueing another probe. Effects retain setup ownership through cancellation. Directory cleanup defers cancellation while awaiting admission as well as while its actual close runs. Core drains outstanding filesystem calls and directory leases before releasing its journal; an operating-system mount that never responds can delay shutdown. No timed-out operation is abandoned, restarted or allowed to finish ownerless. Private local snapshot staging and capture custody stay outside capability generations. The pinned preservation reader retains new descriptive card properties in the original identity without requiring a library update for each capability field. Selected artifacts, signed file manifests and envelope versions remain strict; runtime installation still requires a card and dependency mapping Skulk supports. Capture observes free space on the private snapshot and archive filesystems separately, combining their requirement on a shared device. A failed capacity check reports insufficient_space before model bytes are copied. Core records the expected manifest durably before acknowledging publication. Core restart marks uncertain jobs interrupted and requires an explicit outcome check; it never automatically replays them. Closing/restarting a capability does not cancel Core work. These controls provide private Preserve, Check, portable kit export and complete live-store recovery. Recovery holds the actual owner’s mutation lease, stages the whole closure on the store filesystem, then publishes every member through one index update before creating the new receiver’s custom-card admission. The signed envelope, public trust snapshot and original evidence stay with that generation. Different existing primary captures refuse replacement. Exact matching owned companions are reviewed and byte-verified before the new generation is committed. restore_deleted=true separately confirms the plan’s exact operator-deletion records. Receiver-only consent receipts reconcile a committed whole closure after a crash; they cannot override a later deletion. Interrupted kit exports/restores need a new explicit review and retry; a source archive Check cannot establish their destination outcome. The retry rechecks any already committed exact closure before finishing admission. A Core-owned 24-hour worker watchdog bounds active byte work; queue/store-fence wait is separate. The public data workers below own publication, receiving and sharing; new-home CLI recovery remains independently usable.

Public bundle mirroring and bounded sharing​

POST /preservation/plans also accepts mirror_import with a completed upload_id and location_id: public-kit. Every signed member must already have a public audience. Start requires accept_owner_capture for that exact manifest and its bundled keys. Core verifies all bytes into a separate immutable public archive; it does not parse a runtime card, install a model or grant registry authority. Unknown additive card metadata is retained unchanged. Private copies require the separate publication review below; this route never relabels a private signed envelope.

http_share and torrent_share select an exact public copy_id and its location_id. Review binds public_network (default false: loopback preview), listen_port (zero selects an available port), duration_seconds (up to 24 hours), upload_limit_bytes and upload_rate_bytes (BitTorrent only). An optional advertised_url is an operator-supplied HTTP hint, not a reachability check. Starting either requires fresh public_participation: true. File verification finishes before a listener opens. Two independent serving slots leave private preservation and recovery work available. Closing the UI leaves Core's session running; stopping or restarting Core ends it, with no automatic replay.

Job sharing reports readiness, actual port and aggregate counters. HTTP charges reserved response bytes before sending and has no speed cap. BitTorrent reports observed payload bytes; its stop threshold may overshoot in flight. Neither includes network overhead. No peer addresses or request history are retained. Public mirrors and swarms expose addresses and participation; they are not anonymous. Public BitTorrent discovery is opt-in; UPnP, NAT-PMP and LAN discovery remain disabled. Python builds without a compatible native adapter retain HTTP sharing and refuse BitTorrent explicitly.

GET /preservation/torrents/{job_id} downloads hash-checked standard torrent metadata once the owned worker has prepared it, including after a session stops. This download itself joins no swarm. GET /preservation/public-copies/{copy_id}/trust returns only accepted public verification keys. Both require the ordinary trusted operator gate. Recipients need the exact manifest ID and independently authenticated fingerprints; self-signatures alone establish neither publisher identity nor redistribution rights. Network routing, TLS and independent hosting remain the operator's responsibility.

Public publication and recipient invitations​

POST /preservation/setup/publisher explicitly creates a protected local publishing key, separate from private capture custody. Library's publishing observation is separate from private locations; public destinations never become default private Preserve locations. A disconnected or replaced enrolled parent is refused. No listener, key enrollment or runtime admission starts.

MethodPathParameters and behavior
GET/preservation/copies/{copy_id}/publicationAuthenticate a kept private copy's metadata and return supported retained members, origins, sizes and terms/notice hints. No weight reads or registry connection. Known private capture bookkeeping is omitted; hints are not redistribution permission.
GET/preservation/public-copies/{copy_id}/reviewOperator-only offline review of an already accepted public-copy handle. Authenticate its exact signed identity using enrolled archive trust, including both signing domains for a supported PMF source profile. Return skulk.preservation-public-review.v1: copy_id, manifest_id, original archive_format, signed name, declared size_bytes, workloads/runtime requirements and every member's original terms, notices, file count and size. No private-capture filtering applies. The complete response is capped at 48,000 JSON bytes; oversized or unsupported metadata refuses rather than omit members. No weights, signing key, registry, mirror hints, network, conversion, trust enrollment, sharing or deletion. This is neither a fresh byte-completion check nor redistribution permission. Cache-Control: no-store.
GET/preservation/plans/{plan_id}/public-manifestDownload the exact proposed unsigned public manifest through the metadata byte plane, outside SDK controls. It contains no capture bookkeeping, host/key paths or signing key. It is review metadata, not a completed publication.
POST/preservation/public-copies/{copy_id}/invitationBody: mirrors, one to sixteen HTTP(S) bases. Export an at-most-8-MiB portable invitation with the original signed public manifest and candidate public keys. Credentials, queries, fragments and local sources refuse. No hosting/reachability test or network connection occurs.
POST/preservation/public-copies/{copy_id}/handoffBody: exclusively mirrors (one to sixteen HTTP(S) bases) or sharing_job_id (this copy's exact owned peer_share job). Download one at-most-8-MiB .foxhandoff with the unchanged signed reference and bounded numeric peer contacts when applicable. Peer output is hash-checked against its worker receipt and remains downloadable after stop. No network, trust enrollment, serving, reachability assertion or deletion occurs.
GET/preservation/kit-uploads/{upload_id}/invitationInspect a completed purpose: invitation upload offline: exact identity, name, complete declared closure/size, candidate fingerprints/threshold and mirror hints. Reading self-signatures does not identify a publisher or grant registry/code authority.
GET/preservation/jobs/{job_id}/invitationInspect the original invitation retained with a receive job, even after the upload or mirrors disappear. Does not download, enroll keys or start sharing.
POST/preservation/jobs/{job_id}/resumeBody: fresh resume plan_id, new action operation_id, original owner_id, accept_owner_capture: true. Resume only this stopped receive under unchanged original inputs, private staging and cumulative allowance. Repeating the exact action observes the job. The returned job retains its original execution plan/operation identity; this is separate from starting a new job.

A publication plan uses kind: publish, the private source location_id and copy_id. The distinct publisher must already be configured. Supply one public_request or an uploaded purpose: publication metadata document selected by upload_id. The strict portable PublicationRequest supplies a public name, workloads/runtime requirements and resolved terms for every retained member. Optional publisher-supplied UTF-8 notices use NOTICE.publisher.txt: at most 65,536 characters per member and 1 MiB in aggregate. They cannot replace/alias a source file or remove an original required notice and do not become original upstream evidence. Unknown transferable evidence profiles refuse new publication without damaging the saved copy. Retained additive descriptive card fields stay intact; runtime admission remains separate.

The plan is a metadata-only transformation of an authenticated source; it proves neither current bytes nor redistribution rights. Start requires fresh public_participation: true for this exact public-audience publication. The worker checks source/output bytes, distinct keys, terms/notices and the reviewed public identity, then waits for durable intent acknowledgement before atomic public-copy publication. Publication starts no server or swarm and does not change the private copy. New publications and received copies include a public bundle-trust.json verification snapshot for independent filesystem recovery. Imported kits retain kit-trust.json. These files contain candidate public keys, never private keys or automatic enrollment authority; keep independent fingerprints/manifest references. Confirming or serving an already completed exact publication requires its public keys, without loading the now-unneeded private signing key. Known operational filenames are refused, but this is not a general secret scanner for intentionally selected model files or public cards. Late cancellation can lose to a completed verified publication.

Public copies and recovered homes use atomic exclusive directory publication: an interrupted final move leaves either the complete verified stage or the complete destination, without an empty reservation. Explicit retry verifies an already completed exact copy. Existing entries (even empty directories or symlinks) are never overwritten or automatically removed. Filesystems without exclusive rename support refuse publication and retain the source; select a supported destination. Empty remnants created by older Core builds still need operator inspection because they have no authenticated ownership receipt.

A recipient plan uses kind: receive, location_id: invitation, a completed invitation upload_id and explicitly authenticated accepted_key_ids. The intended candidate threshold also requires authentication. This creates an exact-copy choice, never global or registry key enrollment. Select finite download_limit_bytes (default 20 GiB), download_deadline_seconds (default 3,600, maximum 86,400) and separate allow_http / allow_private permissions. Plan receiving binds the exact mirror list and these controls. Start requires accept_owner_capture: true. It authenticates before contacting mirrors, uses pinned-DNS HTTPS and signed object hashes, and never seeds, admits a model or runs repository code. Direct mirrors see Core's connecting address and requests; receiving is not anonymous. A PMF invitation refuses with public_pmf_transport_unavailable; Core keeps preservation-v1 public copies.

Receive plans also carry member_terms: each signed member's member, license_id, reference and, when known, repository and revision. Identical licence, reference and origin entries are listed once; a review that cannot fit the plan's bounded view refuses rather than omit any licence. Using the pinned core's licence definition, licences with use restrictions or conditions to pass on (responsible-AI, non-commercial and makers' own terms) and any unidentified licence need explicit acceptance, as Hugging Face's gated models do. Start then requires accepted_terms to list exactly those licence identifiers, or refuses with terms_acceptance_required; permissive, attribution and copyleft licences need none. An acceptance on a plan without member terms refuses with terms_acceptance_unexpected. Core records the core's TermsAcceptance (plan, job, licence-definition version, accepted licences, time) with the job in the same transaction that reserves it, before any byte is fetched, and the job reports accepted_terms. Resuming a stopped receive needs no second acceptance when one is on record; a job started before acceptance was recorded must send it. This describes licences; it is not legal advice.

The owned worker continues after Library disconnects. A stopped receive retains its private working directory and conservative accounting. For a new resume review, submit kind: receive, location_id: invitation and resume_job_id; do not supply replacement sources, trust, upload or limits. Explicitly changed policy fields refuse. The new review recaps the original policy; call the dedicated resume route with fresh exact-copy acceptance. Work device/inode custody and owner binding are rechecked. The same original stage inode, transfer operation, trust, sources and maximum byte allowance persist across attempts, including charged failed reads. Each deliberate attempt has its own bounded deadline, enforced by Core's owned-process watchdog as well as portable read checkpoints. Neither restart nor replaying the original Start restarts a download. An already used resume action is observational even after completion. Busy work returns store_busy_try_again; cleared/quarantined work requires a new explicit download rather than silently resetting its allowance.

Every received object verifies before the complete copy appears. If a crash left all objects locally, the included signed envelope permits a full offline recheck and completion with mirrors gone. Transfer receipts remain outside the immutable public copy, and temporary partials are not published. A complete copy supports Check, portable kit export and the existing separately reviewed whole-closure recovery. Unknown future card bodies remain opaque during receiving/kit export; restoration into a runtime still requires supported semantics and ordinary owner/historical/code consent. No registry connection or original Core is needed for the portable fallback.

Publication/invitation metadata uses the existing binary upload routes with purpose: publication or purpose: invitation, each capped at 8 MiB. Default purpose: kit preserves the existing up-to-8-TiB kit contract. At most eight uploads and 4-MiB chunks remain; weights never enter SDK JSON. Core control summaries stay bounded; very large metadata/selections may need the standalone tools or a recovery kit. Invitations provide no hosted resolver, DNS/firewall/TLS configuration, verified public reachability, independent custody or protected transport. Public BitTorrent seeding remains separately explicit; invitations currently receive over HTTP(S).

An unclean Core exit can leave a model-sized temporary BitTorrent export in Core-owned work storage. Library's bounded temporary_work_jobs list hints at known stopped jobs with remaining work; it does not scan their contents.

MethodPathBehavior
GET/preservation/jobs/{job_id}/temporary-filesInspect one stopped mirror_import, publish, receive, http_share, torrent_share or peer_share job's authenticated work. Returns job_id, found, logical regular-file logical_bytes, files, complete and removed: false. Measurement stops after two seconds, 100,000 entries or depth 64; complete: false means a lower bound. It follows no symlinks and writes no custody receipt.
POST/preservation/jobs/{job_id}/reclaim-workExplicitly clear that drained job's authenticated temporary work; no body or caller path. Returns the counts observed before deletion and removed: true when removal completes. Absence is idempotent (found: false).

Both routes require the operator gate. Core pins private parent directories and authenticates the exact work directory against its durable device/inode receipt. Older work without a receipt requires its matching host-authored worker request; missing evidence refuses cleanup. Changed identities, unsafe links, active jobs and ambiguous collisions refuse deletion. Cleanup atomically quarantines work before symlink-safe deletion; an interrupted removal is explicitly retryable across restart. Caller disconnect waits for cleanup to drain before releasing Core's ownership queue. No sharing, byte job or consent is replayed.

Terminal job history retains handles while their original or quarantined work remains, including legacy work. After cleanup, ordinary history retirement may remove the row and its receipt; permanent operation reservations still prevent replay.

Verified public copies, private archives, installed models, signing keys, recovery kits and retained torrent metadata remain intact. Reported logical sizes are neither allocated storage nor a promise of reclaimed disk space. Clean stop continues to remove normal temporary work automatically.

Persistent public mirror controls​

Core owns one managed public mirror with up to 1,000 exact model selections. Its dedicated controls and durable history are separate from the existing finite sharing/copy jobs. All routes below use the same trusted-operator boundary as private Library reads; none is installed on the unauthenticated store listener. No route accepts a filesystem path, executable, new signer or arbitrary command. The current Library release does not invoke these dedicated routes.

Stop drains the actual worker group independently of the two filesystem effect slots. Stalled archive operations cannot defer the network signal; private request cleanup and the disk pause write may remain pending until storage responds, with Core's Stop fence already committed and their ownership retained. Core shutdown drains controllers before waiting for unrelated cancelled model cleanup. Native daemons/helpers remain in the fixed worker's owned process group; terminal completion requires every member to be absent or a zombie before the leader is reaped. A real drain timeout retains ownership and reports incomplete Stop rather than a completed receipt. A successful retry finishes retained request cleanup, retires the failed task and clears the resolved Stop error before freeing the role for new operations; historical work is never replayed.

MethodPathParameters and behavior
GET/preservation/mirrorOptional offset (0–1,000). Returns MirrorPage: configured/available observations, exact policy_id, actual resource/transport configuration (egress_daily/egress_monthly are null when uploads are uncapped), usage (bytes uploaded today and this month, bytes received today, by the current UTC day and month; a period that has ended reads as zero; counted even when uncapped), pause and standing-permission observations, live controller job/activity and up to twenty sorted model selections (each with withheld). intake is the saved standing intake policy (share mode, licences, definition version, withheld copies) or null. follow_withdrawals, up to 100 withdrawal_advisories and withdrawal_advisory_count report catalog withdrawals (see below). dht_announcing and nostr_publishing say what the owned controller announces now (only beside its HTTP server, so a native-only mirror reports not_serving); announce_reasons lists stable codes when announcing is off or limited (no_public_url, announce_disclosure_required, not_serving, paused, dht_not_selected, dht_needs_plain_http_root_url, dht_unavailable where the DHT runtime is not installed, nostr_not_selected). While a standing-intake admission is between steps, controller_job_id names the step in flight; stopping it ends the admission. next_offset pages models; pending, retained and removed tombstones are distinct. No network, verification of weight bytes or replay starts on read.
POST/preservation/mirror/check-addressBest effort, from this host only. Fetch the configured public_url's /.well-known/sovereign/peers.json with no redirects and plain HTTP allowed. Every connect and read uses only what remains of one thirty-second deadline, across all resolved addresses, and a timer interrupts the socket at the deadline so a trickling or close-delimited response still ends on time; TLS 1.2 or later, and report MirrorAddressCheck: address, outcome (this_mirror, other_mirror, no_card, not_a_mirror, http_error, private_address, too_slow or unreachable), http_status for http_error, and best_effort: true. The request goes to the owner's own address and to no third-party service; a private or loopback address is not contacted. this_mirror shows the address answers here; it cannot prove that people elsewhere can reach it. Nothing is saved, announced or started. Refuses mirror_address_required without a configured address, and address_check_busy while an earlier check's name lookup is still finishing.
GET/preservation/mirror/models/{manifest_id}Exact signed digest. Returns MirrorSelection, independently of list pages and original Library copy records. available: true, model: null means unknown; unavailable/corrupt storage has available: false. Previously authenticated name/count/size hints do not replace current custody or byte verification.
GET/preservation/mirror/models/{manifest_id}/reviewAuthenticates the original retained manifest, accepted capture keys/threshold and every member's terms/notices without weight IO. Returns a complete MirrorReview within 48,000 encoded bytes or refuses entirely. This grants no recipient, registry, runtime or network authority; original opaque card data stays in the archive.
POST/preservation/mirror/jobsMirrorRequest with permanent owner_id, operation_id, kind and the exact reviewed policy_id (absent only for initial configuration). Returns a durable MirrorJob with HTTP 202. A repeated identical decision observes its original job, including failure/cancellation; changed input refuses. At most two active jobs and 4,096 permanent receipts are admitted.
GET/preservation/mirror/jobsOptional owner_id and offset (0–4,096). Returns MirrorJobsPage with at most twenty receipts and a next offset; no effects replay.
GET/preservation/mirror/jobs/{job_id}Exact digest job handle. Returns lifecycle, safe refusal, byte progress and activity only while that exact worker is owned. Historical listening ports never become live after a restart.
DELETE/preservation/mirror/jobs/{job_id}Cancel the exact active operation and drain its process group before returning a terminal receipt. For an active controller, commit Core's Stop fence and clear running intent before signalling, then record the mirror's pause after drain. Client cancellation retains actual filesystem ownership. Cancelling an old terminal receipt does not pause a newer controller.
GET/preservation/mirror/kits/{job_id}Download only a successful prepare_kit artifact through an enrolled descriptor. Validates the prepared file fingerprint without a full-byte rescan. Returns prepared length, strong digest ETag and attachment headers; supports one byte range and If-Range (206), with 416 for unsupported/unsatisfiable ranges. Replacement/modification refuses or interrupts the stream. Recipients still verify original signatures, independent trust and every object.
HEAD/preservation/mirror/kits/{job_id}Same operator/fingerprint gate and prepared length/digest headers, without reading payload bytes. Does not start a job or extend permissions.
DELETE/preservation/mirror/kits/{job_id}Body confirm_job_id must exactly equal the selected preparation job. Removes only its stopped, enrolled complete/incomplete kit generation; retained models, other kits and sharing policy are untouched. kit_removed records the explicit outcome. Interrupted removal stays private/ineligible until explicit retry; restart never resumes deletion. Unexpected entries, symlinks and replaced directory identities refuse.

kind selects one operation:

  • configure: supply configuration with name and explicit disk and daily ingress byte limits, and egress_daily / egress_monthly upload caps, each a byte count or null for no cap. Uncapped uploads are still counted and reported in usage, but never refused for volume. On metered or paid hosting an uncapped mirror can use a lot of bandwidth and cost money. Disk allowance is at least 256 MiB and is always bounded. HTTP, IPFS and BitTorrent all default off. HTTP exposure is loopback or network; port is 0–65,535. The exposure setting applies only to HTTP; selected IPFS/BitTorrent are separate public transports. IPFS also binds the exact previously reviewed peer_setup_id and qualified installed runtime from the peer controls. Native max_active, session duration/reservation and upload rate are explicit bounded settings. Saving is offline, requires the controller to stop, retains bytes/caches/accounting and clears standing authority. A partial setup failure stays paused and unserved. Optional announcement fields: public_url (a credential-free HTTP(S) base URL without a trailing slash), announce_dht (also announce a plain-HTTP root URL's address and port on the public BitTorrent DHT), publish_nostr (also copy the signed mirror card to third-party Nostr relays) and announce_disclosure, the announcement disclosure version the client showed before consent (currently 1). DHT and Nostr need public_url. Core announces nothing until a recognized disclosure version is recorded with the configuration it covers: without one the address is saved but no card, DHT announcement or relay publication happens, and the page reports announce_disclosure_required. Because the announcement is part of the policy, every later standing grant covers exactly that disclosed configuration. An announced address and the models the mirror probably holds are public; a public mirror is not anonymous. follow_withdrawals (default false) is the operator's choice whether a catalog withdrawal stops serving. Off, a withdrawal is advisory: the copy keeps serving and the page lists the advisory. On, a withdrawn copy is not served unless the operator acknowledged its advisory. It is part of the reviewed configuration and policy, so changing it clears restart permission, and the page reports it with the rest of the configuration for exact comparison. No catalog publisher, Foxlight included, is a takedown authority; block is the operator's takedown. Core's managed mirror currently retains local public copies only and follows no catalogs, so advisories appear only once source following is available.
  • intake: supply the reviewed policy_id and intake, the standing intake policy, or null to clear it: share (eligible or chosen), licenses (normalized, unique licence identifiers; identifiers that name no licence refuse), definition (the licence-definition version reviewed) and withheld (exact manifest IDs). It is validated as the core IntakePolicy, refuses beside a running controller (mirror_busy_stop_first) and is recorded in mirror history. Any effective change clears restart permission exactly as the core does; a change only to withheld keeps it and blocks or unblocks those copies. With share: eligible, when a publish, receive or import completes and its public copy's signed terms name only listed licences, and a resume controller runs under a valid grant, Core stops that controller, retains the copy (its MirrorJob has admitted_by: intake) and resumes it, with no new grant_resume. Any operator Stop while this runs ends it, and nothing it does afterwards restarts sharing; it keeps the controller until the resumed one is serving, so copies that finish meanwhile are admitted in turn. If its retain fails without changing the grant, Core restores its approval and the earlier sharing resumes; if the policy changed, the mirror stays visibly stopped. Never while paused or left, never for a private, PMF, withheld, already selected or removed copy, never with share: chosen or without a policy; such copies are left for the owner's own decision. If Core stops during an admission, sharing stays stopped (nothing replays).
  • retain: supply copy_id, its exact manifest_id, and confirm_redistribution: true after reviewing every member's existing public terms. Core rechecks the already accepted public copy and its original keys, pins its directory descriptor and delegates complete copy/verification to the standalone core. Original cards/extensions, signed wrapper and required companions stay unchanged. This creates no catalog, source trust, registry authority, listener or automatic serving. Removed selections require the separate confirm_reintake: true; existing block/accounting stay intact.
  • run: public_participation: true is required for this exact new decision. mode: finite runs for seconds (1–86,400); it creates no restart intent. mode: resume additionally requires Core's separately approved exact unexpired standing grant. Only a successful explicit resume selection retains running intent for later store startup. No serving transport selected refuses.
  • grant_resume: separately supply resume_expires (absolute Unix time within the next 366 days) and confirm_resume: true. It binds policy, model authority, directories, native runtime/routing and budgets. A saved grant alone starts nothing, including after restart. revoke_resume clears standing permission; stop an active controller before using this offline control.
  • model: select exact manifest_id and action (pin, unpin, block, unblock, retry, acknowledge, withhold, release). These live local controls do not alter accepted model keys or reset allowances. withhold keeps a copy back from serving and from standing intake (it needs a saved intake policy) and release shares it again; neither changes what the grant covers. acknowledge records that the operator reviewed a withdrawal advisory; with following on, the copy then keeps serving. Policy/intake/model-deletion work requires the controller to stop first.
  • recover: select exact already accepted manifest_id and reviewed policy_id. This is an explicit stopped-controller offline completion check, distinct from retry, run, reintake or deletion. The standalone 0.19 verifier authenticates original model keys/terms and every actual object. A retained local intent may restore the unchanged original signed wrapper after a crash before publication; missing/corrupt bytes refuse without fetching. Complete pending copies become retained; pin/block, accepted authority and accounting remain unchanged. Removed selections still require separate reintake. Core clears its standing/running sharing intent before byte work, and successful pending promotion clears the standalone restart grant. No service, network, signing or runtime admission starts. Run verification in the owned cancellable worker: client loss keeps its durable receipt, identical retries observe the original outcome, and Core loss interrupts without replay. After interruption, inspect state and explicitly choose another operation if needed; a completed retained copy can use the kit journey below. An already retained copy is reverified without rewriting its standalone receipt. The recover kind in MirrorRequest/MirrorJob is the feature-negotiation signal for clients connecting to older hosts.
  • prepare_kit: select exact retained manifest_id and reviewed policy_id. No copy handle, caller path, signer or network permission is accepted. It reuses the standalone verifier, preserving exact original wrapper bytes, all card extensions, companions/notices and candidate public trust. Full copy and digest work stays in the owned background worker. Preparation can coexist with an existing controller, and client closure does not cancel it. A successful MirrorJob.kit records prepared identity/length/digest; metadata reads do not claim a fresh payload scan. Sealing remains cancellable after the inner kit copy finishes. Core loss interrupts unfinished work without replay or automatic deletion. The kit is plaintext; receiving still needs independent model trust or explicit first-contact key acceptance.
  • prune: select exact manifest_id and matching confirm_delete_manifest. Standalone stopped-owner, blocked/unpinned and shared-object protections apply. Delete only the selected mirror custody; other Library/source/recipient copies remain intact. Source loss, budget pressure, Stop, restart and uninstall are never deletion permission.

Each actual ModelStoreServer.start() may resume only a previously running role whose saved Core intent, approved standing grant, exact policy, directory identities and expiry still agree. Lazy host construction and all GET routes start no sharing. Core shutdown drains children while preserving only that prior intent. Explicit Stop clears intent and durably fences future restart, including when the selected disk is unavailable. Finite jobs and intake do not replay. The Node lifetime awaits shielded store cleanup on normal signal shutdown and parent-scope cancellation, before event-loop teardown can cancel its owner. A failed shutdown can retry cleanup after an incomplete drain is resolved; successful closes stay idempotent and cleanup never restarts sharing. Shutdown begins withdrawal of finite shares, the persistent mirror, discovery and native peers together. Stalled cleanup in one owner does not defer the others' initial cancellation; storage/journal ownership remains until drain ends. Caller cancellation cannot abandon the owned close before storage/journal release. Shutdown-only retry also reconciles a completed failed worker after confirmed drain, retaining prior approved resume intent without requiring a user Stop. Previous-controller handover is bounded and refuses beside an unowned controller.

activity reports an actual owned HTTP port, if selected, and native worker count, including preparation and drain. It is neither completed-publication nor reachable-replica evidence. Stop clears live observations only after actual owned work/group drain. An operating-system filesystem stall may delay metadata completion; it cannot release the journal/worker owner early. Budgets and upload reservations survive stop/crash/restart and are not refunded by retry.

This adapter currently admits the public preservation-v1 transport profile. Direct public PMF transport refuses before selection/copy; the existing PMF Preserve/kit/Restore paths remain supported. Standalone Sovereign tools retain these same format, trust and operator-deletion checks without Skulk. Public transports expose addresses/content identifiers according to their protocol; this interface does not establish anonymity or general public reachability.

Preservation archive format detection​

POST /preservation/plans includes additive archive_format (pmf-v0.1 or preservation-v1) in private Preserve/Check/kit-export/Restore reviews. New Preserve jobs use PMF; the exact plan binds this choice and the full installed selection. Existing legacy plans default to v1 when deserialized. The same POST /preservation/jobs controls, owner-capture acceptance, separate code permission, cancellation and durable expected-outcome acknowledgement apply. Kit uploads and download endpoints accept/produce explicit PMF kit v2 or legacy kit v1 automatically. PMF source-record review reads bounded authenticated metadata and seeks over weights; full import/restore hashes all bytes. Registry assurance remains an independent proof check. Generic PMF without the supported runtime profile can be recovered with standalone tools, and does not authorize Skulk runtime admission. Public sharing still uses reviewed v1 publication.

Followed model sources and offline discovery​

These routes use the same trusted-operator gate as all preservation reads and writes. Source roots authorize discovery metadata, not registry provenance, model authorship, runtime support, repository code or public sharing. No source is pre-enrolled. Obtain a bootstrap file from a supplier you trust. Queries stay in POST bodies and the local cache; suppliers never receive search text or the installed-model inventory.

MethodPathParameters and behavior
POST/preservation/discovery/reviewsupload_id of a completed purpose: source transfer. Inspect public bootstrap/root metadata offline, return name, exact endpoints, source/bootstrap digests and a ten-minute review_id. Bootstrap files are capped at 256 KiB. Cache interchange and local-file sources use the standalone tools.
POST/preservation/discovery/sourcesExact review_id, confirmed: true, optional allow_http / allow_private (both false by default). Trust this reviewed file for discovery only and persist local metadata permissions. Following itself contacts nobody and retains any prior roots/version floors.
DELETE/preservation/discovery/sources/{source_id}Disable this exact source without deleting verifier floors, evidence or model copies. Returns 204. Stop pending metadata work before enrollment changes; a busy queue refuses.
GET/preservation/discoveryRequired owner_id, optional offset (0–1024). Up to sixteen retained source states and four metadata jobs for that client, with next_offset. Reads perform no refresh, probe or replay.
POST/preservation/discovery/searchquery (up to 500 characters), offset (0–1000) and supplier_offset (0–16000). Four exact model identities, each with four attributed supplier statements and pagination. Each supplier may include up to eight bounded source-declared workloads for browsing; they do not amend signed model cards or grant execution permission. For more suppliers, search the exact manifest_id and advance supplier_offset. Bounded display projections retain full original signed metadata in the cache.
POST/preservation/discovery/jobsowner_id, permanent operation_id, source_id and kind: refresh or model_metadata. Returns 202 before effects. Refresh uses enrolled source permissions. Model metadata additionally requires exact entry_id, manifest_id, accept_source_keys: true and separate optional model-metadata allow_http / allow_private grants. No local model-file paths are accepted.
GET/preservation/discovery/jobs/{job_id}Observe the exact retained metadata job. Successful model metadata returns only an invitation upload_id; inspect it via the existing offline invitation route, then separately review/authorize receiving and Restore. No weights are fetched by this job.
POST/preservation/discovery/jobs/{job_id}/cancelRetain stop intent and stop the owned child, with a bounded terminate/kill fallback. A completed atomic source-cache commit wins a late stop. Forced/uncertain exits retain an interrupted outcome for inspection rather than claiming no effects occurred.

Metadata jobs have their own typed records and client namespace in the existing private journal, separate from model-copy/SDK contracts. At most four jobs are pending and 1024 exact reservations are retained. Identical request replay only observes the original job, including after completion or restart; changing a reserved request refuses. Core restart marks unfinished work interrupted and never replays network effects. Closing Library does not cancel submitted work.

The known metadata subprocess has a lifetime pipe and a 150-second parent deadline, followed by up to seven seconds of stop/terminate/kill escalation. Standalone source refresh retains its own 32 MiB body, 128-request and cooperative 120-second bounds. Model preparation retrieves only bounded signed public manifests with a separate 32 MiB metadata allowance and cooperative 120-second deadline. Source permissions never become model-download permissions. Normal receiving keeps its existing reviewed object-byte/time limits.

Source status distinguishes empty, fresh, retained after error, stale, imported, superseded-root and invalid cache evidence. Search remains available offline; none of these statuses grants registry assurance. Candidate keys require the operator's explicit selected-copy decision and never enter global trust. Untrusted/unsupported runtime cards still require the existing Restore checks. Direct public PMF network transport is not added by these controls; existing public v1 publication preserves complete original card and provenance data.

Preservation peer controls​

These routes share the existing preservation operator/origin boundary. All paths are relative to the Core API base. Peer participation is optional and uses qualified Kubo 0.43.1, acquired explicitly in Core's private storage or supplied through the standalone managed installer/an existing PATH installation. No API request accepts a native executable or host repository path.

Method and pathInput and behavior
GET /preservation/discovery/peerLocal PeerState: runtime availability, current setup identity, operator-selected contacts/private scope and actual active-session status. No networking or replay.
POST /preservation/discovery/peerPeerSetup: bootstrap (1–8 unique numeric libp2p contacts), allow_private (default false), confirmed (explicit Core address/content-exposure acknowledgement). Offline settings only; refuses during an owned session.
GET /preservation/discovery/peer/runtime?owner_id=CLIENTOffline RuntimeSetupView: supported managed platform, exact plan and its plan_id, and the client's latest setup receipt. The plan lists fixed official HTTPS origins, version, archive/executable hashes and sizes. No acquisition or peer effects.
POST /preservation/discovery/peer/runtime/jobsRuntimeSetupRequest: owner_id, permanent operation_id, exact reviewed plan_id, and confirmed=true. Returns a Core-owned software setup job. No API accepts a URL, filesystem path, checksum override or executable argument.
DELETE /preservation/discovery/peer/runtime/jobs/{job_id}?owner_id=CLIENTStop this client's setup job. Returns its retained receipt; poll the offline view until terminal. Cancellation never starts peer networking and never recalls already verified publication.

Native setup supports managed macOS/Linux ARM64 and AMD64 builds, requires no administrator access, and changes no PATH, system packages, source enrollment, model trust or code permission. The known acquisition child uses the standalone installer's packaged SHA-512 archive and SHA-256 executable pins, free-space check, fixed official origins and atomic private generation publication. It runs no extraction hooks, installation script or downloaded executable. Core rehashes the managed executable before selecting it, then checks its exact version locally. Existing runtimes on other supported POSIX platforms can still use PATH.

RuntimeSetupJob reports job_id, owner_id, observed state, conservative archive bytes_copied, creation/update times and a safe error_code. Setup is separate from model byte jobs and their allowances. It has a five-minute cooperative acquisition bound and a 330-second parent worker deadline, with a bounded stop/terminate/kill ladder. Parent EOF exits the acquisition child even if a resolver or storage call is blocked. Core checks actual pinned managed bytes after child exit rather than trusting a success message. Verified atomic publication can win a late cancellation race. A crash may leave private staging; it is never selected as a complete installation.

Closing Library does not stop installation. The same owner/operation request returns its original receipt without replay; changing the request refuses. Restart marks pending setup interrupted, preserving identities without another download. A new deliberate attempt needs a new operation identity. Retain at most 64 setup receipts; exhaustion refuses instead of forgetting authorization. Setup shares the native lifetime gate and refuses admission while peers are active. Acquisition never configures contacts, starts a peer daemon or grants peer exposure. Subsequent source/receive jobs still need their separate grants.

Source-file reviews also accept foxlight.peer-source.v1, exposing transport, pinned IPNS name and snapshot count. Confirming follows only that exact reviewed file; HTTP/private metadata grants cannot authorize peer connections. GET /preservation/discovery and cached search attribute peer transport and pinned historical availability without connecting.

POST /preservation/discovery/jobs accepts additive peer fields: transport="peer", allow_peer_network=true, and the exact current peer_setup_id. Peer jobs reject HTTP/private-HTTP flags. For kind="refresh", historical=true explicitly selects only trusted immutable snapshot pins; it cannot become fresh authority or lower observed verifier floors. For kind="model_metadata", exact source/entry/manifest and candidate-key acceptance remain required; only signed metadata is returned as a validated invitation upload, before object requests.

Offline invitation review accepts the distinct foxlight.model-preservation.peer-invitation.v1 format. A peer receive plan requires allow_peer_network=true and peer_setup_id in addition to existing accepted exact-copy fingerprints, byte/deadline allowance and later start confirmation. Transfer scope, model identity, trust and allowance remain fixed across explicit resume; reviewed replacement contacts are permitted only within that original private-address scope. HTTP v1 defaults retain their serialized shape and replay identities. Unsupported/missing runtime, stale setup, absent network consent and attempted scope expansion refuse before peer requests.

Peer work runs in known Core-owned workers and receive-only native process groups. Closing a presentation client does not stop work. Cancellation/EOF/shutdown drain actual native effects; Core restart records interruption without network replay. Network addresses/content identifiers remain observable, and native routing/wire traffic and block-cache growth are separate from the object-byte allowance.

Discovery jobs remain nonterminal while owned request cleanup holds their source serialization lock. Core publishes the final receipt only after that cleanup scope exits and the lock is released, so a client can immediately Unfollow after observing completion. Cleanup failures cannot publish a successful receipt.

One-file model handoffs and finite peer sharing​

kind: peer_share selects an exact already-public copy_id/location_id. Review requires public_network: true, allow_peer_network: true and the exact peer_setup_id from locally confirmed numeric contacts/private-address scope. listen_port stays zero and advertised_url must be absent; the native worker chooses its listener. Duration and upload threshold use the existing finite sharing controls. A separate start still needs public_participation: true. No imported file, source signature or receiving consent starts a mirror.

Review budgets simultaneous export staging and fresh native-cache space on their actual volumes, combining demands on a shared device. Planning uses Core's owned IO executor so slow archive checks leave other control work schedulable. The worker rechecks before staging and immediately before native import; capacity checks do not reserve disk space against other writers.

Core creates a fresh job-owned mirror repo and supervises its actual native process group under the shared runtime gate. Its independent peer worker monitors native upload usage during complete public-closure preparation. It cannot adopt the receiving cache or old pins. Acquisition/configuration and another peer session wait or refuse while that gate is held. Ordinary HTTP and BitTorrent jobs retain their existing independent serving slots.

Job sharing.accounting: observed-peer-wire identifies observed native wire bytes, including routing overhead; this is a stop threshold with in-flight overshoot, not a hard quota or payload-only counter. handoff_sha256 appears only after a complete handoff is written. It is an export receipt, not proof of reachability, independent custody or anonymity. Stop/expiry/Core loss drain native serving; restart never replays it. Core confirms stopped only after the native group drains. The source copy, exported file and native cache remain. Explicit stopped-job temporary-file cleanup may remove the native cache; it preserves the archive and exported handoff. Physical deletion remains an operator decision.

Invitation-purpose uploads also accept foxlight.model-preservation.handoff.v1. Offline preview returns optional contacts as untrusted suggestions without saving Core settings or granting private/network/model/code access. Source-purpose uploads accept a wrapped peer source within their existing 256-KiB bound; source review returns the unchanged inner peer/source identity and optional contact suggestions. Following retains the original TUF authority/floors and starts no network. A model handoff is refused as a source and vice versa. Legacy HTTP/peer invitations and source files retain their prior behavior.

Recipients still independently authenticate exact-copy fingerprints and approve network scope before receiving. All required bytes, original card fields and signed provenance are preserved; registry roots, repository-code permission, deletions/tombstones and complete companion recovery keep their existing checks. The portable file and standalone tools require no Skulk. Public network publication currently uses the supported preservation-v1 bridge; unsupported PMF-only profiles are refused without losing retained data.

I2P HTTP preservation jobs​

Compatible development Core exposes the standalone 0.15.1 receive-only I2P HTTP pilot through its existing operator-gated preservation routes. Library UI adoption is a separate component release; API availability is not a native installer or full end-user qualification. A separately operated trusted I2P HTTP proxy must already be listening on the Core host. No router is installed, adopted, started, stopped or reconfigured, and a listening port does not authenticate its software. The pilot is not qualified anonymity or broad hostile-network reliability.

POST /preservation/discovery/sources additionally accepts allow_i2p: true, i2p_proxy: {"host":"127.0.0.1","port":4444} and optional i2p_endpoints (at most eight canonical http://HASH.b32.i2p bases). The host must be numeric 127.0.0.1 or ::1; port is 1–65535. These choices cannot accompany allow_http/allow_private or a peer source. If endpoint overrides are omitted, only supported I2P hints from the original bootstrap are selected. Absence of an I2P locator refuses without a connection. Following remains offline and leaves the original bootstrap/root/version floors intact. The protected connection policy is persisted before source membership, so an interrupted follow cannot silently leave direct-only membership. Unfollow retains this local preference; re-following it without explicit I2P settings refuses rather than downgrading. Use a new offline source review to deliberately change its proxy or locators.

GET /preservation/discovery adds i2p_available: true for schema support, not proxy health. Each protected source projects transport: "i2p", its i2p_policy_id and numeric i2p_proxy. Cached search attributes that transport without contacting the source. Private endpoint policy remains outside replicated State; source/cache export does not grant another receiver local network consent.

POST /preservation/discovery/jobs uses transport: "i2p", allow_i2p: true and the source's exact i2p_policy_id for both refresh and model_metadata. Other transport grants and historical-peer choices are refused. The parent and known worker independently bind the selected policy before network IO; policy change, removal or unsupported routes refuse without direct fallback. Source updates retain stock TUF authentication, expiration/rollback floors and last-good cache. Model metadata still needs exact entry/manifest selection and separate accept_source_keys; source trust never becomes registry or global model trust. Only canonical I2P model mirrors are used. Existing status/cancel endpoints, finite worker ownership, EOF/cancel drain and restart-without-replay apply.

POST /preservation/plans with kind: "receive" additionally accepts allow_i2p: true and an exact i2p_proxy. This is separate from metadata consent, copy-scoped key acceptance and the final governed start. It cannot carry direct HTTP/private-address or peer grants. Only canonical I2P hints are retained from the unsigned invitation routing list; the original upload, signed envelope, model/card data and provenance remain intact. A plan without an I2P mirror refuses. Its receiving policy reports transport: "i2p", the exact proxy, byte/deadline allowance and effective mirrors. It starts no router, payload swarm, mirror or runtime model admission. The selected proxy can observe request paths and timing; I2P endpoints may link a client destination. Search remains local.

A stopped I2P receive must be re-planned with the same resume_job_id, allow_i2p: true and unchanged proxy. Missing or changed proxy confirmation refuses, as do changes to the original allowance, deadline or other immutable inputs. The existing POST /preservation/jobs/{job_id}/resume then reuses the same private stage and cumulative charges. Stop/Core loss retains files; restart, source withdrawal and transport failure do not replay work or delete a copy. Existing registry/code-authority decisions apply separately to later Restore. Default I2P fields are omitted from existing HTTP/peer request/receipt projections.

This direct transport currently receives legacy signed archives; PMF kits retain their independent offline/peer paths. See the standalone I2P HTTP contract for route restrictions, router trust and qualification limits.

The retained receive preview at GET /preservation/jobs/{job_id}/invitation also includes a read-only receiving policy. It exposes the original local transport, numeric I2P proxy and finite limits so a UI can show an interrupted job after reload. It neither renews network consent nor changes the original signed reference. Fresh uploaded invitation previews omit this local field; a recipient must still explicitly confirm the exact I2P policy to Resume.

Experimental capability chat gateway​

Client-owned continuation (experimental)​

Continuation is an explicit opt-in on POST /v1/chat/completions. Ordinary full-history clients retain the existing gateway contract. A native model or a capability without an advertised continuation destination refuses this opt-in.

inference_capability.continuation in GET /v1/models advertises the contract, authorization, exact target, callable version, proof header and receipt path. The destination must declare chat.continuation@0.1.0, caller.ed25519@0.1.0, and inference.chat=<chat-id>@0.2.0, and share the actual local provider instance with that exact chat callable. Ambiguous relationships refuse. Existing v1/v2 catalog serialization is unchanged.

Each client generates its own Ed25519 key and separately obtains capability-owner approval of its public key, models and expiry. Core never generates this identity, reuses its gateway key for it, or receives the client's private key. Direct owner API access remains required; paired-device/LAN access does not inherit continuation authority.

Send Skulk-Continuation-Proof as unpadded base64url of a UTF-8 JSON object {caller_id, request, signature} (at most 4,096 header characters). caller_id is the approved 32-character lowercase hexadecimal ID; signature is the 128-character lowercase hexadecimal Ed25519 signature. Sign canonical JSON of {caller_id, request} with sorted object keys, ASCII escaping, no whitespace, and no nonfinite numbers. Expiry uses Python JSON float representation, including .0 for whole values; browser clients use an exact fractional epoch timestamp to avoid an integer/float serialization mismatch. The request contains:

FieldMeaning
contractExactly chat.continuation@0.1.0.
mode, handleBoth fields are required in the signed object: start with explicit handle: null, or continue with the exact prior ct1_ plus 64-hex handle. An omitted handle is rejected before dispatch, so validation cannot silently insert a signed field.
conversation_idExplicit random 64-hex conversation identity.
targetExact advertised target_node, callable_id, 16-hex descriptor_revision, and provider model slug. Callable version is fixed to 0.1.0.
bodysize_bytes (2 bytes–16 MiB), lowercase SHA-256 sha256, and media_type: application/vnd.skulk.chat-request+json of the original HTTP body, including its exact public model ID.
nonce, expires_atFresh 64-hex attempt ID and finite Unix admission deadline within the next 60 seconds.

Serialize the HTTP body once, sign its byte digest and length, and send those same bytes. Whitespace and Unicode encoding are preserved. Full public message history is required, including matching earlier assistant text/tool calls and tool results. The API checks exact body/destination/deadline and hard inference policy; the capability independently verifies the registered client signature, current scope, revocation, history and storage before any provider request. No normalization, fallback, destination migration or automatic retry occurs.

Chat persists each verified public assistant round together with its receipt, and saves client tool results with the next pending attempt before dispatch. Received output remains available after lost terminal delivery; recovery still requires an exact committed-history match. A receipt lookup cannot overwrite a newer pending attempt that began while the lookup was in flight.

Successful collected JSON includes skulk_continuation. For SSE, that field is on the final successful finish chunk before optional usage and [DONE]. It contains only contract, conversation_id, opaque handle, public-history {count, sha256}, original request_nonce, and checkpoint expires_at. Success and this receipt are withheld until semantic commit and transport completion. Failures can include a fixed error.continuation_error category such as scope_mismatch, history_mismatch or recovery_required; no provider state is returned. An early authentication refusal survives input half-close races.

POST /v1/chat/continuation/receipt accepts a fresh {caller_id, request, signature} JSON proof under the separate chat.continuation.receipt@0.1.0 request contract. Its request contains the same conversation_id and exact target, original request_nonce, a fresh query nonce, and admission expires_at. Signing rules are identical. No media/body reference or generation parameters are accepted. It returns {receipt, error} with exactly one non-null: a current committed receipt or a bounded capability refusal. Invalid/changed destinations return 409; invalid deadlines return 400; uncertain/invalid transport returns 503. Direct owner access and independent client authorization still apply. A half-close, receive, iterator-close or provider-cancellation failure also returns the fixed 503 uncertainty response, without publishing a semantic receipt. Lookup has a 30-second deadline and bounded cleanup; provider cancellation is attempted even if closing its output iterator fails. Receipt cleanup requires an acknowledgement from the selected provider, including a successful, matching HTTP result for a remote provider; a missing peer or unsuccessful response is uncertainty. Ordinary chat retains best-effort cancellation. Disconnect cancellation remains cancellation, and none of these failures authorizes an inference retry. A recovered receipt cannot recover lost assistant text. Do not invent that text or replay inference; continuation still requires the matching committed history.

Streaming retains bounded frames and imposes no aggregate generation ceiling. Collected responses have a separate 262,144 serialized-delta-character memory guard and return response_too_large when exceeded; use streaming for larger responses. This guard is separate from capability-owner output allowances and provider limits. The existing whole-call deadline and provider frame bounds apply.

In dashboard Chat, Conversation continuity appears for an advertised destination. Get browser public key creates or reads a nonextractable Ed25519 key in origin-local IndexedDB. Approve only its public key in the capability's management page, then paste the returned public enrollment JSON and select Enable for this conversation. The dashboard checks the approved key, model, destination and expiry. It does not proxy management cookies or CSRF across origins. Existing conversations can explicitly opt in using full history.

Public grants, attempt IDs and receipts live with the conversation metadata; private keys and provider/account state do not. A pending attempt is durably recorded before dispatch. Chat preserves exact public assistant/tool turns and summaries separately from display text, checks their fingerprint before accepting a receipt, and requires a clean SSE terminal plus EOF. Reload, cancellation or missing delivery cannot silently replay an attempt. Recover receipt performs only the signed lookup and verifies retained public history; missing assistant text remains blocked. Use full history instead explicitly abandons this continuation and starts a fresh provider context on the next request. Editing or deleting committed messages likewise requires an explicit new context.

Chat coordinates same-origin tabs using browser Web Locks on HTTPS or localhost. In secure contexts, one tab owns a conversation through preparation, streaming, client tools and final persistence; other conversations can proceed independently. Ordinary chat over private-network HTTP remains supported with transactional persistence and per-tab submission ownership. Protected continuation and shared cross-tab writer ownership require HTTPS or localhost. Another tab shows that ownership and retains its draft. All durable saves atomically merge changed fields in an IndexedDB transaction, refusing stale history or receipt changes. Before sending, a tab adopts current saved state. Continuation and document preparation must be acknowledged before their drafts are cleared or inference is submitted; ordinary native image requests retain their existing storage-independent input bounds.

The authoritative snapshot lives in browser-local IndexedDB skulk-chat-history-v2. A skulk-chat-v2 localStorage mirror is a startup cache; its quota or delayed cross-renderer visibility cannot authorize a stale write. The first transaction imports legacy history if no current snapshot exists. Older tabs cannot replace the committed snapshot through legacy writes; reload all tabs after upgrading to share current history. Migration does not delete the legacy snapshot. Authoritative storage failure is visible and preserves the last saved transaction; new durable preparation is refused until it succeeds. Browser storage quota still applies. Committed revisions fence out-of-order refreshes; closed-tab ownership is detected without retrying inference. Temporary database failures retain ordinary edits in the current tab until they can be saved. If another tab deletes the active conversation or changes its model, sending pauses until you explicitly choose or start a conversation; your draft is retained. Switching models selects or creates a separate conversation even when the old one is empty. A conversation ID retains its original model. Receipt recovery checks public history again after acquiring ownership and refreshing storage; it cannot acknowledge a receipt against newly changed history.

Retained local edits appears when a conflicting ordinary conversation edit can be saved separately. Review versions shows your local messages alongside the saved history. Save as separate conversation creates a new conversation with the same explicit model and visible messages/documents, with continuity off. It carries no old pending attempt, client grant, receipt, opaque tool history or origin binding. Use saved version discards only the retained local copy; Accept deletion adopts a conversation's deletion by another tab. These choices are atomic: storage refusal or another tab resolving the same record cannot report a successful fork or silently discard either version. Independent conversations continue after conflict quarantine. Up to 64 local versions are retained without automatic expiry; resolve existing records before saving more. If browser storage cannot retain a conflict, keep the current tab open until storage recovers: in-process edits are not a successful durable save. Message, attempt and receipt writes requiring acknowledgement refuse when they conflict with a pending ordinary edit; quarantining that earlier edit cannot acknowledge a new mutation. Recovery controls remain available without a ready model or an active canonical conversation.

History, document bytes and retained versions now share schema version two of skulk-chat-history-v2. Legacy document import is resumable and retires the old blob database only after copying completes. Reload older dashboard tabs after this upgrade; their schema-one writers cannot overwrite current history. Newly submitted documents have durable staging ownership and a 24-hour unused lease. Cleanup atomically checks canonical and retained references, preserving referenced documents regardless of age and active foreign staging until expiry. If cleanup wins before an expired staged document is committed, publication refuses and the draft remains available; it never saves a dangling reference or submits inference. Unreadable reference metadata preserves document bytes and surfaces a cleanup failure. Browser keys remain in their separate nonextractable-key database.

Recovery/reset controls remain visible for retained continuation state even after a destination withdraws its advertisement. New enrollment still requires a current advertisement. Stop during a client tool preserves the last submitted attempt; no following model nonce is published for an already canceled request. If Stop occurs during pending storage before HTTP dispatch, Chat restores the preceding attempt. A failed restoration preserves the pending fence rather than claiming the request is safe to repeat.

GET /v1/inference/gateway returns contract: chat.completions@0.1.0 and this API host's Ed25519 public_key. It accepts no parameters and exposes no private signing key or provider credential. The key grants no permission; a separately installed capability must hold an explicit owner delegation. First use atomically publishes a complete, owner-protected key; concurrent requests retain the same identity, and interrupted creation can be retried. Key storage uses the shared protected-file implementation on POSIX and Windows: owner-only directory/file custody, refusal of links, bounded reads and durable publication without replacing a concurrent winner. Unsafe or malformed existing keys return HTTP 503 without rotating the identity. Windows uses protected owner/SYSTEM access lists; this does not enable Windows capability hosting.

GET /models and GET /v1/models additionally list fresh, owner-enabled capability models with namespaced IDs capability/<callable-id>/<model-slug> and an inference_capability object containing processing domain, usage class, usage label/link and expiry. They are separate from mounted instances and are omitted from the status=downloaded filter. Discovery reads bounded cached catalogs concurrently from up to eight local installed providers with five-second individual and six-second aggregate deadlines; completed reads survive expiry. The individual budget includes managed-owner IPC and schema validation, so a normal cached read can finish without restarting a healthy capability. Overlapping callers share one discovery result instead of competing for a managed owner's single call slot. Waiting and discovery share the same overall budget. A later non-overlapping request reads afresh; this does not retain a provider catalog after its next successful withdrawal. Transient overloaded or provider_error refusals permit at most three attempts inside the same individual budget. Only cached discovery is retried; generation is never automatically replayed. A successful empty result withdraws immediately. It does not fetch an upstream account catalog or token. Missing/stale catalogs withdraw availability. The dashboard withdraws cached capability choices at their advertised expiry even when catalog polling fails. Its native artifact download picker excludes these delegated choices; they remain available in the chat selector.

The inference_capability.features list describes the enabled serving path. On the 0.2 contract, text_file_input permits inline UTF-8 .txt files and pdf_input permits inline PDFs. Missing features do not imply support; the legacy 0.1 contract cannot advertise either document feature. Provider policy and model validation still apply independently at admission.

Chat's attachment picker follows these features. Documents are limited to eight per request including history, at most 8 MiB each, within the whole encoded request bound. Submitted document bytes are kept in browser-local IndexedDB; conversation metadata stores handles rather than embedding them in localStorage. Follow-up turns hydrate the original bytes. Missing files, storage failures, unsupported destinations and oversized histories stop submission with a visible error. Deleting messages/conversations removes their document references and local document data; old crash-abandoned submissions are cleaned after a day. This browser store is not an API upload service or a shared fabric file store.

POST /v1/chat/completions accepts these exact IDs with ordinary messages, stream and stream_options.include_usage. Provider-supported request controls and full conversation history pass to the capability for independent validation. Unsupported controls are refused by that provider rather than silently ignored. The optional inference_policy accepts allow_external, local_only, or included_only; local-only rejects nonlocal catalogs, and included-only rejects usage outside none/included_only, with 403. Unknown request fields return 400 Legacy chat.completions@0.1.0 providers retain a 48 KiB signed-input bound. For chat.completions@0.2.0, the gateway signs the exact UTF-8 request-body length, digest and media type, then sends those bytes over the existing Fabric media channel in packets of at most 1 MiB. Encoded HTTP input is limited to 16 MiB; the selected provider can advertise a smaller bound. Oversize input returns 413 before provider submission. When both versions are available for one callable, discovery prefers 0.2 without duplicating its model IDs. Requests are never automatically downgraded or replayed after admission.

For supporting capabilities, user-message content may include {"type":"file","file":{"filename":"notes.txt","file_data":"data:text/plain;base64,..."}}. These inline attachments are interpreted and independently validated by the capability. No gateway file upload service, local-path resolution or remote-file fetching is provided. Native text/vision execution refuses document parts with 400 before normalization. Catalog availability alone does not establish that every model accepts every document type. Input transfer has a 30-second phase deadline inside the existing whole-call deadline; disconnect or upload failure cancels the provider and retires the receiver before a response iterator is created. Both wire modes cap accumulated serialized delta characters at 262,144; overflow closes the provider stream and returns an output_limit error before forwarding the exceeding delta.

Capability inference requires the direct owner dashboard authority used by plugin owner administration: same-origin Origin (or Referer), X-Skulk-Dashboard: pairing-v1, and a direct localhost or verified Tailscale peer. Ordinary LAN, forwarded, relay and paired-bearer requests cannot inherit it. Native mounted-model inference retains its existing behavior. A missing or no longer delegated capability model returns 404; discovery/start failure returns 503. Public-key creation/read failure also returns 503.

The gateway signs exact request/target/catalog facts with a one-use nonce and short expiry. The capability independently enforces its owner policy and account scope before upstream submission. Streaming emits standard text, reasoning and function-call deltas, optional usage, and requires both provider and transport completion before a success finish and [DONE]. Errors after headers emit a bounded error object without a success terminator; non-streaming collection uses the same cancellable transport and returns an error JSON body on such failure. Client disconnect closes the provider session and retires its local receiver, including closure immediately after the first assistant-role event. No provider-specific account integration, TTS engine or tool executor is added to Core. The dashboard's normal code rendering, client tool handling and mounted speech playback compose with these text streams. This adapter does not expose capability models through the instance-constrained, Responses or Claude adapters. Rejected provider events or invalid function-call deltas abort the dashboard's active HTTP request so the provider cancellation path runs without waiting for further output.

Installed native capability reads​

These routes admit installed applications that explicitly select the public skulk.calls/1 profile and have a compatible owner host bridge. They currently serve local unary reads. Discovery does not enroll an application or grant it execution authority. Existing managed inference and legacy plugin routes retain their separate contracts.

Every route requires direct owner dashboard authentication: an actual loopback or verified Tailscale socket peer, X-Skulk-Dashboard: pairing-v1, and an Origin or Referer matching the request URL's scheme, hostname and port. Paired bearer credentials, relay ingress and forwarding headers are refused with 403. The original principal is this node's direct owner realm, rather than an individual human or an identity supplied in the request body.

Method and pathParameters and behavior
GET /v1/native-capabilitiesReturn ready installed native unary read descriptors, their full descriptor revisions, signed runtime digests, actual child node IDs and current process incarnations. Each declaration must match its signed installed manifest and current publisher trust. At most 64 registered installations are probed concurrently across the host, under a shared three-second observation deadline per discovery request; cancellation cleanup may add up to three seconds. Each installation admits one probe at a time before reserving shared slots, so duplicate waiters cannot consume other owners' capacity. Slow metadata verification retains one bounded task and installer fence per installation after an observer times out; completed results are not cached and shutdown drains workers. Invalid, unavailable or unfinished owners are omitted, preserving successfully verified results in installed-path order. Discovery uses the installer's 512 KiB signed-envelope bound and grants no authority or stale cached capacity. An unavailable service returns 503.
GET /v1/native-capabilities/policyReturn protocol, revision, enabled and grants. The initial policy is disabled, has no grants and uses a zero revision. An unavailable service returns 503.
PUT /v1/native-capabilities/policyJSON object containing expected_revision, enabled and a grants array of at most 64 exact enrollments. Each grant contains plugin_id, runtime_digest, capability_id, version, descriptor_revision and processing_domain: "local". Enabling requires each grant to match a live signed unary read. Every successful update creates a new revision, fences queued contexts and cancels active work. A stale revision, conflicting update or unavailable enrollment returns 409. Disabling remains possible while applications are offline.
POST /v1/native-capabilities/{plugin_id}/{capability_id}/{version}/callSend an exact raw JSON object with Content-Type: application/json. Path parameters select one enrolled live implementation. Optional timeout_seconds defaults to 10 and must be greater than zero and at most 30; it covers admission, discovery and execution. Return the application's JSON object. Caller, policy, root and parent fields in user data or custom headers confer no authority.

Call input and output use the native profile's 16 MiB raw body bound. Concurrent byte/frame admission is a host resource bound, separate from request allowances or inference output settings. Content-type refusal returns 415, an oversized input returns 413 and invalid path/query/model parameters return 422. An unavailable or uncertain execution returns 503 with a no-replay message. Calls are never automatically retried. A lost reply cannot establish that execution never happened. HTTP disconnection cancels and drains the active call tree.

The operator enrolls trusted signed code as a local read. This same-account process boundary is not an OS sandbox against malicious installed code. It does not admit governed/write operations, inference routing, native streaming, remote Fabric calls or paired-client native grants. Native context parsing alone never authenticates a caller or authorizes a delegation.

Native inference caller access​

On a compatible experimental host, open Settings → Inference access. Review the signed capability choices for this dashboard or a separately created API client, explicitly enable approved inference access, and save. Read and inference effects and external processing are shown separately. This is immediate access management, independent of the general Settings draft. Account connection and model selection remain in the capability. New client keys are disclosed once, remain unprivileged until separately approved, and can be revoked here. Updates need approval for the exact new release. A stale save returns a conflict: reload and review instead of automatically replaying it. Retained permissions for revoked callers can be explicitly removed.

The native inference adapter explicitly selects signed runtime envelope 5, release envelope 3, skulk.calls/2 and skulk.composition/3. It keeps original caller authentication separate from publisher trust, application readiness and provider accounts. Existing read, operator and chat endpoints retain their own authentication and invocation contracts.

Owners manage access using the direct dashboard authority described above. Management bodies are authenticated before parsing, limited to 128 KiB and have a ten-second upload deadline. Responses use Cache-Control: no-store.

Method and pathParameters and behavior
GET /v1/inference-access/ownerReturn the currently authenticated direct-owner principal fields (identifier, kind, issuer_node_id) using this host's durable manager-profile issuer. Metadata only: no credential, permission or provider identity is created. Direct-owner authentication and no-store headers apply; stale/unavailable host custody returns 503.
GET /v1/inference-access/clientsReturn revision and enrolled client metadata: server-issued identifier, owner label and optional expires_unix_ms. No bearer, bearer digest or digest seed is returned. Unavailable custody returns 503.
POST /v1/inference-access/clientsJSON containing expected_revision, label (1–128 characters), and optional future expires_unix_ms (integer Unix milliseconds; omission/null adds no scheduled expiry). Return 201 with client, new revision and a standard bearer token, disclosed once. The new client has no execution permission. Stale revisions, expired requests or unavailable enrollment return 409. At most 256 active credentials are retained.
DELETE /v1/inference-access/clients/{identifier}JSON body containing expected_revision. Remove that exact credential lifetime and return the new inventory. Stale revisions or unknown clients return 409. Revocation shares the owner's physical dispatch fence and cancels active caller work through bounded authority observation.
GET /v1/inference-access/policyReturn protocol: 1, revision, enabled and callers. An absent policy is disabled with no callers and a zero revision. Provider login and legacy read enrollment do not enable it.
PUT /v1/inference-access/policyJSON containing expected_revision, enabled, and up to 64 callers. Each entry contains principal: {identifier, kind, issuer_node_id}, exact grants, and optional positive maximum_seconds; null adds no owner duration ceiling. A grant contains plugin_id, signed runtime_digest, persisted child node_id, capability_id, version, full descriptor_revision, behavior (read or inference), processing_domain (local, private_site, external) and signed io_mode. At most 64 grants are retained across the policy. Enabling verifies current credentials and exact selected signed declarations, including persisted child identity, independently of readiness. Disabling may retain stale entries for inspection. Stale, mismatched or unavailable enrollment returns 409.

The direct owner's principal is {identifier: "direct-owner", kind: "operator", issuer_node_id: <serving Core identity>}. An enrolled client's identifier is client:<server-issued identifier> with kind client and that same authenticating Core issuer. Neither is read from prompts, custom caller headers or provider account claims. Client creation and permission enrollment are separate changes. Changing a signed runtime or descriptor requires an explicit new enrollment.

Exact native inference invocation​

The matching SDK 1 owner/Core candidate also allows an admitted capability to delegate a streaming child under the original caller. This uses the protected owner channel, not a new HTTP endpoint. The child must be an exact allowed destination with current permission and compatible signed declarations. Its duration intersects any parent, request, caller and signed owner ceilings; absent ceilings add no generation cap. Revocation or disconnect drains owned work, and a media terminal alone cannot complete the parent before target control and cleanup finish. This requires the matching owner candidate; previously issued native packages do not acquire this feature implicitly.

Invocation accepts an authenticated direct owner or an enrolled Authorization: Bearer <token> client. Bearers require a direct HTTPS connection, an actual loopback socket, or a verified Tailscale peer. Forwarding headers, duplicated/invalid credentials and operator-relay ingress are refused. Invalid credentials never fall back to direct owner authority. A client cannot administer enrollment, and owner access does not inherit another client's permissions.

Method and pathParameters and behavior
GET /v1/native-inferenceObserve exact signed, selected, ready inference/read destinations and their current child incarnations. Owners may inspect all declarations for enrollment; clients see only their permitted destinations. A listing includes the full descriptor, target, signed runtime, optional signed inference_seconds ceiling and signed-derived startup_seconds, stream_seconds and cleanup_seconds resource bounds. Stream modes appear only when the actual owner and reader support them. Discovery uses shared bounded host admission; unavailable owners supply no executable capacity and discovery grants no permission.
POST /v1/native-inference/{plugin_id}/{capability_id}/{version}/callSend the exact JSON object as raw application/json. The path selects an exact implementation. Optional positive finite timeout_seconds adds a request duration ceiling; omission adds none. Intersect request, current credential, per-caller owner and signed application ceilings. Return the application's JSON object. Both Core and owner verify original caller, effect, domain, runtime, descriptor, mode, request bytes and active parent bindings. This adapter admits unary read/inference, including authorized delegation between installed applications. It does not select a model or implement a router.

JSON input and schema-validated results obey the frozen portable/2 64 KiB value bound. Larger request content uses declared caller input media. Uploads have an independent ten-second deadline. Resource, health and partial-I/O bounds do not become generation timeouts or request allowances. Unsupported modes and governed effects are not advertised by this adapter. The JSON call endpoint remains unary; qualified stream modes use the separate WebSocket contract below.

Native models in Chat and the unified API​

The experimental native chat adapter uses the same protected broker as the exact native inference endpoints. GET /models and GET /v1/models append caller-authorized native model entries unless status=downloaded. Responses are Cache-Control: no-store. The caller needs exact current grants for the metadata read and chat destination. Invalid or dummy API keys contribute no native models and do not become owner authority; ordinary local model listing continues. Direct dashboard reads send X-Skulk-Dashboard: pairing-v1 and must meet the existing protected peer/origin rules. Enrolled clients use their own bearer. Native discoveries are never shared through an owner-wide caller cache.

Model addresses have the form native/{plugin_id}/{native_capability_id}@{version}/{model_slug}. They select an explicit implementation, not a task classifier or model router. POST /v1/chat/completions accepts that address in model with normal chat parameters, streaming or collected responses, function tools and declared media features. Unknown request fields are refused. Hard local_only and included_only inference policies still apply. Authentication failures return 401/403; an unavailable or unauthorized model returns 403. Each call pins the entire freshly observed runtime/child/declaration and independently checks current caller permission at dispatch and physical delivery. An application may refuse a request before accepting its input body. Core stops uploading and exposes that refusal only after validating the original output terminal, end and control completion. Unaccepted input cannot produce a successful response or receipt; missing or invalid transport completion remains an uncertain outcome. No inference call is automatically retried or redirected to a legacy address.

POST /v1/chat/continuation/receipt accepts the existing independently signed receipt JSON plus optional query native_model, the exact discovered native model address. With that query, metadata and continuation grants are required; the gateway chat grant is not needed for a receipt-only lookup. Omitting it selects the existing owner-only legacy transport. A native refusal never falls back. The model's continuation metadata includes native_model separately from the application's signed target. Native transport identities remain full 64-character digests; existing application proof revisions remain their independent 16-character identities. Application signatures, account/settings policy, nonces and continuation authorization are still enforced by the app.

To expose these contracts, signed native annotations declare inference.envelope=skulk.application-envelope@1.0.0, an opaque inference.envelope.contract, and independent inference.application.id, .version and .revision values. The envelope is exactly {"contract": "<opaque contract>", "revision": "<application revision>", "payload": {}}. The existing generic inference.catalog, inference.contract, inference.authorization and inference.chat annotations identify supported catalog/chat/continuation roles. Metadata and callable declarations must belong to the same plugin, signed runtime, child and incarnation; their application bindings and processing domains must match the catalog. These annotations do not grant permission or replace native or application schema validation.

HTTP output stays inside the native invocation's task and retains byte leases through physical writes. Revocation and disconnect cancel blocked delivery. Native terminal, end, control and descendant completion must be verified before successful completion. A valid semantic refusal also drains terminal/end/control completion before its safe error is delivered. Caller custody and disconnect ownership remain live through the final physical success write after native retirement drains; completed execution cannot delegate again. If collected JSON already started and native retirement or authority then fails, the HTTP transport aborts rather than cleanly acknowledging that body. A parseable partial body is not success. Receipt lookup never regenerates assistant text. A fixed native_outcome_unavailable error means uncertainty, not permission to replay. The dashboard retains an unavailable native selection and disables submission until it is available or the user explicitly selects another model. The adapter adds no generation lifetime, output allowance or usage cap; existing upload, per-write, frame and collected-response memory bounds remain independent resources. Paired/relay or remote-Fabric native authority is not established by these local adapters.

Native inference WebSocket​

WS /v1/native-inference/{plugin_id}/{capability_id}/{version}/stream invokes one exact signed server_streaming, client_streaming or bidirectional destination. Optional positive finite timeout_seconds has the same intersection semantics as the JSON endpoint; omission adds no generation ceiling. The actual installed owner and host reader must support the explicitly selected cohort (0.7.0rc3, 0.7.0rc4, 0.7.0rc5 or 0.7.0rc7). The SDK1 author candidate selects 0.7.0rc7 with its optional discovery1 channel; installed releases keep their original signed binary closure. The issued 0.7.0rc3 cohort keeps its original closure and unary behavior.

The handshake requires one Authorization: Bearer <enrolled token> header over direct WSS, an actual loopback socket, or a verified Tailscale peer. It does not inherit ambient dashboard owner authority. Paired/operator credentials, duplicate or invalid bearers, forwarded transport and operator-relay ingress are refused before acceptance. There are no query-string, cookie or subprotocol credentials. Origin alone supplies no authority. Use a WebSocket client that can set the authorization header; browser JavaScript cannot set it through the standard WebSocket constructor. Authentication/host failures before acceptance result in a refused handshake (normally HTTP 403).

After acceptance the client sends exactly one text message containing the raw JSON input object, within ten seconds and at most 64 KiB. The production server retains its 2 MiB message bound; individual native binary packets use at most 1 MiB media plus 64 KiB metadata. Larger contexts use multiple media packets under the application's declared input contract. These exact bytes bind the original caller context. Core then sends one text event: {"type":"ready","call_id":"<host-assigned ID>","mode":"<signed mode>"}. This event observes the existing admitted call; polling never creates fresh work. One receiver observes disconnects from initial JSON admission through discovery, startup and active streaming. Caller media uses an eight-frame, shared-byte-budget queue plus the current write; queue saturation withdraws the call. A blocked owner write cannot block disconnect observation. Socket liveness is rechecked at protected dispatch/delivery fences and inherited by delegated calls.

Subsequent application messages are binary packets from the public skulk.transport/2 codec (protocol six), not JSON text or base64 wrappers. Use the public native encode_transport_v2_packet / decode_transport_v2_packet APIs. Each packet contains a four-byte big-endian header length, at most 64 KiB of JSON metadata and at most 1 MiB of separate inline media. No aggregate output allowance is imposed. Blob metadata does not cause Core to fetch URLs or paths.

  • In input modes, send the returned call_id, direction caller_to_provider, consecutive sequences starting at zero, started, zero or more chunk frames, and one completed input half-close. A half-close leaves output open. A server-streaming call accepts no input frames.
  • Provider chunk and completed / failed / cancelled frames have direction provider_to_caller, the same call ID and consecutive sequences starting at one. Input/output chunks and completed payloads must match the signed portable schemas. Inline bytes remain separate from their media metadata.
  • A terminal is followed by exactly one native end packet. Core delivers a terminal only after matching native end, application control completion and owned call-tree cleanup have all been verified. Declared failure/cancellation codes contain an empty sanitized message. Terminal kind alone is no success proof, and an unavailable channel never produces a synthetic successful end.

Normal verified completion closes with 1000. Oversized initial input closes with 1009; active authority withdrawal closes with 1008; invalid frames, incomplete outcomes or unavailable execution close with 1011 and a sanitized no-replay reason. A peer disconnect cancels and drains only this call. Signed connect, partial-I/O, write and cleanup bounds remain resource fences; quiet generation does not acquire an implicit idle-output deadline. Current authority is checked again at guarded socket writes. Neither side automatically replays an uncertain request. WebSockets are documented here because OpenAPI cannot describe them.

Each protected readiness, input and output RPC carries the selected application's signed-derived cleanup grace. Cancellation within that grace preserves the authenticated owner channel and unrelated calls. Owner authority also fences pending terminal/end delivery after the application's execution scope has ended; withdrawal cancels that captured root and releases its retained media. The protected channel reserves a separate 96-request media lane alongside its 32-request root/metadata lane, so admitted roots retain readiness/input/output capacity. The same independent lane bounds apply at sending and receiving peers; shared byte/frame budgets still apply to every request and response. Cancelling a queued response before any physical write withdraws that call and retains its reply resources until a sanitized cancellation acknowledgment is delivered. It preserves healthy siblings. Cancellation after a potentially partial authenticated write fences the connection because its framing is uncertain.

The owner rechecks current permission and credential lifetime under the shared policy lock immediately before writing to the application. Active work observes authority changes every 250 milliseconds and is cancelled on withdrawal. Child incarnations and selected destinations are revalidated independently of the permission snapshot: an unrelated offline application cannot remove a lawful permission or redirect work. A read executor cannot delegate inference even if its original caller has broader rights.

Content-type refusal returns 415; oversized input or management bodies return 413; upload expiry returns 408; malformed typed parameters return 422. Invalid client credentials return 401, and unsafe transport or owner-only access returns 403. Unavailable/uncertain execution returns 503 with an explicit no-replay message. HTTP disconnect cancels and drains active work. No host retry is made; revocation or a lost reply cannot prove that earlier execution never occurred.

Credential and permission files belong to the Core manager, outside capability backups. Restoring application state cannot recreate a revoked client. Native profile changes also require a separate qualified state migration even when application schema labels match. This same-account process boundary does not claim an OS sandbox against malicious installed code.

Inference principal.issuer_node_id names the durable authenticating manager as core-profile:<profile_id>, independently of the current Core transport ID. Normal same-profile Core restart/reattachment preserves existing enrollments and revocations. The current serving transport is checked separately before credential access and dispatch; a stale attachment or foreign profile refuses. Credential and policy records use their explicit 128 KiB storage bound.