CLI
行业首创Yollomi 是首个支持原生 CLI 的综合 AI 媒体平台。在终端直接生成图片和视频——无需浏览器,无需手写 API 调用。
为什么 CLI 重要
用脚本化创意流程。将 Yollomi 与其他工具串联。集成到 CI/CD、自动化或 AI Agent。一条命令,一个结果——yollomi image "一只猫"。
安装
全局安装后可在任意位置使用 yollomi 命令
npm(推荐)
npm install -g yollomi-cli # If using Bytedance internal registry, use public npm: npm install -g yollomi-cli --registry https://registry.npmjs.org/
无需安装直接运行
npx yollomi-cli image "a cute cat"
配置
设置 API Key。在控制台 → API Keys.
export YOLLOMI_API_KEY=your_api_key # Optional: override API host (default: https://yollomi.com) export YOLLOMI_BASE_URL=https://yollomi.com
命令
所有图片和视频模型,一个 CLI
列出模型(无需 API Key)
yollomi models yollomi models --type image yollomi models --type video
生成图片
yollomi image "a magical forest with glowing mushrooms" yollomi image "sunset over mountains" --model flux-2-pro --aspect 16:9 yollomi image "make it oil painting style" --model flux-kontext-pro --image https://example.com/photo.jpg
生成视频
yollomi video "a cat walking in the rain" yollomi video "ocean waves at sunset" --model google-veo-3-fast yollomi video "animate this scene" --model wan-2-5-i2v --image https://example.com/frame.jpg
选项
| Option | Description |
|---|---|
-m, --model | Model ID (default: flux-schnell / google-veo-3-fast) |
-a, --aspect | Aspect ratio (1:1, 16:9, 9:16) |
-i, --image | Reference image URL (img2img, i2v, remove-bg) |
-n, --num | Number of images (1-4) |
-d, --duration | Video duration in seconds |
输出
URL 输出到 stdout,便于管道或脚本
$ yollomi image "a cat" Generating… https://r2.yollomi.com/v1/flux-schnell/... Remaining credits: 98