← Back to Skills Marketplace
ogenes

Jimeng AI

by ogenes · GitHub ↗ · v1.3.3
cross-platform ⚠ suspicious
1651
Downloads
2
Stars
17
Active Installs
9
Versions
Install in OpenClaw
/install jimeng-ai
Description
基于火山引擎即梦AI的文生图/文生视频能力,支持通过文本描述生成图片和视频。
README (SKILL.md)

即梦AI 文生图/文生视频 Skill

基于火山引擎即梦AI的文生图和文生视频能力,支持通过文本描述生成图片和视频。

功能特性

  • 执行过程存储:使用 MD5(提示词) 作为文件夹名保存任务状态
  • 异步查询:支持断点续传,避免重复提交相同任务
  • Base64 图片处理:直接从 API 响应中解码并保存图片
  • 支持即梦AI文生图(v3.0 / v3.1 / v4.0)
  • 支持即梦AI文生视频(v3.0 1080P)
  • 可配置宽高比、生成数量、自定义尺寸

所需环境变量

变量名 是否必需 说明
VOLCENGINE_AK 必需 火山引擎 Access Key
VOLCENGINE_SK 条件必需 火山引擎 Secret Key(永久凭证必需)
VOLCENGINE_TOKEN 可选 安全令牌(临时凭证 STS 必需)

注意:使用临时凭证(AKTP 开头)时,可以只使用 AK + Token,不需要 SK。

配置示例

export VOLCENGINE_AK="your-access-key"
export VOLCENGINE_SK="your-secret-key"

# 如果使用临时凭证(STS),还需要设置 Token
export VOLCENGINE_TOKEN="your-security-token"

获取方式:

  1. 登录 火山引擎控制台
  2. 进入"访问控制" -> "密钥管理"
  3. 创建或查看已有访问密钥

安装依赖

cd ~/.openclaw/workspace/skills/jimeng-ai
npm install

工作流程

首次执行(新任务)

使用新提示词运行时,脚本将:

  1. 向 API 提交任务
  2. 使用 md5(提示词) 作为文件夹名创建目录
  3. 保存 param.jsonresponse.jsontaskId.txt
  4. 输出:"任务已提交,TaskId: xxx"
$ npx ts-node scripts/text2image.ts "一只可爱的猫咪"
任务已提交,TaskId: 1234567890

后续执行(异步查询)

使用相同提示词运行将查询已有任务:

  1. 如果图片已存在 → 立即返回图片路径
  2. 如果任务未完成 → 输出:"任务未完成,TaskId: xxx"
  3. 如果任务已完成 → 从 binary_data_base64 解码并保存图片
$ npx ts-node scripts/text2image.ts "一只可爱的猫咪"
任务未完成,TaskId: 1234567890

# 或者任务完成时:
$ npx ts-node scripts/text2image.ts "一只可爱的猫咪"
任务已完成,图片保存路径:
  - ./output/\x3Cmd5_hash>/1.jpg
  - ./output/\x3Cmd5_hash>/2.jpg

使用方法

基础用法

npx ts-node scripts/text2image.ts "一只可爱的猫咪"

完整参数

npx ts-node scripts/text2image.ts "提示词" \
  --version v40 \
  --ratio 16:9 \
  --count 2

参数说明

参数 说明 默认值
prompt 图片生成提示词(必填) -
--version API版本: v30, v31, v40 v31
--ratio 宽高比: 1:1, 9:16, 16:9, 3:4, 4:3, 2:3, 3:2, 1:2, 2:1 16:9
--count 生成数量 1-4 1
--width 指定宽度(可选) -
--height 指定高度(可选) -
--size 指定面积(可选,如 4194304 表示 2048x2048) -
--seed 随机种子(可选) -
--output 图片输出目录 ./output
--debug 调试模式 false
--no-download 不下载图片,只返回URL false

输出格式

任务已提交(首次运行)

{
  "success": true,
  "submitted": true,
  "prompt": "一只可爱的猫咪",
  "version": "v40",
  "ratio": "1:1",
  "count": 1,
  "taskId": "1234567890",
  "folder": "./output/\x3Cmd5_hash>",
  "message": "任务已提交,请稍后使用相同提示词查询结果"
}

任务已完成

{
  "success": true,
  "prompt": "一只可爱的猫咪",
  "version": "v40",
  "ratio": "1:1",
  "count": 1,
  "taskId": "1234567890",
  "images": [
    "./output/\x3Cmd5_hash>/1.jpg",
    "./output/\x3Cmd5_hash>/2.jpg"
  ],
  "outputDir": "./output/\x3Cmd5_hash>"
}

任务未完成

