Render Tutorials
Batched image generation with Render Workflows

Tour the repo and isolate the workflow

⏱ 6 min

In this step you’ll clone render-examples/blog-thumbnails-workflows, install the workflow service for your chosen language, and set the API keys for OpenAI and Google AI. The frontend and API folders are out of scope.

What’s in the repo

You’ll work in exactly one workflow folder: typescript/workflow-ts/ or python/workflow-python/. The shared/ JSON files define the valid models, styles, templates, and fonts the workflow accepts. Ignore frontend/, api-ts/, and api-python/ until the optional gallery at the end. docker-compose.yml starts local MinIO, and render.yaml deploys the frontend, API, and MinIO. It does not deploy the Workflow service. You’ll create that separately in step 6.

Clone and install

Terminal
$git clone https://github.com/render-examples/blog-thumbnails-workflows.git
Cloning into 'blog-thumbnails-workflows'...
$cd blog-thumbnails-workflows/typescript/workflow-ts
$npm install
added N packages in Ns
Terminal
$git clone https://github.com/render-examples/blog-thumbnails-workflows.git
Cloning into 'blog-thumbnails-workflows'...
$cd blog-thumbnails-workflows/python/workflow-python
$python -m venv .venv && source .venv/bin/activate
$pip install -r requirements.txt
Successfully installed render_sdk ...

Set your API keys

The workflow reads OPENAI_API_KEY and GOOGLE_API_KEY from the environment. Put them in .env.local at the repo root so both workflow implementations load them during local dev.

.env.local
.env.local
OPENAI_API_KEY=sk-...
GOOGLE_API_KEY=AI...
MINIO_ENDPOINT=http://localhost:9000
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin
MINIO_BUCKET=thumbnails

Do not commit .env.local. It contains real provider keys and local storage credentials.

Start the supporting storage container

The workflow uploads finished images to MinIO. Start just MinIO (and its init job that creates the bucket) from the included Docker Compose file. You’ll skip the frontend and API containers.

Terminal
$cd ../..
$docker compose up -d minio minio-init
[+] Running 2/2 Container minio Started Container minio-init Started
Show hint

If Docker is not available, install MinIO another way or point the four MINIO_ env vars at any S3-compatible bucket you control. The workflow only needs an endpoint, access key, secret key, and bucket name.

What you learned

  • The reference repo ships a workflow in both TypeScript and Python. You picked one
  • Only the workflow service and the shared/ config matter for this tutorial
  • Image API keys (OpenAI, Google AI, or both) come from .env.local
  • MinIO runs in a local Docker container as the object storage target