Generate images using Volcano Engine Jimeng AI 4.0.
Environment Variables
export VOLCENGINE_AK="你的AccessKeyID"
export VOLCENGINE_SK="你的SecretAccessKey"
Usage
./jimeng.sh <mode> <prompt> [reference_url] [target] [options]
Parameter Description
| Parameter | Required | Description |
|---|---|---|
| mode | ✅ | t2i (text-to-image) or i2i (image-to-image) |
| prompt | ✅ | Image description |
| reference_url | Optional for image-to-image | Reference image URL; if not filled, the default image is used |
| target | Optional | Feishu user ID, such as user:ou_xxx; if not filled, only the URL is output |
| options | Optional | Additional options, such as force_single=true |
Example
Text-to-image (t2i)
# 文生图 - 生成一只可爱的猫咪
./jimeng.sh t2i "一只可爱的猫咪"
# 文生图 - 发送给飞书用户
./jimeng.sh t2i "蓝天白云" "user:ou_5ab7e4d11d7f28bebff34796cc967e24"
# 文生图 + 参考风格图
./jimeng.sh t2i "变成油画风格" "https://example.com/style.jpg"
Image-to-image (i2i)
# 图生图 - 使用默认参考图(Clawra头像)
./jimeng.sh i2i "戴上墨镜"
# 图生图 - 使用默认参考图
./jimeng.sh i2i "变成卡通风格"
# 图生图 - 自定义参考图
./jimeng.sh i2i "把这张照片变成素描风格" "https://example.com/photo.jpg"
# 图生图 - 发送给飞书用户
./jimeng.sh i2i "戴上牛仔帽" "" "user:ou_xxx"
Default Reference Image
In image-to-image mode, the Clawra avatar is used as the default reference:
https://cdn.jsdelivr.net/gh/SumeLabs/clawra@main/assets/clawra.png
Output Description
- Direct run: output image URL
- Specify target: automatically send to Feishu
Image Format
- Jimeng AI outputs PNG format
- by default. The URL suffix is
.image, and Feishu can send it normally - User saving: after copying the link, change
.imageto.png
File Structure
jimeng/
├── SKILL.md # 本文件
└── scripts/
├── sign.py # 火山引擎签名
└── jimeng.sh # 主脚本