SmartKV Image Generator Plugin for OpenClaw
Owner: @lilywlj
This OpenClaw tool plugin generates activity KV images through the SmartKV backend.
Tools
list_models: callsGET /api/v1/modelsand asks the user to choose a model.generate_image: callsPOST /api/v1/generate-pluginswithx-api-key.
Configuration
openclaw config set plugins.com.lilywlj.kvv1.apiKey YOUR_API_KEY
openclaw config set plugins.com.lilywlj.kvv1.baseUrl http://1.94.23.191:8080/api/v1
Environment variable fallback is also supported:
export SMARTKV_API_KEY=YOUR_API_KEY
Both tools also accept apiKey, baseUrl, and timeoutMs as per-call parameters. A per-call apiKey overrides saved plugin config and environment variables.
Required Generate Parameters
modelIdactivityNameactivityThemeactivityTimeactivityLocation
Optional parameters:
promptposterQualityposterSize
Field limits:
activityName,activityTheme,activityTime,activityLocation: max 200 characters eachprompt: max 1000 characters
Generate Interaction Flow
When the user asks to generate an image, generate_image follows this order:
- Check whether
apiKeyis configured. - If
apiKeyexists butmodelIdis missing, query/api/v1/modelsand ask the user to choose a model. - Models are shown as
name.sub(modelId: id); the selected row'sidshould be passed asmodelId. - After
modelIdis available, check whetheractivityName,activityTheme,activityTime, andactivityLocationare present and ask the user to provide any missing fields. - Only call
POST /api/v1/generate-pluginsafter all required parameters are ready.
Example:
modelId: 1001
activityName: 春季发布会
activityTheme: 科技新品
activityTime: 2026年6月18日
activityLocation: 上海
prompt: 画面风格高级、明亮、有舞台灯光
posterQuality: 2K
posterSize: ["16:9"]
Development
npm install
npm run plugin:validate
npm run plugin:build
Publish
OpenClaw validation and package preview:
npm run plugin:build
npm run plugin:validate
npm run plugin:pack
Publish to npm:
npm publish --access public
Publish to ClawHub as an OpenClaw code plugin requires a GitHub source repo and commit:
clawhub package publish . \
--family=code-plugin \
--owner=@lilywlj \
--name=kvv1 \
--display-name="SmartKV Image Generator" \
--version=1.0.8 \
--source-repo=OWNER/REPO \
--source-commit=COMMIT_SHA \
--tags=latest
Use --dry-run --json first to preview without uploading.