This page covers everything you need to add the SW Combine SDK to your project: package installation, Node.js and TypeScript version requirements, environment variable setup, and how to import the SDK in ESM and CommonJS projects.Documentation Index
Fetch the complete documentation index at: https://swc-sdk.zeltros.dev/llms.txt
Use this file to discover all available pages before exploring further.
Requirements
Before installing, confirm your environment meets these requirements:- Node.js 18 or higher — the SDK uses native
fetch-compatible APIs and async iteration - TypeScript 5.5 or higher — required if you use TypeScript; the SDK ships with strict type definitions
- axios is the only production dependency and is installed automatically
Install the package
Import styles
The SDK ships as both ES Modules and CommonJS, so it works in any Node.js project regardless of whether you useimport or require.
ES Modules (recommended)
Use named imports in.ts, .mts, .mjs, or any project with "type": "module" in package.json:
CommonJS
Userequire in .js or .cjs files, or any project without "type": "module":
TypeScript users: the SDK’s type declarations are automatically resolved regardless of which
module format you use. No extra
@types package is needed.Set up environment variables
Store your SW Combine API credentials in environment variables rather than hardcoding them. Create a.env file at your project root:
You don’t want to really store your
SWC_ACCESS_TOKEN in a .env files since they have a short
lifespan (1 hour).TypeScript configuration
The SDK uses modern TypeScript features. Yourtsconfig.json should target at least ES2020 and enable strict mode:
If your project uses
"module": "CommonJS", the SDK’s CJS build is picked up automatically via
the exports field in its package.json. No extra configuration is needed.Verify the installation
After installing, confirm the SDK is working with a quick public API call that requires no credentials:Next steps
Quickstart
Step-by-step guide to making your first authenticated API call.
Authentication
Set up OAuth 2.0 and get an access token to use authenticated endpoints.