Skip to content

TypeScript SDK

Terminal window
npm install @verusidentity/sdk

Read-only, with no key and no dependencies. Works in Node 18 or newer and in browsers.

import { Verus } from "@verusidentity/sdk";
const verus = new Verus();

Returns every scored model, ranked.

const { rows } = await verus.leaderboard();
console.log(rows[0].model.name, rows[0].summary.score);

Returns one model. summary is missing if the model has not been scored.

const { model, summary } = await verus.model("glm-5-3-flash");

Returns the tests in the current suite.

const tests = await verus.tests();

Failed requests throw a VerusError with the HTTP status.

import { Verus, VerusError } from "@verusidentity/sdk";
try {
await new Verus().model("unknown");
} catch (error) {
if (error instanceof VerusError && error.status === 404) {
console.log("Not a tested model");
}
}

new Verus({ baseUrl }) reads from another deployment. The default is https://verusidentity.co.