HumanReviewed docs

TypeScript SDK

@humanreviewed/sdk — a thin, typed client over the /v1 API, with client-side canonical hashing.

bash
npm install @humanreviewed/sdk
typescript
import { HumanReviewedClient } from "@humanreviewed/sdk";

const hr = new HumanReviewedClient({
  baseUrl: "https://api.humanreviewed.ai",
  apiKey: process.env.HR_API_KEY!,   // omit for verify-only usage
});

await hr.registerIdentity({ subject, tier: 1, displayName });
const request = await hr.requestApproval({ artefact, agentId, agentRunId, reviewScope, signerIdentityUid });
const status  = await hr.getRequest(request.id);
const verdict = await hr.verify(uid);          // public, no key
const att     = await hr.getAttestation(uid);  // public

Methods

MethodAuthNotes
registerIdentity(input)keyRegister a signer identity
requestApproval(input)keyPass artefact to hash client-side, or artefactHash
getRequest(id)publicRequest status
submitReview(input)keyFor human-driven signer systems, not autonomous agents
verify(uid)public7-status verdict
getAttestation(uid)publicRaw attestation

Errors throw SdkError carrying the server code and HTTP status.