The command line
Render a .blend from a terminal, a script or an AI agent with the add-on: blender -c blender_farm, in Blender 4.2 and newer. Sign in, check, test, render and download.
The add-on adds a command to Blender 4.2 and newer, so a terminal, a script or an AI agent can render without opening Blender's window. Blender opens the file, so the add-on finds every texture, library, cache and add-on the scene needs and uploads them, exactly like Upload & Launch in the panel. You only name the file. No Blender where your script runs? Use the HTTP API with an API key instead.
blender -c blender_farm login blender -c blender_farm submit shot.blend --dry-run blender -c blender_farm submit shot.blend --wait blender -c blender_farm download
- 1Install the add-onDrag the zip from Downloads into Blender, or install it without a window:
blender -b --python-expr "import bpy; bpy.ops.preferences.addon_install(filepath=r'/path/to/blender_farm.zip', overwrite=True); bpy.ops.preferences.addon_enable(module='blender_farm'); bpy.ops.wm.save_userpref()". - 2Sign in once
loginprints a link. Open it in any browser where you are signed in to blender.farm, on this computer or your phone, and click Allow. That works on a machine without a screen too. The sign-in is the same one the panel uses, so connecting from the panel works as well. - 3Check before you send
submit FILE --dry-runruns every check and shows what would be rendered, which files it found, any that are missing, and what it would cost. Nothing is saved, uploaded or charged. - 4Render and download
submit FILE --waitrenders and waits, thendownloadfetches its frames, movie and passes into a folder; run it again and it fetches only what is missing. Want a look first?--testrenders up to 5 frames per scene as PNG, usually a quarter of a credit. It is optional.
submit: every option is optional
Without options, the scene the file opens on renders with its own frame range, resolution, samples, camera and output format. Options apply to every rendered scene. They travel with the render and are applied on the render machine, so your .blend keeps its own settings; it changes only the way the panel changes it, by packing its images and saving.
- --frames 1-120
- The frame range, or one frame (
--frames 7). - --step 2
- Every 2nd frame of the range. Without it, the scene's own frame step.
- --scenes A B / --all-scenes
- Which scenes to render, one after another. Without it, the scene the file opens on.
- --format PNG
- Output format: PNG, JPEG, OPEN_EXR, FFMPEG for a video, and the others the panel offers.
- --resolution 1920x1080
- Output size in pixels.
- --percent 50
- Resolution %, applied on top of the size.
- --samples 128
- Cycles or Eevee render samples (with adaptive sampling, the most it takes). Workbench has none.
- --camera CamWide
- Render through this camera object. Refused when the scene switches cameras with timeline markers, because those would win.
- --test
- Optional: a test render of up to 5 frames per scene, as PNG, on one GPU, usually a quarter of a credit.
- --gpus 2
- Split the render across up to 4 GPUs, as in the panel (accounts that have bought credits, image sequences only).
- --dry-run
- Check and show everything, send nothing.
- --yes
- Accepts what the panel would ask you to confirm: the 1-credit fee for a machine that starts while another of yours renders, and the note before a split render. Without it, the command stops, says what it would cost, and changes nothing.
- --ignore-missing
- Launch even though files the render needs are missing (the panel's Render without them).
- --wait
- After the launch, follow the render until it finishes.
- --json
- One line of JSON on standard output instead of text, for scripts and agents. Progress, warnings and the
loginlink go to standard error.
The other commands
- status [ID] [--wait]
- One render by its id (the first 8 characters are enough), or the ones running now.
- list
- Recent renders, running ones first.
- download [ID] [--to DIR] [--wait]
- Every file a render has made, into a folder (without
--to, blenderfarm_<id> where you run it). Without an id, the latest render. Files already there at the right size are skipped.--waitwaits for the render to finish first. - login / logout
- Sign this Blender in with a link, or sign it out. The browser stays signed in either way.
- help [COMMAND]
- The overview, or one command's options.
blender -c blender_farmon its own shows the overview too.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Done. With --wait: the render completed. download: every file is there |
| 2 | Bad arguments |
| 3 | Not signed in, or the sign-in expired: run login |
| 4 | This add-on or this Blender version is no longer supported: update |
| 5 | Needs your OK: run again with --yes |
| 6 | Refused before launch, for the reason printed (missing files, an empty frame range...) |
| 7 | Could not reach blender.farm, or an upload or download failed |
| 8 | Not enough credits |
| 9 | With --wait: the render failed or was stopped |
| 10 | No render with that id on this account |
