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_KEYbaseUrl:https://zeroleaks.aitimeoutMs: 30 seconds per HTTP requestfetch: the runtime's globalfetch
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.