Runnable server-side examples for the
Swap3D developer API and
@swap3d/sdk.
| Example | Purpose |
|---|---|
| Node.js conversion | Convert one local model and download the result. |
| Batch conversion | Convert every supported model in a directory with bounded concurrency. |
| Next.js server route | Keep the API key on the server while accepting browser uploads. |
- Node.js 20 or newer
- A Swap3D API key from the dashboard
Install dependencies from the repository root:
npm installRun an example with the API key in the process environment:
SWAP3D_API_KEY=<your-api-key> npm run convert --workspace node-convert -- \
./model.obj glb ./model.glbNever put SWAP3D_API_KEY in browser code, public environment variables, or
committed files.