Venice AI Media技能使用说明
威尼斯AI媒体
使用威尼斯AI API生成图像和视频。威尼斯是一个无审查的AI平台,价格具有竞争力。
先决条件
- Python 3.10+(
brew install python或系统Python) - 威尼斯API密钥(提供免费套餐)
- requests库(如果缺失,脚本会自动安装)
设置
1. 获取您的API密钥
开头)
2. 配置密钥

export VENICE_API_KEY="vn_your_key_here"
方案A:环境变量(推荐 - 跨会话持久保存)
添加到~/.clawdbot/clawdbot.json:
{
skills: {
entries: {
"venice-ai-media": {
env: {
VENICE_API_KEY: "vn_your_key_here",
},
},
},
},
}
3. 验证设置
python3 {baseDir}/scripts/venice-image.py --list-models
如果你看到模型列表,就说明一切就绪了!
价格概览
| 功能 | 费用 |
|---|---|
| 图像生成 | 约每张 0.01-0.03 美元 |
| 图像放大 | 约 0.02-0.04 美元 |
| 图像编辑 | 0.04 美元 |
| 视频 (WAN) | 约 0.10-0.50 美元,具体取决于时长 |
| 视频 (Sora) | 约 0.50-2.00 美元,具体取决于时长 |
使用--quote与视频命令一起使用,以在生成前查看价格。
快速开始
# Generate an image
python3 {baseDir}/scripts/venice-image.py --prompt "a serene canal in Venice at sunset"
# Upscale an image
python3 {baseDir}/scripts/venice-upscale.py photo.jpg --scale 2
# Edit an image with AI
python3 {baseDir}/scripts/venice-edit.py photo.jpg --prompt "add sunglasses"
# Create a video from an image
python3 {baseDir}/scripts/venice-video.py --image photo.jpg --prompt "gentle camera pan" --duration 5s
图像生成
python3 {baseDir}/scripts/venice-image.py --prompt "a serene canal in Venice at sunset"
python3 {baseDir}/scripts/venice-image.py --prompt "cyberpunk city" --count 4
python3 {baseDir}/scripts/venice-image.py --prompt "portrait" --width 768 --height 1024
python3 {baseDir}/scripts/venice-image.py --prompt "abstract art" --out-dir /tmp/venice
python3 {baseDir}/scripts/venice-image.py --list-models
python3 {baseDir}/scripts/venice-image.py --list-styles
python3 {baseDir}/scripts/venice-image.py --prompt "fantasy" --model flux-2-pro --no-validate
python3 {baseDir}/scripts/venice-image.py --prompt "photo" --style-preset "Cinematic" --embed-exif
关键参数: --prompt,--model(默认:flux-2-max),--count(对相同提示词使用高效批量API),--width,--height,--format(webp/png/jpeg),--resolution(1K/2K/4K),--aspect-ratio,--negative-prompt,--style-preset(使用--list-styles查看可选预设),--cfg-scale(提示词遵循度 0-20,默认值 7.5),--seed(为了结果可复现),--safe-mode(默认禁用以获得未经审查的输出),--hide-watermark(仅在明确要求时使用 - 水印用于支持Venice项目),--embed-exif(在图像元数据中嵌入提示词),--lora-strength(适用于相应模型,范围为0-100),--steps(推理步数,取决于具体模型),--enable-web-search(启用网络搜索),--no-validate(跳过对新/测试版模型的检查)
图像放大
python3 {baseDir}/scripts/venice-upscale.py photo.jpg --scale 2
python3 {baseDir}/scripts/venice-upscale.py photo.jpg --scale 4 --enhance
python3 {baseDir}/scripts/venice-upscale.py photo.jpg --enhance --enhance-prompt "sharpen details"
python3 {baseDir}/scripts/venice-upscale.py --url "https://example.com/image.jpg" --scale 2
关键标志: --scale(缩放比例,1-4,默认值:2),--enhance(AI增强),--enhance-prompt(增强提示词),--enhance-creativity(0.0-1.0),--replication(0.0-1.0, 保留线条/噪点, 默认值: 0.35),--url(使用 URL 而非本地文件),--output,--out-dir
图像编辑
python3 {baseDir}/scripts/venice-edit.py photo.jpg --prompt "add sunglasses"
python3 {baseDir}/scripts/venice-edit.py photo.jpg --prompt "change the sky to sunset"
python3 {baseDir}/scripts/venice-edit.py photo.jpg --prompt "remove the person in background"
python3 {baseDir}/scripts/venice-edit.py --url "https://example.com/image.jpg" --prompt "colorize"
关键标志: --prompt(必需 - AI 解释要修改的内容),--url(使用 URL 而非本地文件),--output,--out-dir
注意:编辑端点使用的是 Qwen-Image 模型,该模型有一些内容限制(与其他 Venice 端点不同)。
视频生成
# Get price quote first (no generation)
python3 {baseDir}/scripts/venice-video.py --quote --model wan-2.6-image-to-video --duration 10s --resolution 720p
# Image-to-video (WAN 2.6 - default)
python3 {baseDir}/scripts/venice-video.py --image photo.jpg --prompt "camera pans slowly" --duration 10s
# Image-to-video (Sora)
python3 {baseDir}/scripts/venice-video.py --image photo.jpg --prompt "cinematic" \
--model sora-2-image-to-video --duration 8s --aspect-ratio 16:9 --skip-audio-param
# List models (shows available durations per model)
python3 {baseDir}/scripts/venice-video.py --list-models
# Clean up a video downloaded with --no-delete
python3 {baseDir}/scripts/venice-video.py --complete <queue_id> --model <model>
关键标志: --image(生成所需),--prompt(生成所需),--模型(默认: wan-2.6-image-to-video),--时长(取决于模型,参见 --list-models),--分辨率(480p/720p/1080p),--宽高比,--音频/--无音频,--跳过音频参数,--报价(价格估算),--超时,--轮询间隔,--不删除(保留服务器媒体),--完成(清理之前下载的视频),--不验证(跳过模型检查)
进度:生成过程中,脚本会根据威尼斯模型的平均执行时间来显示预估进度。
模型说明
使用--list-models命令以查看当前可用模型及其状态。模型会频繁更新。
图像:默认模型是flux-2-max。常用选项包括 flux、gpt-image 以及 nano-banana 的变体。
视频:
- WAN模型:支持图像转视频、可配置音频、多种时长(5秒至21秒)
- Sora模型:需要指定
--aspect-ratio参数,可使用--skip-audio-param
提示:
- 对于尚未加入模型列表的新模型或测试版模型,请使用
--no-validate参数 - 使用
--quote用于视频,以在生成前检查价格 - 安全模式默认是禁用的(Venice是一个未经审查的API)
输出
脚本会打印一行MEDIA: /path/to/file以供Clawdbot自动附加使用。
提示:使用--out-dir /tmp/venice-$(date +%s)当生成要通过iMessage发送的媒体时(确保在不同用户账户间的可访问性)。
故障排除
"VENICE_API_KEY 未设置"
- 检查您在
~/.clawdbot/clawdbot.json - 中的配置。
或者导出环境变量:
export VENICE_API_KEY="vn_..."
- "无效的API密钥"请在
- venice.ai/settings/api
验证您的密钥。
"未找到模型"
- 运行
--list-models查看可用模型 - 使用
--no-validate适用于新/测试版模型
视频卡住/超时
- 视频生成可能需要1-5分钟,具体取决于模型和时长
- 使用
--timeout 600处理更长的视频 - 在以下网址查看 Venice 状态:venice.ai
未找到 "requests" 模块
- 请安装:
pip3 install requests


微信扫一扫,打赏作者吧~