stile
SDKs

SDKs

Two official SDKs — a frontend widget and a server-side Node.js client — plus a language-agnostic HTTP API for everything else.

Stile ships two official SDKs that split cleanly by where your code runs. A typical integration uses both: the widget on the frontend to run the verification flow, and the Node.js client on the backend to create sessions and verify webhooks.

SDKPackageRunsUse it to
Widget SDK@stile/widgetThe browserEmbed the verification UI — web components plus a JavaScript API.
Node.js SDK@stile/nodeYour serverCall the API with types — create sessions, verify webhook signatures.

You don't need an SDK to integrate

Both SDKs wrap the same HTTP API. If you work in Python, Ruby, Go, PHP, or any other language, call the API directly — every endpoint is documented, and webhook signatures can be verified in any language.

Widget SDK — @stile/widget

The frontend half of an integration. Load <stile-frame> from the CDN with a single script tag, or install the npm package for the full kit (<stile-button>, the <stile-frame> iframe embed, and the verify() / create() JavaScript APIs). The widget handles the camera, document capture, and the entire verification UI — your page just listens for the result.

<script src="https://js.stile.id/v1/stile.js"></script>

Node.js SDK — @stile/node

The backend half. A typed, server-only client where every method maps 1:1 to an HTTP endpoint — create sessions, manage webhook endpoints, read events, and verify webhook signatures in one line.

npm install @stile/node
import Stile from "@stile/node";

const stile = new Stile(process.env.STILE_API_KEY!);

Which do I need?

  • Just gating a checkout or signup? The Widget SDK on the frontend plus a webhook handler on the backend is the whole integration. Start with the Quickstart.
  • Creating sessions from your backend (recommended for production)? Use the Node.js SDK to mint sessions and hand the client_secret to the widget via its session-url mode.
  • Not on Node, or building a custom UI? Use the HTTP API directly.

Next steps

On this page