TypeScript SDK
@humanreviewed/sdk — a thin, typed client over the /v1 API, with client-side canonical hashing.
npm install @humanreviewed/sdkimport { 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); // publicMethods
| Method | Auth | Notes |
|---|---|---|
registerIdentity(input) | key | Register a signer identity |
requestApproval(input) | key | Pass artefact to hash client-side, or artefactHash |
getRequest(id) | public | Request status |
submitReview(input) | key | For human-driven signer systems, not autonomous agents |
verify(uid) | public | 7-status verdict |
getAttestation(uid) | public | Raw attestation |
Errors throw SdkError carrying the server code and HTTP status.