SmartKV Image Generator

Generate activity KV images through the SmartKV backend plugin API.

Tools

generate_image
list_models

Readme

SmartKV Image Generator Plugin for OpenClaw

Owner: @lilywlj

This OpenClaw tool plugin generates activity KV images through the SmartKV backend.

Tools

  • list_models: calls GET /api/v1/models and asks the user to choose a model.
  • generate_image: calls POST /api/v1/generate-plugins with x-api-key.

Configuration

bash
openclaw config set plugins.com.lilywlj.image-gen-js.apiKey YOUR_API_KEY
openclaw config set plugins.com.lilywlj.image-gen-js.baseUrl http://1.94.23.191:8080/api/v1

Environment variable fallback is also supported:

bash
export SMARTKV_API_KEY=YOUR_API_KEY

Required Generate Parameters

  • modelId
  • prompt

Optional parameters:

  • posterQuality
  • posterSize

If apiKey is missing, the plugin asks the user to configure it first. After the API key is available, if modelId is missing, the plugin queries /api/v1/models and asks the user to choose a model. Models are shown as name.sub(modelId: id); the selected row's id should be passed as modelId to generate_image.

Example:

text
modelId: 1001
prompt: 设计一张科技感强的春季新品发布会主视觉 KV,画面包含舞台、产品和倒计时氛围
posterQuality: 2K
posterSize: ["16:9"]

Development

bash
npm install
npm run plugin:validate
npm run plugin:build

Publish

OpenClaw validation and package preview:

bash
npm run plugin:build
npm run plugin:validate
npm run plugin:pack

Publish to npm:

bash
npm publish --access public

Publish to ClawHub as an OpenClaw code plugin requires a GitHub source repo and commit:

bash
clawhub package publish . \
  --family=code-plugin \
  --owner=@lilywlj \
  --name=openclaw-image-gen-js \
  --display-name="SmartKV Image Generator" \
  --version=1.0.4 \
  --source-repo=OWNER/REPO \
  --source-commit=COMMIT_SHA \
  --tags=latest

Use --dry-run --json first to preview without uploading.