# Install

Add @splitch/sdk and get one Flag resolving.

```bash
npm install @splitch/sdk
```

ESM only. Node 20 or newer, browsers, and edge runtimes. `zod` is the sole dependency.

## Hello world

Paste the `keyMaterial` field from `splitch client-key get` (a `pk_…` value). The response's `keyId` (`ck_…`) identifies the key; it is not the credential.

```ts
import { createSplitchClient } from "@splitch/sdk";

const splitch = createSplitchClient({ clientKey: "pk_..." });

const variant = await splitch.evaluate("new-checkout", {
  targetingKey: user.id,
  idempotencyKey: crypto.randomUUID(),
  defaultValue: false,
});
```

That is one HTTP call. There is no local config file to sync and no background poller: the resolution and the Exposure it records happen in the same round-trip.

To create the App, Environment, and Flag this needs, run the [platform quickstart](/quickstart) first.

Source: https://splitch.dev/docs/sdk/install