Docs / Getting started

Authentication

apiKey is the only required option — the constructor throws if it's missing. It's sent as the x-api-key header on every request. Create a key at Dashboard → API Keys and copy it once — the full key can't be recovered later.

auth.ts
import { ZpiClient } from "zpi-sdk"; const client = new ZpiClient({ apiKey: process.env.ZPI_API_KEY }); // The key lives in a private field and never leaks through serialization:JSON.stringify(client); // "{}"
import { ZpiClient } from "zpi-sdk"; const client = new ZpiClient({ apiKey: process.env.ZPI_API_KEY }); // The key lives in a private field and never leaks through serialization:JSON.stringify(client); // "{}"
Edit this page on GitHubWas this page helpful? ·