TypeScript SDK Official, built by Rendobar11,445 downloads

Process video with TypeScript

Use @rendobar/sdk to call Rendobar's FFmpeg API, Compose API and every other job type from Node 18+, Bun, Deno or Workers. It waits for the output and verifies webhook signatures.

View on npm Read the docs
transcode.ts
import { createClient, outputUrl } from "@rendobar/sdk";
const rb = createClient({ apiKey: process.env.RENDOBAR_API_KEY });
// Each input name is a file the command reads with -i.
const job = await rb.jobs.create({
type: "ffmpeg",
inputs: { "source.mp4": "https://cdn.rendobar.com/assets/examples/sample.mp4" },
params: { command: "ffmpeg -i source.mp4 -vf scale=1280:-2 -c:v libx264 -crf 23 out.mp4" },
});
// Polls until the job ends. Throws JobFailedError if it fails.
const done = await rb.jobs.wait(job.id, { throwOnFailure: true });
console.log(outputUrl(done)); // signed URL of out.mp4

Overview

Install @rendobar/sdk and every Rendobar job becomes a typed call from your code: FFmpeg commands, timeline videos, captions and AI images. rb.jobs.create submits a job and rb.jobs.wait polls until it completes, fails or is cancelled. With no timeout set, the wait follows the job's own time limit from your plan. Local files go up with rb.uploads.create, and verifyWebhook checks a delivery's signature from its own entry point with no runtime dependencies. The client retries 429 and 5xx responses twice by default, on Node 18+, Bun, Deno, Workers and the browser.

Set up

  1. Install

    Add the package and put a new API key in RENDOBAR_API_KEY.

    npm install @rendobar/sdk
  2. Create a client

    Make one client and reuse it. It retries 429 and 5xx responses twice by default.

    const rb = createClient({ apiKey: process.env.RENDOBAR_API_KEY });
  3. Submit and wait

    rb.jobs.create sends the job and rb.jobs.wait returns it once it completes, fails or is cancelled.

    const done = await rb.jobs.wait(job.id, { throwOnFailure: true });

Questions

Which runtimes does @rendobar/sdk support?

Node 18 or later, Bun, Deno, Cloudflare Workers and the browser. It ships ESM and CommonJS with full types.

How long does jobs.wait keep polling?

With no timeout it follows the job's own time limit from your plan, plus two minutes of grace for the upload, and never less than five minutes. Pass timeout to set your own bound. It throws WaitTimeoutError when the bound runs out, and returns a failed job unless you pass throwOnFailure: true.

How do I send a local file with the SDK?

Call rb.uploads.create with the file's bytes and a filename. It returns an asset, and asset.url goes into inputs like any other URL. Uploads are kept for 24 hours unless you pass persist: true.

How do I verify a Rendobar webhook in TypeScript?

Import verifyWebhook from @rendobar/sdk/webhooks and pass it the raw body, the headers and your secret. It rejects deliveries older than 5 minutes.

All integrations