{
  "success": true,
  "prompt": "一只可爱的猫咪",
  "version": "v40",
  "ratio": "1:1",
  "count": 1,
  "taskId": "1234567890",
  "folder": "./output/\x3Cmd5_hash>",
  "message": "任务未完成,请稍后使用相同提示词查询结果"
}

错误响应

{
  "success": false,
  "error": {
    "code": "MISSING_CREDENTIALS",
    "message": "请设置环境变量 VOLCENGINE_AK 和 VOLCENGINE_SK"
  }
}

文件夹结构

output/
└── \x3Cmd5(prompt)>/           # md5哈希作为文件夹名
    ├── param.json           # 请求参数
    ├── response.json        # API提交响应
    ├── taskId.txt           # 任务ID
    └── 1.jpg, 2.jpg, ...    # 生成的图片

示例

生成风景画

npx ts-node scripts/text2image.ts "山水风景画,水墨风格" --version v40 --ratio 16:9

生成科幻城市

npx ts-node scripts/text2image.ts "未来科幻城市,霓虹灯光,赛博朋克风格" --version v40 --ratio 16:9 --count 2

指定尺寸生成

npx ts-node scripts/text2image.ts "抽象艺术" --width 2048 --height 1152

自定义输出目录

npx ts-node scripts/text2image.ts "一只可爱的猫咪" --output ~/Pictures/jimeng

版本说明

  • v30: 即梦3.0 基础版本
  • v31: 即梦3.1 改进版本
  • v40: 即梦4.0 最新版本(推荐)

文生视频使用方法

基础用法

npx ts-node scripts/text2video.ts "一只可爱的猫咪在草地上奔跑"

完整参数

npx ts-node scripts/text2video.ts "提示词" \
  --ratio 9:16 \
  --duration 5 \
  --fps 24

参数说明

参数 说明 默认值
prompt 视频生成提示词(必填) -
--ratio 宽高比: 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 9:16
--duration 视频时长: 510 5
--fps 帧率: 2430 24
--output 视频输出目录 ./output
--wait 等待任务完成 false
--debug 调试模式 false
--no-download 不下载视频,只返回URL false

视频输出格式

任务已提交

{
  "success": true,
  "submitted": true,
  "prompt": "元宵节灯笼",
  "ratio": "9:16",
  "duration": 5,
  "fps": 24,
  "taskId": "1234567890",
  "folder": "./output/video/\x3Cmd5_hash>",
  "message": "任务已提交,请稍后使用相同提示词查询结果"
}

任务已完成

{
  "success": true,
  "prompt": "元宵节灯笼",
  "ratio": "9:16",
  "duration": 5,
  "fps": 24,
  "taskId": "1234567890",
  "videoUrl": "https://...",
  "data": {}
}

任务未完成

{
  "success": true,
  "pending": true,
  "prompt": "元宵节灯笼",
  "ratio": "9:16",
  "duration": 5,
  "fps": 24,
  "taskId": "1234567890",
  "status": "in_queue",
  "message": "任务处理中,请稍后使用相同提示词查询结果"
}

视频文件夹结构

output/video/
└── \x3Cmd5(prompt)>/           # md5哈希作为文件夹名
    ├── param.json           # 请求参数
    ├── response.json        # API提交响应
    ├── taskId.txt           # 任务ID
    └── video.mp4            # 生成的视频

参考文档

