Get Started
Installation
Install MarzbanSDK with npm, yarn, pnpm, bun, Deno, or a CDN, and run it in Node.js, Bun, Deno, the browser, and edge runtimes.
MarzbanSDK is published to npm and works in Node.js, Bun, Deno, browser, and edge runtimes (Cloudflare Workers, Vercel Edge, etc.).
Add to your project
npm install marzban-sdkyarn add marzban-sdkpnpm add marzban-sdkbun add marzban-sdkdeno add npm:marzban-sdkimport { createMarzbanSDK } from 'https://esm.sh/marzban-sdk'No build step — import straight from esm.sh in the browser or Deno.
Requirements
| Runtime | Minimum version |
|---|---|
| Node.js | 18+ |
| Bun | 1.0+ |
| Deno | 1.38+ |
| Browser | Any modern browser (Chrome 90+, Firefox 90+, Safari 15+) |
Node.js 18+ is required because the SDK uses the Web Crypto API (crypto.subtle) for webhook signature verification. Native WebSocket is available from Node.js 21+; older Node versions automatically fall back to the ws package (bundled as an optional peer dependency).
What's included
The package ships with:
- ESM and CJS dual-format bundles — no configuration required.
- Full TypeScript declarations (
.d.ts) generated from the OpenAPI spec. - Tree-shakeable helpers and utilities in separate export paths.
Next steps
- Quick Start — create your first client and make a request.
- Configuration — all options and defaults.