GET/1.0/shims/:id/weights
Returns the published version's weights file, as @zerowidth/shims-sdk loads it. Required scope: workbench:shims:read (scopes reference).
The URL does not change when you publish a new version, so a build step that fetches it ships whatever is published at the time. Publishing in Workbench is the release.
Path parameters
idstringRequiredThe shim's stable id, from GET /1.0/shims or the Quickstart tab in Workbench.
Response
The weights file as application/json, sent as an attachment named <shim>-<version>.weights.json. The X-Shim-Version header carries the version label that arrived.
curl -H "Authorization: Bearer $ZEROWIDTH_API_KEY" \
-o support-triage-v2.weights.json \
https://api.zerowidth.ai/1.0/shims/6607ac72-4e8e-47e2-8b83-a011a10b4ea7/weights
Then, in your app:
import { Shim } from "@zerowidth/shims-sdk"
import weights from "./support-triage-v2.weights.json" with { type: "json" }
const shim = new Shim(weights)
const decision = await shim.decide("I was charged twice this month")
decision.answer // "billing"
decision.confidence // 0–1
decision.action // "act" | "suggest" | "refuse"
The encoder the SDK needs (about 32 MB) downloads once and is shared by every shim. Each decision runs locally.
Returns 404 not_found when the id doesn't exist in the key's workspace, and 404 not_found with the message Nothing is published for this shim yet. when the shim has builds but no published version.