Getting Started

Install and authenticate the Highflame TypeScript SDK, then add your first Shield wrapper around prompts, tools, or model responses.

This page gets you from zero to a working Shield integration in Node.js or TypeScript.

Requirements

  • Node.js 18+

  • TypeScript 5+ if you want static types

  • No runtime dependencies

Installation

npm install @highflame/sdk

Authentication

Create a client with your API key:

import { Highflame } from "@highflame/sdk";

const client = new Highflame({ apiKey: "hf_sk_..." });

For self-hosted deployments:

const client = new Highflame({
  apiKey: "hf_sk_...",
  baseUrl: "https://shield.internal.example.com",
  tokenUrl: "https://auth.internal.example.com/api/cli-auth/token",
});

apiKey can be:

  • a service key: hf_sk_...

  • an agent key: hfa_...

  • a ZeroID key: zid_sk_...

  • a raw bearer JWT

The SDK exchanges hf_sk_*, hfa_*, and zid_sk_* keys for short-lived JWTs automatically. Raw JWTs are used directly.

Quick Start With Shield

Shield is the primary developer API. It wraps functions with guard checks that run automatically on every call. Blocked calls throw BlockedError.

Handling Blocked Calls

All wrappers return Promise<T> regardless of whether the original function is sync or async.

Where To Go Next

  1. Shield Wrappers for wrapper options and usage patterns

  2. Low-Level Client if you need to inspect GuardResponse directly

  3. Advanced Topics for debugging, streaming, sessions, and runtime options

Last updated