ZeroLeaks
API Reference

Client

ZeroLeaks client construction, authentication, transport options, health, and capabilities.

Client

new ZeroLeaks(options?)

interface ZeroLeaksOptions {
  apiKey?: string;
  baseUrl?: string;
  timeoutMs?: number;
  fetch?: typeof globalThis.fetch;
}

Defaults:

  • apiKey: process.env.ZEROLEAKS_API_KEY
  • baseUrl: https://zeroleaks.ai
  • timeoutMs: 30 seconds per HTTP request
  • fetch: the runtime's global fetch
const zeroleaks = new ZeroLeaks({
  apiKey: process.env.ZEROLEAKS_API_KEY,
  timeoutMs: 60_000,
});

createZeroLeaks(options?) is an equivalent factory.

Discovery

await zeroleaks.health.check();
await zeroleaks.capabilities.get();

These methods do not require authentication. capabilities.get() returns supported scan modes, target models, reasoning efforts, knowledge profiles, attack surfaces, adapters, and API limits.

On this page