Skip to content
skein
Integrate

One integration
instead of seven.

Every verdict carries its policy, every input's receipt, and a hash anyone can recompute. Pick the way in that suits you.

[ → ]Four ways in
live

Direct API

One authenticated POST. Partner keys are free during the hackathon.

Nov 1

Through Telegraph

One paid /engine/v1/ask, routed to the Skein miner or pinned to its ID.

live

Verify anything

POST any verdict id to /v1/verify and get each recomputed step back.

live

SDK and MCP

@skeinlabs/sdk for TypeScript agents; @skeinlabs/mcp gives Claude, Cursor or any MCP client three tools.

[ → ]Quickstart

Ask, watch, verify.

  1. 01

    Ask

    POST the token and a policy. Async mode returns an id at once.

  2. 02

    Watch

    Stream the events: each paid answer lands as its own thread.

  3. 03

    Verify

    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.

shell · run a verdict
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"
  }'
browser · stream it
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)));
Through Telegraph · from Nov 1

No account. Pay per verdict.

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.

telegraph · /engine/v1/ask
POST /engine/v1/ask
{
  "intent": "FRAUD_RISK_TOKEN_LISTING",
  "params": { "token": "0x…", "chain": "base" }
}
→ 402 challenge → sign → X-PAYMENT → verdict + receipt
[ → ]SDK and MCP

One function.

verdict(), 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.

typescript · @skeinlabs/sdk
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 it

One server entry.

The 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.

mcp client config · @skeinlabs/mcp
{
  "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_verify
[ → ]Endpoints

base https://api.skeinlabs.site

  • POST/v1/verdictspartner keyRun a verdict. mode "async" returns 202 and an id.
  • GET/v1/verdicts/{id}publicThe verdict object, or { status: "running" }.
  • GET/v1/verdicts/{id}/eventspublicServer-sent events: plan, purchase, finding, decision, done.
  • GET/v1/verdicts/{id}/bompublicBill of materials: every paid input and its receipt.
  • POST/v1/verifypublicRecompute a verdict from its raw answers.
  • GET/v1/quotepublicWhat a verdict would buy and cost for a token, without buying.
  • GET/v1/policiespublicPublished policies. /v1/policies/{id@version} returns one.
  • GET/v1/statuspublicLive intents, miners, spend and season state.
  • GET/v1/ledgerpublicVerdicts served, upstream spend, recent ids.
  • POST/miner/verdictTelegraphThe miner endpoint Telegraph routes paid asks to.
[ → ]Errors

One error shape. Refusals happen before money moves.

{ error: { code, message, details } }
INVALID_SUBJECT400

Unknown chain or a malformed token address.

UNKNOWN_POLICY400

No published policy by that id and version.

IDEMPOTENCY_KEY_REQUIRED400

POST /v1/verdicts needs an Idempotency-Key.

PAYMENT_REQUIRED402

No partner key sent: send one, or buy through Telegraph.

UNAUTHORIZED401

Unknown or revoked partner key.

IDEMPOTENCY_CONFLICT409

The key was used with a different body.

BUDGET_TOO_LOW422

Live floors exceed your budget; refused before any spend.

RATE_LIMITED429

Slow down; Retry-After says how long.

UPSTREAM_UNAVAILABLE503

A required intent has no live miner right now.

DAILY_CAP_REACHED503

Skein's own spend cap for the day is used up.

TIMEOUT504

Upstream answers did not arrive in time.