@acretix-verify/sdk
v0.1.0
Published
TypeScript client for the AI Verify API — rubric-based verdicts with signed, re-verifiable proofs.
Downloads
183
Readme
@acretix-verify/sdk
TypeScript client for the AI Verify API — submit work against a rubric and receive a scored, explained verdict with an Ed25519-signed, independently re-verifiable proof.
import { AcretixVerify } from '@acretix-verify/sdk';
const client = new AcretixVerify({ apiKey: process.env.VERIFY_API_KEY! });
const rubric = await client.compileRubric({
name: 'invoice-check',
criteria: [
{ key: 'total_present', type: 'must_have', primitive: 'regex_match@1', config: { pattern: 'Total: \\$[0-9]+' } },
],
});
const verdict = await client.submitVerification(
{ rubric_id: rubric.rubric_id, submission: { inline: 'Invoice... Total: $420' } },
{ waitMs: 30000, idempotencyKey: 'invoice-001' },
);
// verdict.determination: 'met' | 'partial' | 'not_met' — flagged=true means needs_review:
// below the confidence threshold the engine abstains rather than asserting a verdict.
const report = await client.reverify(verdict.verification_id);
// report.ok && report.chain_ok — the proof verifies against the published public key.- Verdicts below the confidence threshold are flagged
needs_review— the engine abstains instead of guessing; your application decides what happens next. - Proofs are signed with Ed25519 and re-verifiable by any third party against the published public key — see the docs for the proof format.
- Also available:
getVerification,waitForVerification,getProof,getUsage,submitFeedback. - Usage is metered per verification by judge tier.
Zero runtime dependencies. Node 18+ (built-in fetch).
License: MIT
