Connecting to a farm
A call resolves to the response body and rejects on any non-2xx. There is nothing to unwrap.
fetch and WebSocket are the implementation rather than a setting on purpose. Trusting a studio certificate authority is written differently on every runtime: Bun takes tls: { ca } on a request, Node’s fetch wants an undici dispatcher, and a browser allows neither.Finding the operation you want
Method names are the API document’s operation ids. There is no shorter alias layer.
The groups are
jobs, jobsArchived, tasks, nodes, pools, users, userGroups, schedule, licenses, errors, webhooks, info and service. Every request and response type is exported beside them, so JobCreate, Node and WebhookEvent are all importable.
Path parameters are positional and in the document’s order. A query object is the last argument, and a body comes before it.
Submitting
type, file and host are required on every one of them, and the API reference lists the fields each type takes.
{ wait: true } blocks until the job is built and answers 201. Without it the call answers 202 with a job that is still being prepared. A job arrives as pending by default and will be picked up; pass status: "suspended" to have it wait for an operator.
A job with several steps is the same call with a
steps array instead of the flat fields, and each step’s configuration is its props, the tagged union the submitter fills in. Those are worth reading rather than guessing: build the chain once in the submitter, read it back with rf.jobs.getJob(id), and send that steps array with your own values. JobCreate and JobStepCreate in the API reference are the full schema.Using the RenderFlow submitter
You do not have to build a submitter of your own. Send the same recipe toopenSubmitter and RenderFlow opens its own submitter on this machine, with the job and the scene’s properties already filled in from what you sent. This is how the Submit to RenderFlow buttons in every supported application work.
opened is false and reason says why. When several people are signed in to one machine, pass { user: "<name>" } as the second argument to open it on that person’s desktop. When the scene lists several render items, the submitter opens one job per item by default; add batch: false to the same object to open a single job.
Waiting for a job
null means the job is no longer there. Archiving and deleting are the same event on the socket, so either way it is not going to finish.
Suspending a job is resumable, so suspended is not in the default set. Add it when a stop is an answer for your caller. There is no default timeout.
Which machines can run a step
When a step is not starting, itswait says whether it is waiting for a render license seat or for a machine that meets its requirements. To see which machines could take it and why the rest cannot, ask for its candidates:
Live updates
One socket, shared by every subscription, opened on the first and closed with the last. No polling, and no second feed: it is the same endpoint the operator UI watches.on is on jobs, tasks and nodes. The second argument narrows it: id on any of them, step_id on tasks. An array is one subscription over several ids rather than several subscriptions.
An insert carries the whole row on doc. An update carries patch, keyed by dotted path, so a job’s progress arrives as patch["progress.percent"] and a step’s task counts as patch["steps.0.task_info.done"]. A delete carries the id and nothing else.
Closing on the last unsubscribe matters more than it sounds: a library that leaves a socket open keeps the process alive, and a script that watched a job to completion would then never exit. Subscribing again dials again.
Paging
limit defaults to 50 and caps at 500. total counts what matches the filter and ignores the window, so it is what a pager needs. Small collections answer with a bare array instead of an envelope: pools, user groups, the schedule, webhooks, licenses.
Errors
A rejection is theResponse, with the parsed body on error:
failure.error.error is one sentence written to be shown to a person as it is, and failure.error.issues carries every validation problem so a form can mark all of its fields at once. The REST API page lists what each status means.
Frames
size is thumb, preview or full. A full frame is transcoded on demand, so it costs the farm something and a wall dashboard should ask for thumb.