Requirements
- Node.js 18 or later, Bun 1 or later, or Deno 1.39 or later. The SDK uses the runtime’s built-in
fetch. - An API key from the dashboard. Call the API from your server: a key used in a web page is visible to anyone who opens it.
Install
zod, version 3.25 or 4.
The package describes itself as beta and warns that a minor release can include breaking changes. Pin an exact version, such as npm install --save-exact @vepler/sdk@6.8.0 (a plain install saves ^6.8.0), and upgrade on purpose.
Set your API key
Keep the key out of your code and read it from the environment:apiKeyAuth also accepts an async function that returns the key, if you fetch it from a secrets manager.
Check the key
sdk.heritage.types() needs no product licence and is not charged, so it makes a safe first call:
statusCode 401, the key is missing or not valid.
TypeScript settings
tsconfig.json
libneedsdomanddom.iterable: the SDK’s type definitions use Fetch types such asRequestInfoandHeadersInit, and without themtscreports errors in those files unlessskipLibCheckis on.moduleResolutionmust benodenext,node16orbundlerfor imports from subpaths such as@vepler/sdk/sdk/models/errors. The oldernodesetting cannot resolve them.- With a bundler,
"module": "esnext"and"moduleResolution": "bundler"also work.