Quickstart
Get a key, install the SDK, and run one transform. Each output comes back as a signed URL.
1. Create an API key
Sign in and create a key. It's shown once, copy it somewhere safe.
2. Install the SDK
npm install @transform-kit/sdkRequires Node 20+.
3. Transform an image
Save the example as convert.ts.
import { readFile } from 'node:fs/promises';
import { TransformKit } from '@transform-kit/sdk';
const filename = 'photo.jpg';
const tk = new TransformKit({ apiKey: process.env.API_KEY! });
const [result] = await tk
.runQueue([{ bytes: await readFile(filename), filename }], 'image')
.maxSize(1600)
.convert({ format: 'webp', quality: 82 });
if (!result.ok) throw new Error(result.error);
console.log(result.outputs[0]!.media.url);4. Run the script
API_KEY=tk_your_key_here npx tsx convert.ts