Skip to content
Beta: the Biskèt Partner API may still change before v1 is final. Sandbox access is by request:partners@bisket.ai.

SDK (TypeScript)

@bisket-ai/partner-sdk is generated from the contract, so its types always match the reference. Node 20+, Deno, Bun and edge runtimes; ESM and CommonJS. It refuses to run in a browser: a secret key belongs on your server.

You need a GitHub account Biskèt gave read access to the package (ask your Biskèt contact).

  1. Create a classic personal access token with only read:packages (GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic)). Fine-grained tokens do not work with GitHub Packages’ npm registry.
  2. Add an .npmrc to your project (it holds no secret):
    @bisket-ai:registry=https://npm.pkg.github.com
    //npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_TOKEN}
  3. Export the token from your password manager and install:
    Terminal window
    export GITHUB_PACKAGES_TOKEN=…
    npm install @bisket-ai/partner-sdk
createBisket({ apiKey }) picks the host from the key (bk_test_ → sandbox, bk_live_ → live); BISKET_API_BASE_URL overrides
every POST an Idempotency-Key (UUID v4), reused across its own retries; pass yours to keep it across restarts
retries 429, 5xx, 408, network errors and 409 idempotency_in_progress, with back-off and Retry-After
errors every non-2xx throws a BisketError (status, code, requestId, errors, retryAfter)
paginate(fetchPage) async iterator over every page
ifMatch(obj), versionOfEtag(etag) If-Match from an object’s version, and back
verifyWebhook(raw, headers, secret) checks Bisket-Signature and returns the event typed by type

The quickstart and every sample on this site use it.