SDK Quick Reference
All common Highflame SDK patterns side by side — Python and TypeScript. Installation, client setup, guard evaluation, Shield wrappers, ZeroID, error handling, streaming.
Installation
SDK
Command
pip install 'highflame[langgraph]'
pip install 'highflame[crewai]'
pip install 'highflame[strands]'Client Initialization
from highflame import Highflame
client = Highflame(api_key="hf_sk_...")import { Highflame } from "@highflame/sdk";
const client = new Highflame({ apiKey: "hf_sk_..." });Evaluate a Prompt
resp = client.guard.evaluate_prompt("user message")
if resp.denied:
raise PermissionError(resp.policy_reason)const resp = await client.guard.evaluatePrompt("user message");
if (resp.decision === "deny") {
throw new Error(resp.policy_reason ?? "Blocked");
}Evaluate a Tool Call
Full GuardRequest
Shield Decorators / Wrappers
Async Evaluation
Error Handling
Enforcement Modes
ZeroID — Issue and Verify Tokens
ZeroID Identity Helper Methods
ZeroID + Shield — Two-Layer Pattern
Streaming
Client Options Reference
Option (Python)
Option (TypeScript)
Default
Description
Last updated