← 返回 Skills 市场
papayalove

Kay Image

作者 papayalove · GitHub ↗ · v1.0.3 · MIT-0
cross-platform ⚠ suspicious
117
总下载
1
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install kay-image
功能描述
AI 图片生成与理解工具 - 支持文生图、图生图、图片理解、视频理解。 基于 KIE AI API,支持 4K 输出、多种宽高比和参考图。 **所需凭证**: 需要 KIE_API_KEY 环境变量(从 https://kie.ai/ 获取)
使用说明 (SKILL.md)

Kay Image - AI 图片生成与理解

基于 KIE AI API 的图片生成与理解工具。

⚠️ 必需凭证

使用本工具前,必须配置 API Key:

获取 KIE API Key

  1. 访问 https://kie.ai/
  2. 注册并登录账号
  3. 进入控制台 → API 管理
  4. 创建 API Key 并复制

配置环境变量

export KIE_API_KEY="your-kie-api-key-here"

或在 skill 目录创建 .env 文件:

# 创建 .env 文件
nano skills/kay-image/.env

.env 文件内容:

KIE_API_KEY=your-kie-api-key-here

注意: 没有 API Key 将无法使用本工具的任何功能。


特性

  • 文生图: 根据文本描述生成图片
  • 图生图: 基于参考图进行编辑/变换
  • 图片理解: 分析图片内容(使用 GPT-5/Gemini)
  • 视频理解: 分析视频内容(使用 Gemini)
  • 多分辨率: 支持 1K/2K/4K 输出
  • 多宽高比: 支持 1:1, 3:4, 4:3, 9:16, 16:9, 21:9 等

使用方法

基本文生图

kay-image --prompt "一只可爱的橘猫在草地上玩耍" --output cat.png

指定宽高比和分辨率

kay-image --prompt "上海外滩夜景" --output shanghai.png --ar 16:9 --resolution 2K

图生图

kay-image --prompt "转换成动漫风格" --input https://example.com/photo.jpg --output anime.png

图片理解

kay-image --understand --image https://example.com/photo.jpg --prompt "描述这张图片"

视频理解

kay-image --understand --video https://example.com/video.mp4 --prompt "分析这个视频"

参数说明

参数 简写 说明 默认值
--prompt -p 提示词 -
--output -o 输出路径 -
--input -i 参考图路径 -
--ar - 宽高比 1:1
--resolution -r 分辨率 1K
--understand -u 理解模式 false
--image - 图片路径 -
--video - 视频路径 -

环境变量

变量名 必需 说明
KIE_API_KEY ✅ 是 KIE AI API 密钥
KIE_UNDERSTANDING_API_KEY ❌ 否 理解功能 API 密钥(默认使用 KIE_API_KEY)
LAOZHANG_API_KEY ❌ 否 LaoZhang API 密钥(可选)

价格参考

  • 1K 图片: ~$0.04
  • 2K 图片: ~$0.06
  • 4K 图片: ~$0.09
  • 图片理解: ~$0.005-0.01/张

支持的宽高比

  • 1:1 - 正方形
  • 3:4 - 小红书/Instagram 竖版
  • 4:3 - 标准横版
  • 9:16 - 手机竖屏
  • 16:9 - 宽屏
  • 21:9 - 超宽屏

示例

生成小红书封面

kay-image -p "清新风格护肤品封面,粉色渐变背景" -o cover.png --ar 3:4 -r 2K

生成头像

kay-image -p "动漫风格女生头像,粉色头发" -o avatar.png --ar 1:1

图片风格迁移

kay-image -p "转换成油画风格" -i photo.jpg -o painting.png

OCR 文字提取

kay-image -u --image document.jpg --prompt "提取所有文字"

脚本位置

${SKILL_DIR}/scripts/main.ts


注意事项

  • 视频理解: 仅 Gemini 模型支持
  • 图片格式: 支持 JPG、PNG、WebP
  • 视频格式: 支持 MP4、MOV
  • 文件大小: 建议图片 \x3C 10MB,视频 \x3C 100MB
安全使用建议
This skill appears to implement an image-generation and understanding CLI that calls KIE (and optionally LaoZhang) APIs — that is coherent with its description. Before installing, verify these things: 1) Source and trust: the package has no homepage and the publisher identity is unknown — consider whether you trust the author. 2) Runtime: the script requires Bun (#! /usr/bin/env bun) and is TypeScript; ensure your environment supports Bun or the platform will need to provide it. 3) Credentials: the tool uploads images/videos to remote APIs; only provide an API key with minimal permissions and avoid committing .env files into repos or shared storage. 4) Understanding mode requires either KIE_UNDERSTANDING_API_KEY or LAOZHANG_API_KEY (the metadata only listed KIE_API_KEY) — set these intentionally. 5) Review the full script for any endpoints you don’t recognize and test in a sandbox before running on sensitive files. If you want higher assurance, ask the author for source provenance, an explicit runtime requirement list (Bun/node), and a published homepage or repository for review.
功能分析
Type: OpenClaw Skill Name: kay-image Version: 1.0.3 The kay-image skill is a legitimate tool for AI image generation and analysis using the KIE and LaoZhang APIs. The implementation in scripts/main.ts follows the documented functionality, using standard fetch calls to interact with specified API endpoints (api.kie.ai and api.laozhang.ai) and handling local file reading only when explicitly requested by the user for image/video understanding tasks.
能力评估
Purpose & Capability
Name/description (text→image, image→image, image/video understanding via KIE or LaoZhang) align with the code and CLI options. However, the package metadata declares only KIE_API_KEY as required while the implementation also requires KIE_UNDERSTANDING_API_KEY or LAOZHANG_API_KEY for 'understand' mode. Also the script uses a Bun shebang (#!/usr/bin/env bun) but 'required binaries' lists none — the runtime dependency on Bun is not declared.
Instruction Scope
SKILL.md CLI usage and the script consistently instruct reading local files, accepting remote URLs, and sending data to KIE or LaoZhang APIs — this is expected for the stated purpose. The docs recommend storing API keys in a .env file under skills/kay-image/.env (user-run instruction). Be aware the tool will read local files (fileToBase64) and upload their contents to remote APIs — expected, but sensitive files could be transmitted if provided.
Install Mechanism
No install spec (instruction-only) — low supply-chain risk. However, the script is written for Bun (shebang) and TypeScript; the skill does not declare Bun or any runtime as a required binary. That undeclared runtime requirement may cause failures or hidden assumptions about the environment.
Credentials
Requested credentials (KIE_API_KEY for generation; KIE_UNDERSTANDING_API_KEY or LAOZHANG_API_KEY for understanding) are proportionate to the functionality. Minor inconsistency: metadata frontmatter lists only KIE_API_KEY as required while the code enforces additional environment variables for understanding mode. No unrelated cloud or system credentials are requested.
Persistence & Privilege
The skill is not flagged 'always: true' and does not request system-wide configuration or other skills' credentials. It has no install step that would persist new system services. It does read/write local files only under user-directed paths (output path, optional .env), which is expected for a CLI.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install kay-image
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /kay-image 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.3
Simplify setup: direct .env creation instead of copying from example
v1.0.2
Rename .env.example to env.example to ensure it's included in package
v1.0.1
Include .env.example file in package
v1.0.0
Initial release with clear dependency declaration and credential requirements
元数据
Slug kay-image
版本 1.0.3
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 4
常见问题

Kay Image 是什么?

AI 图片生成与理解工具 - 支持文生图、图生图、图片理解、视频理解。 基于 KIE AI API,支持 4K 输出、多种宽高比和参考图。 **所需凭证**: 需要 KIE_API_KEY 环境变量(从 https://kie.ai/ 获取). 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 117 次。

如何安装 Kay Image?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install kay-image」即可一键安装,无需额外配置。

Kay Image 是免费的吗?

是的,Kay Image 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Kay Image 支持哪些平台?

Kay Image 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Kay Image?

由 papayalove(@papayalove)开发并维护,当前版本 v1.0.3。

💬 留言讨论