s46.apiv1

s46 API

Source API reference for the control plane and model gateway.

Release status

These pages describe the current source contract, including runtime metadata, cloud protocol normalization, independent-policy gates, session-control removal, and operator-only worker provisioning. They do not establish deployed availability or a new stable CLI release. No production trust policy is supplied or provisioned by these changes. Production URLs below identify service endpoints, not evidence that a model is live. The dated model assurance status records the current Devstral and DeepSeek evidence without collapsing identity, certification, publication, activation, and inference.

Two base URLs

The control plane handles identity and configuration; the harness gateway handles model calls.

https://api.s46.dev

Auth, account, teams, sessions, admin, models, worker control.

https://gateway.s46.dev

OpenAI-, and Anthropic-compatible model calls.

Build in this order

#StepWhere
1Check status endpoints and wire JSON error handling.Operations
2Implement auth; store device-bound access and refresh credentials.Auth
3Read the current account, then resolve the selected team's metadata.Account · Teams
4Use the team's endpoint, authorized models, and modelMetadata; check the configured default is allowed.Gateway
5If the user is an org/team admin, expose admin and model-policy routes.Admin · Models
6Operators provision workers; returned worker credentials authorize lifecycle calls, not provisioning.Worker control

Core rules

  • The API is org-scoped. Teams use canonical @org/team identifiers, e.g. @s46/engineering.
  • User-facing clients use user-scoped bearer tokens from the invite-gated device flow.
  • Admin authorization accepts only owner and admin roles.
  • Membership roles are exactly owner, admin, member, and viewer.

Request conventions

Authenticated JSON endpoints expect a bearer token and JSON content negotiation:

Authorization: Bearer <accessToken>
Accept: application/json
Content-Type: application/json

Browser flows may instead use the HTTP-only s46_access / s46_refresh cookies returned when a login or refresh request sends X-S46-Use-Cookies: true.

Path parameters must be URL path-escaped. This matters for team IDs, emails, device IDs, worker/job/session IDs:

ValuePath segment
@s46/engineering%40s46%2Fengineering
dscape@s46.devdscape%40s46.dev
@dscape/auth-redirect-fix%40dscape%2Fauth-redirect-fix

Query parameters must be query-escaped, e.g. ?team=%40s46%2Fengineering.

Route groups

GroupPrefixStart here
Operations/healthz · /readyz · /debug/varsStatus and diagnostics
Auth/v1/auth · /deviceSign in and refresh
Account/v1/me · /v1/devicesUser and devices
Teams / sessions/v1/teams · /v1/sessionsTeam config and sessions
Admin/v1/adminOrgs, people, workers, jobs
Models/v1/admin/models · /v1/admin/model-policiesRelease catalog and team policy
Model assurancesigned registry · readiness · servingSeparate evidence and availability states
Worker control/v1/worker · /v1/internalRegister and lease jobs
Harness gatewaygateway.s46.devModel APIs

Error envelope

Branch on HTTP status plus error.code; never parse message for control flow. Readiness status bodies and in-stream errors have their own shapes — see Errors.

{
  "error": {
    "code": "invalid_request",
    "message": "invalid request"
  }
}

See the full status and code catalog →

On this page