Direct API
One authenticated POST. Partner keys are free during the hackathon.
Every verdict carries its policy, every input's receipt, and a hash anyone can recompute. Pick the way in that suits you.
One authenticated POST. Partner keys are free during the hackathon.
One paid /engine/v1/ask, routed to the Skein miner or pinned to its ID.
POST any verdict id to /v1/verify and get each recomputed step back.
@skeinlabs/sdk for TypeScript agents; @skeinlabs/mcp gives Claude, Cursor or any MCP client three tools.
POST the token and a policy. Async mode returns an id at once.
Stream the events: each paid answer lands as its own thread.
Every response carries X-Skein-Verdict-Hash and X-Skein-Bom-Root. POST /v1/verify recomputes both.
A replayed Idempotency-Key returns the original verdict and is not charged again.
curl -X POST https://api.skeinlabs.site/v1/verdicts \
-H "Authorization: Bearer $SKEIN_PARTNER_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"subject": { "chainId": 8453, "token": "0x…" },
"policy": "dex-list@0.1.0",
"mode": "async"
}'const id = (await res.json()).id;
const events = new EventSource("https://api.skeinlabs.site/v1/verdicts/" + id + "/events");
events.addEventListener("finding", (e) => draw(JSON.parse(e.data)));
events.addEventListener("done", (e) => seal(JSON.parse(e.data)));Any Telegraph app reaches Skein with one paid ask. The call settles from your own escrow and counts as your own Telegraph purchase; Skein's upstream receipts ride along in the bill of materials.
POST /engine/v1/ask
{
"intent": "FRAUD_RISK_TOKEN_LISTING",
"params": { "token": "0x…", "chain": "base" }
}
→ 402 challenge → sign → X-PAYMENT → verdict + receiptverdict(), quote(), verify() and stream(), typed errors, retries that reuse the idempotency key, and a spend cap checked before any payment. Pays with a partner key or through Telegraph.
import { Skein } from "@skeinlabs/sdk";
const skein = new Skein({
apiUrl: "https://api.skeinlabs.site",
payer: { kind: "apiKey", key: process.env.SKEIN_KEY! },
maxUsdcPerCall: 0.3, // refused before paying above this
});
const v = await skein.verdict({
subject: { chainId: 8453, token: "0x…" },
});
if (v.verdict !== "APPROVE") return skip(v.reasons);
await skein.verify(v.id); // recompute itThe MCP server pays inside, with a per-call and a per-session cap, and returns the verdict as text an agent can act on plus the full object.
{
"mcpServers": {
"skein": {
"command": "npx",
"args": ["-y", "@skeinlabs/mcp"],
"env": { "SKEIN_API_KEY": "sk_part_…" }
}
}
}
// Claude Code: claude mcp add skein --env SKEIN_API_KEY=sk_part_… -- npx -y @skeinlabs/mcp
// tools: skein_verdict · skein_quote · skein_verifybase https://api.skeinlabs.site
/v1/verdictspartner keyRun a verdict. mode "async" returns 202 and an id./v1/verdicts/{id}publicThe verdict object, or { status: "running" }./v1/verdicts/{id}/eventspublicServer-sent events: plan, purchase, finding, decision, done./v1/verdicts/{id}/bompublicBill of materials: every paid input and its receipt./v1/verifypublicRecompute a verdict from its raw answers./v1/quotepublicWhat a verdict would buy and cost for a token, without buying./v1/policiespublicPublished policies. /v1/policies/{id@version} returns one./v1/statuspublicLive intents, miners, spend and season state./v1/ledgerpublicVerdicts served, upstream spend, recent ids./miner/verdictTelegraphThe miner endpoint Telegraph routes paid asks to.{ error: { code, message, details } }INVALID_SUBJECT400Unknown chain or a malformed token address.
UNKNOWN_POLICY400No published policy by that id and version.
IDEMPOTENCY_KEY_REQUIRED400POST /v1/verdicts needs an Idempotency-Key.
PAYMENT_REQUIRED402No partner key sent: send one, or buy through Telegraph.
UNAUTHORIZED401Unknown or revoked partner key.
IDEMPOTENCY_CONFLICT409The key was used with a different body.
BUDGET_TOO_LOW422Live floors exceed your budget; refused before any spend.
RATE_LIMITED429Slow down; Retry-After says how long.
UPSTREAM_UNAVAILABLE503A required intent has no live miner right now.
DAILY_CAP_REACHED503Skein's own spend cap for the day is used up.
TIMEOUT504Upstream answers did not arrive in time.