Quickstart
From nothing to a transformed image in about two minutes: get a key, install the SDK, and make one call.
1. Get an API key
Sign in and create a key. It's shown once — copy it somewhere safe.
Keep it server-side
A TransformKit key is a secret. Anyone who has it can spend your monthly quota, so treat it like a database password: keep it in an environment variable and never ship it in client-side code.2. Install the SDK
npm install @transform-kit/sdkThe SDK is a small, typed client with zero runtime dependencies. Node 20+.
3. Convert your first image
convert.ts
import { readFile } from 'node:fs/promises';
import { TransformKit } from '@transform-kit/sdk';
const tk = new TransformKit({ apiKey: process.env.API_KEY! });
const [photo] = await tk
.runQueue([{ bytes: await readFile('photo.jpg'), filename: 'photo.jpg' }], 'image')
.maxSize(1600) // cap the longest side (never upscales)
.convert({ format: 'webp', quality: 82 });
if (!photo.ok) throw new Error(photo.error);
const { url, width, height, file_size } = photo.outputs[0]!.media;
console.log(url);
console.log(width, height, file_size);4. Run it
API_KEY=tk_your_key_here npx tsx convert.tsEach output's media.url is a signed link you can drop into an <img> or fetch into your own storage. How uploads, jobs, and expiry work → Core concepts.
Next steps
- Recipes — more transforms, fan-out, and error handling.
- Node.js and Next.js — wire the SDK into an app.
- HTTP & curl — the raw endpoints for any language.