@lilywlj

SmartKV Image Generator

Generate activity KV images through the SmartKV backend plugin API.

当前版本
v1.0.8
code-plugin社区source-linked

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

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

Required Generate Parameters

  • modelId
  • activityName
  • activityTheme
  • activityTime
  • activityLocation

Optional parameters:

  • prompt
  • posterQuality
  • posterSize

Field limits:

  • activityName, activityTheme, activityTime, activityLocation: max 200 characters each
  • prompt: max 1000 characters

Generate Interaction Flow

When the user asks to generate an image, generate_image follows this order:

  1. Check whether apiKey is configured.
  2. If apiKey exists but modelId is missing, query /api/v1/models and ask the user to choose a model.
  3. Models are shown as name.sub(modelId: id); the selected row's id should be passed as modelId.
  4. After modelId is available, check whether activityName, activityTheme, activityTime, and activityLocation are present and ask the user to provide any missing fields.
  5. Only call POST /api/v1/generate-plugins after 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.7 \
  --source-repo=OWNER/REPO \
  --source-commit=COMMIT_SHA \
  --tags=latest

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

源码与版本

源码仓库

123

打开仓库

源码提交

1

查看提交

安装命令

openclaw plugins install clawhub:@lilywlj/kvv1

元数据

  • 包名: @lilywlj/kvv1
  • 创建时间: 2026/06/10
  • 更新时间: 2026/06/10
  • 执行代码:
  • 源码标签: 2

兼容性

  • 构建于 OpenClaw: >=2026.3.24-beta.2
  • 插件 API 范围: >=2026.3.24-beta.2
  • 标签: latest
  • 文件数: 6