Skip to main content

Quick Start

  1. Get an API key from your chosen provider
  2. Add the key to ~/.openclaw/openclaw.json under env.vars
  3. Restart the gateway: openclaw gateway restart
  4. The provider appears automatically in the workflow editor’s media node dropdown

Architecture

Media generation uses a driver architecture in ClawRecipes. ClawKitchen gets its provider list by calling:
This returns every registered driver with availability status. One source of truth — add a driver in ClawRecipes, and it shows up in the Kitchen dropdown automatically.

Image Providers

Google’s native image generation via Gemini models. Fast, high quality, competitive pricing. Setup:
  1. Get a key at Google AI Studio
  2. Install the skill: clawhub install nano-banana-pro
  3. Add to config:
  4. openclaw gateway restart
Models: gemini-2.5-flash-image (default), gemini-3.1-flash-image-preview, gemini-3-pro-image-preview Pricing: ~0.040.04–0.08 per image

OpenAI DALL-E

Setup:
  1. Get a key at OpenAI Platform
  2. Add to config:
  3. openclaw gateway restart
Model: DALL-E 3 Pricing: ~0.04(standard), 0.04 (standard), ~0.08 (HD)

CellCog

Multi-modal AI platform. Requires 500+ credits for Agent Team mode. Setup:
  1. Get a key at CellCog
  2. Add: "CELLCOG_API_KEY": "your-key"
  3. openclaw gateway restart

Video Providers

Runway (Gen-4 Turbo) — Top Quality

Setup:
  1. Get a key at Runway API
  2. Add:
  3. openclaw gateway restart
How it works: Generates a seed image via DALL-E, then animates with Runway. Requires both RUNWAYML_API_SECRET and OPENAI_API_KEY. Output: 10s clips at 1280x768 Pricing: ~$0.60 per 10s clip

Kling (v2) — Budget-Friendly

Setup:
  1. Get a key at Kling AI
  2. Add: "KLING_API_KEY": "your-key"
  3. openclaw gateway restart
Output: 5s clips at 16:9 Pricing: ~$0.07 per 5s clip

Luma (Ray 2)

Setup:
  1. Get a key at Luma AI
  2. Add: "LUMAAI_API_KEY": "your-key"
  3. openclaw gateway restart
Output: 5s clips at 720p Pricing: ~$0.32 per 5s clip

Full Config Example

Only add keys for providers you use. After adding: restart gateway, hard-refresh ClawKitchen.

Using Media Nodes in Workflows

Adding a media node

  1. Open the workflow editor
  2. Add a node → select media-image or media-video
  3. Pick a provider from the dropdown
  4. Write a prompt or use {{variables}} from upstream nodes
  5. Connect to upstream/downstream nodes

Template variables

Use the {{}} button to insert variables from upstream nodes:

skipRefinement

By default, media nodes pass prompts through an LLM refinement step. If your prompt is already detailed (e.g., from a dedicated brief-writing node), add "skipRefinement": true to the node config to skip this and send directly to the provider.

Creating Custom Media Drivers

There are two ways to add media generation providers:

Option 1: Quick — Skill Script (no code changes)

Create a skill with a generation script. ClawKitchen auto-discovers it.
_meta.json:
SKILL.md — document required env vars:
generate_image.py — the generation script:
Script contract: Set up the venv:
Update the shebang to use the venv Python:
Or keep #!/usr/bin/env python3 — the worker auto-detects .venv/bin/python next to the script. After creating, restart the gateway and refresh ClawKitchen — the provider appears in the dropdown automatically via auto-discovery.

Option 2: Full — Registered Driver (best UX)

For tighter integration — custom display names, explicit env-var validation, argparse support — register a driver in ClawRecipes. Step 1: Create the driver file
Step 2: Register in registry.ts
That’s it. The workflows media-drivers CLI command and ClawKitchen’s provider dropdown will include your driver automatically. Step 3 (optional): Add the env key
Restart gateway → provider shows as “available” in the dropdown.

MediaDriver Interface Reference

Utility Functions (from media-drivers/utils.ts)


Troubleshooting

Provider not in dropdown:
  • Verify the API key is in ~/.openclaw/openclaw.json under env.vars
  • Restart gateway + hard-refresh browser
  • Check skill dir exists and contains generate_image.py or generate_video.py
  • Run openclaw recipes workflows media-drivers to see what’s detected
Authentication errors:
  • Double-check key value — no extra spaces or = prefix
  • Verify billing is enabled on the provider’s dashboard
Timeouts:
  • Video generation can take 1–5 minutes
  • Increase node timeout in config (default: 300s images, 600s video)
Poor quality:
  • Use outputFields to have an LLM craft a detailed brief upstream
  • Add a creative brief to shared-context/memory/ (auto-injected into LLM prompts)
  • Set "skipRefinement": true when your brief is already detailed