@trulayer/sdk on npm) has zero runtime dependencies and works in Node.js 18+, Vercel Edge, Cloudflare Workers, and Bun. A browser build is available but we recommend relaying through your server for API-key safety.
Install
Minimal usage
Full tutorial & reference — in progress
The full TypeScript SDK walkthrough, configuration guide, and API reference are being written as part of TRU-92. Until then, the Python tutorial is the most complete guide — the TypeScript SDK mirrors the Python API shape closely.README
Current usage docs in the SDK repo.
Python tutorial
Mirrored API — mentally substitute
snake_case → camelCase and context managers → async callbacks.Runtime support
| Runtime | Supported | Notes |
|---|---|---|
| Node.js 18+ | Yes | Uses native fetch |
| Vercel Edge | Yes | |
| Cloudflare Workers | Yes | |
| Bun | Yes | |
| Deno | Yes | Import from npm:@trulayer/sdk |
| Browser | Yes (not recommended) | Exposes your API key — relay via your server instead |
Build output
The package ships both ESM (index.mjs) and CJS (index.js) entry points, plus .d.ts types. Imports work identically in modern toolchains.