TypeScript SDK

The official VeldrixAI TypeScript/JavaScript SDK for Node.js and edge runtimes.

Installation

npm install @veldrixai/sdk
# or
yarn add @veldrixai/sdk

Usage

import { VeldrixClient } from "@veldrixai/sdk";

const client = new VeldrixClient({
  apiKey: process.env.VELDRIX_API_KEY,
  baseUrl: "https://api.veldrixai.ca",
});

const result = await client.evaluate({
  prompt: "Summarize this document.",
  response: "The document discusses ...",
  pillars: ["safety", "hallucination"],
});

console.log(result.trustScore);  // 0.87
console.log(result.action);      // "allow"
Was this page helpful?