Skip to content
/docs

SDK Modes

Current TypeScript SDK runtime modes.

The current TypeScript SDK is cloud-backed for execution-time Guard, Charter, approval polling, and dashboard visibility.

Cloud

Default API target: https://api.veto.so.

import { Veto } from "veto-sdk";

const veto = await Veto.init({
  apiKey: process.env.VETO_API_KEY!,
});

Veto.init() also reads VETO_API_KEY and VETO_BASE_URL:

const veto = await Veto.init();

Cloud mode provides:

  • Guard decisions through /v1/validate
  • Charter chat and policy compilation
  • tool registration for Charter
  • human approval polling
  • dashboard auditability

Self-Hosted API

Point the SDK at your own Veto API endpoint:

const veto = await Veto.init({
  endpoint: "https://veto.internal.example.com",
  apiKey: process.env.VETO_API_KEY!,
});

The endpoint must expose the same API contract as Veto Cloud for the SDK methods you use.

Local Rule Utilities

The package also exports local rule helpers under veto-sdk/rules:

import { evaluateRulesLocally } from "veto-sdk/rules";

These are utility functions. They are not the same as Veto.init() and do not provide Charter, approvals, dashboard logging, or cloud policy management.