Quickstart
render.ts
jobs.create returns a waiting job. jobs.wait polls until a terminal status (complete, failed, cancelled) and returns it.
Jobs
Every method takes an optional{ signal } to abort the request or a wait loop.
Create
type, inputs, and params are per job type. Pass idempotencyKey to make a retry return the original job instead of a duplicate.
Wait, get, list
wait throws if it does not finish before timeout (default 300000). listAll walks every page. Cancel a running job with client.jobs.cancel("job_abc").
Read the output
A job is a union onstatus. output exists only when status === "complete", error only when failed. Narrow first.
outputUrl(job)returns the headline URL: the one file, or the HLS/DASH manifest. It isundefinedfor data-only jobs, file sets, and non-complete jobs.output.filesis every file, for sequences, HLS segments, or a resolution ladder.jobData<T>(job)readsoutput.dataasT | nullfor probe, detection, and transcript jobs. ValidateTyourself for untrusted input.- A
failedjob carriesJobError { code, message, detail, retryable }.
jobs.download(id) returns the raw Response, jobs.logs(id) returns execution logs, jobs.types() lists the job types available to your org.
Other resources
Each takes an optional{ signal }.
Uploads. uploads.create runs the full asset flow and returns an Asset. Reference asset.url as a job input. Ephemeral for 24 hours unless persist: true.
billing.state() for balance and plan, billing.usage({ start, end }) for spend, billing.usageByClient({ days }) for spend grouped by the client that ran each job (dashboard, sdk, cli, mcp, n8n, or api), billing.transactions({ page, limit }) for the ledger.
Webhooks. webhooks.create({ name, url, subscribedEvents }) registers an endpoint. Verify every delivery with the zero-dependency verifyWebhook from @rendobar/sdk/webhooks. Pass the raw body and the request headers. It checks the signature, timestamp freshness, and secret rotation, and returns Promise<boolean>.
realtime.subscribeJob(id, { onProgress, onStep, onComplete }) streams one job, realtime.connect({...}) streams all org events.
@rendobar/sdk as a named type.
Config and errors
Failed requests throw an
ApiError with code, statusCode, message, and retryAfter (on RATE_LIMITED). Narrow with isApiError.
UNAUTHORIZED, FORBIDDEN, VALIDATION_ERROR, INSUFFICIENT_CREDITS, RATE_LIMITED, NOT_FOUND, CONFLICT, INTERNAL_ERROR. The client auto-retries 429 (respecting Retry-After) and 5xx with backoff. Other 4xx throw immediately.
See also
- Job types: the type, inputs, and params for every job
- Webhooks: event payloads and delivery retries
- Job lifecycle: the statuses a job moves through
- Credits and billing: how jobs debit your balance