s46.apiv1

Models

Certify S46 models, publish registry releases, and manage each team's allow-list.

Certify S46 models, publish registry releases, and manage each team's allow-list. Policy set here is what the harness gateway enforces at call time.

Route inventory

MethodRoutePurpose
GET/v1/admin/model-releasesList API-backed model releases.
POST/v1/admin/model-releasesCreate a model release.
GET/v1/admin/model-releases/{releaseId}Read release state and evidence.
POST/v1/admin/model-releases/{releaseId}/upload-sessionOpen a quarantine upload session.
POST/v1/admin/model-releases/{releaseId}/finalize-uploadFinalize artifact metadata into quarantine CAS.
POST/v1/admin/model-releases/{releaseId}/validateQueue S46 certification worker validation.
POST/v1/admin/model-releases/{releaseId}/publishQueue the registry publisher.
POST/v1/admin/model-releases/{releaseId}/yankBlock serving and queue a signed yank.
GET/v1/admin/modelsList certified models the org may allow.
GET/v1/admin/model-policies?team={team}Read a team's allow-list and default model.
PUT/v1/admin/model-policies?team={team}Set a team's allow-list and default model.

Model release lifecycle

POST/v1/admin/model-releases201
POST/v1/admin/model-releases/{releaseId}/upload-session201
POST/v1/admin/model-releases/{releaseId}/finalize-upload200
POST/v1/admin/model-releases/{releaseId}/validate202
POST/v1/admin/model-releases/{releaseId}/publish202
POST/v1/admin/model-releases/{releaseId}/yank202

The API creates release records and queues model-worker jobs; it does not treat an uploaded artifact as certified until a certification worker reports green evidence with threshold signatures.

  1. POST /v1/admin/model-releases creates staged state for { namespace, team, modelSlug }.
  2. POST /v1/admin/model-releases/{releaseId}/upload-session returns a PUT upload URL for the expected SHA-256 and size.
  3. POST /v1/admin/model-releases/{releaseId}/finalize-upload records quarantine CAS metadata under S46_MODEL_QUARANTINE_URI.
  4. POST /v1/admin/model-releases/{releaseId}/validate queues a model.certify job for workers with model_certification.
  5. Worker completion stores green verification evidence, private-holdout suite metadata, threshold-signing records, and Sigsum status.
  6. POST /v1/admin/model-releases/{releaseId}/publish queues model.publish for workers with model_registry_publish; the publisher writes content-addressed artifacts and flips the signed registry index.
  7. POST /v1/admin/model-releases/{releaseId}/yank sets servingBlocked=true immediately, updates the local catalog mirror to fail closed, and queues model.yank for signed advisory/yank publication.

All mutating release actions after create require If-Match; retryable actions also require Idempotency-Key.

curl -X POST https://api.s46.dev/v1/admin/model-releases \
  -H "Authorization: Bearer $S46_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"namespace":"s46","team":"@s46/engineering","modelSlug":"devstral-small-2-24b"}'
{
  "id": "rel_...",
  "namespace": "s46",
  "teamSlug": "@s46/engineering",
  "modelId": "s46/devstral-small-2-24b",
  "version": "r000001",
  "state": "staged",
  "revision": 1,
  "etag": "\"1\""
}

Certified models

GET/v1/admin/models200

The certified catalog is still the serving gate. Each model must be certified, published, trusted, and not globally blocked by advisory/yank state before the gateway can serve it.

Auth · owner / admin

curl https://api.s46.dev/v1/admin/models \
  -H "Authorization: Bearer $S46_ACCESS_TOKEN"
{
  "models": [
    {
      "id": "s46/devstral-small-2-24b",
      "displayName": "s46/devstral-small-2-24b",
      "provider": "s46",
      "certified": true,
      "published": true,
      "verificationState": "trusted",
      "sigsumStatus": "verified"
    }
  ]
}

Team model policy

GET/v1/admin/model-policies?team={team}200
PUT/v1/admin/model-policies?team={team}200

A team's policy determines which certified models the gateway will serve for that team. A request for a model outside the allow-list fails at the gateway with 403 model_not_allowed.

Auth · owner / admin

curl "https://api.s46.dev/v1/admin/model-policies?team=%40s46%2Fengineering" \
  -H "Authorization: Bearer $S46_ACCESS_TOKEN"

curl -X PUT "https://api.s46.dev/v1/admin/model-policies" \
  -H "Authorization: Bearer $S46_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: policy-$(uuidgen)" \
  -d '{"team":"@s46/engineering","modelId":"s46/devstral-small-2-24b","allowed":true}'
{
  "team": "@s46/engineering",
  "modelId": "s46/devstral-small-2-24b",
  "allowed": true,
  "revision": 1,
  "etag": "\"1\""
}

On this page