Render Tutorials
Batched image generation with Render Workflows

Run one generation locally

⏱ 6 min

In this step you’ll get a working baseline: one prompt, one model, one image in MinIO. Once that loop is solid, the rest of the tutorial just adds dimensions to the fan-out.

Start the local workflow server

The Render CLI’s workflows dev command starts a local task server on port 8120 and hot-reloads your code on save.

Terminal
$cd typescript/workflow-ts
$render workflows dev -- npx tsx src/index.ts
Local workflow server listening on :8120 Registered tasks: generateThumbnails, generateThumbnail
Terminal
$cd python/workflow-python
$render workflows dev -- python main.py
Local workflow server listening on :8120 Registered tasks: generateThumbnails, generateThumbnail

In a second terminal, confirm the tasks are registered.

Terminal
$render workflows tasks list --local
generateThumbnails generateThumbnail

Trigger one generation

The Render CLI 2.12.0+ can start a task directly. Pick the model that matches the API key you set in step 2.

Terminal
$render workflows start generateThumbnails --local --input '["Why fan-out beats sequential generation", ["gemini-3-pro-image-preview"], "photorealistic", "bottom-bar", "inter", "", ""]'
Run started: <run-id> Subtask generateThumbnail (gemini-3-pro-image-preview): success Result: https://localhost:9000/thumbnails/<uuid>.jpg
Terminal
$render workflows start generateThumbnails --local --input '["Why fan-out beats sequential generation", ["gemini-3-pro-image-preview"], "photorealistic", "bottom-bar", "inter", "", ""]'
Run started: <run-id> Subtask generateThumbnail (gemini-3-pro-image-preview): success Result: https://localhost:9000/thumbnails/<uuid>.jpg

The input is a JSON array because render workflows start passes positional task arguments. In order, the values are title, models, style, template, font, context, and extraPrompt. That shape matches the API server in the reference repo, so the same validation and task code apply whether the caller is the CLI, the API, or your own script.

Verify the image landed in MinIO

Open the MinIO console at http://localhost:9001 (default credentials are minioadmin / minioadmin) and browse the thumbnails bucket. You should see one JPEG matching the run id from the output above.

Show hint

Use the run id from the CLI output to find the matching lines in the local workflow server logs. If the provider returns Unauthorized, check the matching API key in .env.local. If the upload fails with ECONNREFUSED, MinIO is not running or MINIO_ENDPOINT still points somewhere else. If the provider says the model was not found, pick a model id from shared/models.json that matches the key you set.

What you learned

  • `render workflows dev` runs the workflow service locally and registers tasks on :8120
  • `render workflows start --local --input` calls a registered task with a JSON input array
  • A single (prompt, model) call uploads its finished JPEG to MinIO
  • From here, every step adds a dimension to the fan-out without changing this loop