网淘吧来吧,欢迎您!

Reve AI Image Generation

2026-03-31 新闻来源:网淘吧 围观:17
电脑广告
手机广告

Reve AI 图像生成

使用 Reve 的 AI API 生成、编辑和混搭图像。

先决条件

  • Bun 运行时环境
  • REVE_API_KEYREVE_AI_API_KEY环境变量已设置

快速使用

# Generate image from prompt
bun scripts/reve.ts create "A beautiful sunset over mountains" -o sunset.png

# With aspect ratio
bun scripts/reve.ts create "A cat in space" -o cat.png --aspect 16:9

# Edit existing image
bun scripts/reve.ts edit "Add dramatic clouds" -i photo.png -o edited.png

# Remix multiple images
bun scripts/reve.ts remix "Person from <img>0</img> in scene from <img>1</img>" -i person.png -i background.png -o remix.png

命令

create

根据文本提示生成新图像。

Reve AI Image Generation

选项:

  • -o, --output 文件— 输出文件路径(默认:output.png)
  • --aspect 比例— 宽高比:16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 1:1(默认:3:2)
  • --version 版本— 模型版本(默认:最新版)

edit

使用文本指令修改现有图像。

选项:

  • -i, --input 文件— 待编辑的输入图像(必填)
  • -o, --output FILE— 输出文件路径(默认:output.png)
  • --version VER— 模型版本:latest、latest-fast、reve-edit@20250915、reve-edit-fast@20251030

remix

将文本提示词与参考图像结合。在提示词中使用<img>N</img>以通过索引(从0开始)引用图像。

选项:

  • -i, --input FILE— 参考图像(可指定多个,最多6个)
  • -o, --output FILE— 输出文件路径(默认:output.png)
  • --aspect RATIO— 宽高比(与 create 命令的选项相同)
  • --version VER— 模型版本:latest、latest-fast、reve-remix@20250915、reve-remix-fast@20251030

约束条件

  • 最大提示词长度:2560 个字符
  • remix 最大参考图像数:6
  • 有效的宽高比:16:9、9:16、3:2、2:3、4:3、3:4、1:1

响应

脚本输出包含生成详情的JSON:

{
  "output": "path/to/output.png",
  "version": "reve-create@20250915",
  "credits_used": 18,
  "credits_remaining": 982
}

错误

  • 401— API密钥无效
  • 402— 积分不足
  • 429— 请求频率受限(包含retry_after信息)
  • 422— 输入无效(提示词过长、宽高比错误)

免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏

文章底部电脑广告
手机广告位-内容正文底部
上一篇:SendGrid 下一篇:One Molt

相关文章

您是本站第384379名访客 今日有1篇新文章/评论