Usage Guidance
Key things to consider before installing: - The skill legitimately needs VolcEngine credentials (VOLCENGINE_AK and usually VOLCENGINE_SK; VOLCENGINE_TOKEN for temporary STS). Do NOT provide cloud credentials unless you trust the source. The registry metadata omitted these required env vars — ask the publisher to correct that. - The package is TypeScript CLI code that will: run npm install (per README/SKILL.md), execute via ts-node, make authenticated HTTP requests to open.volcengineapi.com, and write param/response/taskId and generated media under ./output (using md5(prompt) as folder names). If you run it, do so in an isolated environment (container, VM, or dedicated workspace). - Prefer using temporary, least-privilege credentials (STS token) rather than long-lived secret keys. If possible create a short-lived, limited-scope VolcEngine key for testing. - Review the included scripts (common.ts, text2image.ts, text2video.ts) yourself or have a trusted reviewer check them; they appear to perform standard signing (SignerV4-like) and calls to VolcEngine. Watch for debug logging: enabling DEBUG may print request URLs (which include signatures). - Because the registry metadata is inconsistent (no declared env vars/install), ask the publisher for clarification or prefer a well-known published source (GitHub repo/homepage) before granting credentials or running npm install. Run the tool with minimal privileges and in isolation until you are comfortable.
Capability Analysis
Type: OpenClaw Skill Name: jimeng-ai Version: 1.3.3 The OpenClaw skill 'jimeng-ai' is designed for text-to-image and text-to-video generation using the VolcEngine Jimeng AI API. It requires API credentials (VOLCENGINE_AK, VOLCENGINE_SK, VOLCENGINE_TOKEN) via environment variables, which is standard for cloud API integration. The skill includes robust path sanitization in `scripts/text2image.ts` and `scripts/text2video.ts` (via `sanitizePath` and `getTaskFolderPath`) to prevent directory traversal attacks when handling user-specified output directories. There is no evidence of malicious prompt injection in `SKILL.md` or `README.md`, nor any code indicating data exfiltration to unauthorized endpoints, persistence mechanisms, or arbitrary code execution. A minor vulnerability exists where debug logging in `scripts/common.ts` could expose credentials if enabled in an insecure environment, but this is a flaw, not an intentional malicious act.
Capability Assessment
Purpose & Capability
The skill's name/description match the included TypeScript CLI code which calls VolcEngine Jimeng APIs. However the registry metadata says 'Required env vars: none' and 'Primary credential: none' while SKILL.md and the code clearly require VOLCENGINE_AK and typically VOLCENGINE_SK (and optionally VOLCENGINE_TOKEN). That metadata omission is an incoherence that could mislead users about credential needs.
Instruction Scope
Runtime instructions and scripts stay within the declared purpose: they submit tasks to VolcEngine, poll for results, decode base64 images, and save outputs. The scripts create per-prompt folders (md5(prompt)) and write param.json/response.json/taskId.txt and media files under an output directory. The code includes path-sanitization checks. This behaviour is expected for a CLI tool, but users should note that the skill writes files to the current working directory and will persist prompts and API responses locally.
Install Mechanism
The skill has no install spec in registry metadata (instruction-only), but the package includes package.json, package-lock.json and TypeScript files and SKILL.md instructs running 'npm install' and 'npx ts-node ...'. That mismatch means installing will require fetching npm dependencies and executing shipped code, but the registry did not declare an install step — a transparency issue. The npm dependencies (axios, crypto-js, dev tooling) are common and from npmjs, not a direct red flag, but the lack of an explicit install spec increases risk because the platform's install automation may not run the expected dependency installation or sandboxing.
Credentials
The only credentials the code requires are VolcEngine access credentials (VOLCENGINE_AK, VOLCENGINE_SK, optional VOLCENGINE_TOKEN), which are proportionate to calling the provider API. However the registry metadata does not declare these required env vars while SKILL.md and code require them; that omission is a mismatched declaration and a meaningful security concern because users might grant credentials unintentionally. The number of env vars requested is small and appropriate for the service, but they are sensitive (AK/SK) and should be clearly declared.
Persistence & Privilege
always:false and no special OS restrictions — the skill does not request permanent presence or elevated agent/system privileges. It writes files under the current working directory (output/...), which the scripts protect against path traversal. Autonomous invocation (model invocation) is allowed by default and is not by itself a red flag here.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install jimeng-ai
  3. After installation, invoke the skill by name or use /jimeng-ai
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.3.3
更新文档
v1.3.2
Security fix: Path traversal vulnerability (CWE-22). Add sanitizePath() to prevent arbitrary file writes via malicious --output arguments. All user-controlled paths now validated to stay within cwd.
v1.3.1
Fix: Add skill.yaml with proper environment variable requirements (VOLCENGINE_AK, VOLCENGINE_SK, VOLCENGINE_TOKEN). Resolves registry metadata mismatch.
v1.3.0
Add text-to-video support (text2video.ts). Support parameters: --ratio, --duration, --fps. Return video_url directly without local download.
v1.2.0
fixbug
v1.1.1
修正文档中的路径为通用路径,提升可移植性
v1.1.0
fixbug
v1.0.0
init
v2.1.0
新增任务持久化和异步查询功能:使用MD5(提示词)作为文件夹名保存任务状态,支持断点续传避免重复提交,从binary_data_base64解码并保存图片
Metadata
Slug jimeng-ai
Version 1.3.3
License
All-time Installs 18
Active Installs 17
Total Versions 9
Frequently Asked Questions

What is Jimeng AI?

基于火山引擎即梦AI的文生图/文生视频能力,支持通过文本描述生成图片和视频。 It is an AI Agent Skill for Claude Code / OpenClaw, with 1651 downloads so far.

How do I install Jimeng AI?

Run "/install jimeng-ai" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Jimeng AI free?

Yes, Jimeng AI is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Jimeng AI support?

Jimeng AI is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Jimeng AI?

It is built and maintained by ogenes (@ogenes); the current version is v1.3.3.

💬 Comments