@claw-link/content-generator
v1.0.3
Published
AI image and video generation sub-agent for the ClawLink/OpenClaw platform
Maintainers
Readme
@claw-link/content-generator
AI image and video generation sub-agent for the ClawLink platform, powered by OpenClaw.
What it does
- Generates images via OpenAI DALL-E, Stability AI, FAL.ai, Google Imagen, or Midjourney
- Generates videos via Runway ML, Kling AI, FAL.ai, or Seedance (ByteDance)
- Saves files locally to configured storage paths (local files are the source of truth)
- Uploads artifacts to ClawLink for display in conversations and agent panels
- Returns artifact URLs + metadata to the calling agent
Prerequisites
- OpenClaw installed and running
- API key for at least one image provider and/or one video provider
- A ClawLink account (Artifact Token + Tenant ID from Company Profile → Advanced)
Install
npx @claw-link/content-generatorThe installer guides you through:
- Agent ID (default:
cl-content-manager) - Image generation provider + API key + model
- Video generation provider + API key + model
- Local storage paths for generated files
- ClawLink Artifact Token + Tenant ID (from dashboard → Company Profile → Advanced)
Uninstall
npx @claw-link/content-generator --uninstallRemoves the agent from OpenClaw. Your workspace and generated files are preserved.
Supported providers
Image generation
| Provider | Key source | Default model | Notes |
|----------|-----------|---------------|-------|
| openai | platform.openai.com/api-keys | dall-e-3 | Synchronous, URL response |
| stability | platform.stability.ai/account/keys | sd3-large | Binary response (no URL) |
| fal | fal.ai/dashboard/keys | fal-ai/flux/dev | Supports FLUX, SDXL, and more |
| google | aistudio.google.com/app/apikey | imagen-3.0-generate-001 | Inline base64 response, no URL |
| midjourney | cl.imagineapi.dev | — | Unofficial REST API; polls up to 10 min |
Video generation
| Provider | Key source | Default model | Notes |
|----------|-----------|---------------|-------|
| runway | app.runwayml.com/settings/api-keys | gen3a_turbo | Async, polls up to 5 min |
| kling | klingai.com/dev/api-access | kling-v1-6 | Async, polls up to 5 min |
| fal | fal.ai/dashboard/keys | fal-ai/kling-video/v1.6/pro | Queue-based async |
| seedance | fal.ai/dashboard/keys | seedance | ByteDance model via FAL queue |
Task interface
Called by parent agents (main ClawLink agent, meta-sm-manager, others) via OpenClaw.
The calling agent must pass its own agent_id, session_id, and tenant_id so the artifact is attributed correctly in the dashboard.
generate_image
{
"action": "generate_image",
"prompt": "A warm sunlit café interior with wooden tables and plants",
"style": "photorealistic",
"aspect_ratio": "16:9",
"agent_id": "uuid-of-calling-agent",
"session_id": "uuid-of-chat-session-or-null",
"tenant_id": "uuid"
}Optional fields: style, aspect_ratio (default 1:1), negative_prompt, quality (standard | hd)
Style prefixes: photorealistic · illustration · watercolor · minimalist · cinematic
Response:
{
"success": true,
"action": "generate_image",
"result": {
"artifact_id": "uuid",
"public_url": "https://...supabase.co/storage/v1/object/public/generated-artifacts/...",
"local_path": "/abs/path/to/image.png",
"provider": "openai",
"model": "dall-e-3"
},
"errors": []
}generate_video
{
"action": "generate_video",
"prompt": "A slow pan across a mountain range at golden hour",
"duration": 5,
"aspect_ratio": "16:9",
"agent_id": "uuid",
"session_id": "uuid-or-null",
"tenant_id": "uuid"
}Optional fields: duration (seconds, default 4), aspect_ratio, motion_intensity (low | medium | high)
list_artifacts
{
"action": "list_artifacts",
"type": "image | video | all",
"limit": 10
}Returns the last N entries from memory/artifact-log.md.
CONFIG.json
Written to ~/.openclaw/workspace-{agentId}/CONFIG.json during install. Keep this file private — it contains your API keys.
{
"agent_id": "cl-content-manager",
"image_api": { "provider": "openai", "api_key": "sk-...", "model": "dall-e-3" },
"video_api": { "provider": "runway", "api_key": "key_...", "model": "gen3a_turbo" },
"storage": {
"images_path": "~/.openclaw/workspace-cl-content-manager/media/images",
"videos_path": "~/.openclaw/workspace-cl-content-manager/media/videos"
},
"clawlink": {
"log_artifact_url": "https://rgzinqbdnesinmbshgtc.supabase.co/functions/v1/log-artifact",
"anon_key": "eyJ...",
"tenant_id": "uuid"
}
}To change providers after install, edit CONFIG.json directly and restart OpenClaw.
Workspace layout
~/.openclaw/workspace-{agentId}/
├── CONFIG.json ← credentials (keep private)
├── IDENTITY.md ← agent role definition
├── BOOTSTRAP.md ← startup instructions
├── AGENTS.md ← supported actions + return formats
├── TOOLS.md ← HTTP call patterns
├── PROVIDERS.md ← per-provider API reference
├── GENERATION_GUIDE.md ← step-by-step generation workflows
├── MEMORY.md ← memory file formats
├── media/
│ ├── images/ ← generated images (local source of truth)
│ └── videos/ ← generated videos (local source of truth)
└── memory/
├── artifact-log.md ← audit trail (every generated artifact)
└── issues.md ← API errors and upload failuresLocal files are the source of truth. Supabase Storage is a mirror. If an upload fails, the local file is preserved and the error is logged to memory/issues.md.
License
MIT
