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.
batches.create({ jobs: [...] }) submits many jobs at once and returns batchId, jobCount, and jobIds. Wait on each id.
Billing. billing.state() for balance and plan, billing.usage({ start, end }) for spend, billing.transactions({ page, limit }) for the ledger.
Webhooks. webhooks.create({ name, url, subscribedEvents }) registers an endpoint. Verify every delivery with the zero-dependency verifyWebhookSignature from @rendobar/sdk/webhooks (reads the X-Rendobar-Signature header, 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
| Option | Default | Purpose |
|---|---|---|
apiKey | — | rb_ key. Required server-side. |
baseUrl | https://api.rendobar.com | API origin. Override for staging. |
timeout | 30000 | Per-request timeout in ms. |
maxRetries | 2 | Auto-retries for 429 and 5xx. |
orgId | — | Default org, sent as X-Org-Id. |
debug | false | Log request metadata. |
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