返回顶部
k

krea-aiKrea AI工具

Generate images, videos, upscale/enhance images, and train LoRA styles using the Krea.ai API. Supports 20+ image models (Flux, Imagen, GPT Image, Ideogram, Seedream), 7 video models (Kling, Veo, Hailuo, Wan), and 3 upscalers (Topaz up to 22K). Use when the user wants to generate images, create videos, upscale images, train custom LoRA styles, or run multi-step creative pipelines.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
122
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

krea-ai

Krea AI — 图像、视频与增强生成

使用 Krea.ai API 生成图像、视频、放大/增强图像以及训练 LoRA 风格。支持 20+ 图像模型(Flux、Imagen、GPT Image、Ideogram、Seedream...)、7 个视频模型(Kling、Veo、Hailuo、Wan)和 3 个放大工具(Topaz 最高支持 22K)。

重要提示: 请勿自行编造模型名称。运行 listmodels.py 从 Krea API 的 OpenAPI 规范中获取实时的模型列表、CU 成本和接受的参数。所有脚本均从规范中动态解析模型——不存在硬编码的端点表。脚本也接受 listmodels.py --json 输出的完整端点路径(例如 --model /generate/image/google/imagen-4-ultra)。

使用方法

脚本位于此文件旁边的 scripts/ 目录中。使用 uv run 从用户的工作目录运行,以便输出文件保存在用户期望的位置。

生成图像:
bash
uv run ~/.codex/skills/krea/scripts/generate_image.py --prompt 你的描述 --filename output.png [--model nano-banana-2] [--width 1024] [--height 1024] [--api-key KEY]

生成视频:
bash
uv run ~/.codex/skills/krea/scripts/generate_video.py --prompt 你的描述 --filename output.mp4 [--model veo-3.1-fast] [--duration 5] [--aspect-ratio 16:9] [--api-key KEY]

增强/放大图像:
bash
uv run ~/.codex/skills/krea/scripts/enhance_image.py --image-url https://... --filename upscaled.png --width 4096 --height 4096 [--enhancer topaz-standard-enhance] [--api-key KEY]

训练 LoRA 风格:
bash
uv run ~/.codex/skills/krea/scripts/trainstyle.py --name my-style --urls-file images.txt [--model fluxdev] [--type Style] [--trigger-word mystyle] [--api-key KEY]

列出可用模型:
bash
uv run ~/.codex/skills/krea/scripts/list_models.py [--type image|video|enhance]

运行多步骤流水线:
bash
uv run ~/.codex/skills/krea/scripts/pipeline.py --pipeline pipeline.json [--api-key KEY]

检查任务状态:
bash
uv run ~/.codex/skills/krea/scripts/get_job.py --job-id uuid [--api-key KEY]

重要提示: 始终从用户当前工作目录运行,以便文件保存在用户正在工作的位置。

默认工作流程(草稿 → 迭代 → 最终版)

目标:在提示词完善之前,避免在昂贵模型上消耗 CU,实现快速迭代。

  • - 草稿(廉价/快速): 使用 --model z-image 或 --model flux-1-dev(3-5 CU,约 5 秒)进行快速迭代
bash uv run ~/.codex/skills/krea/scripts/generate_image.py --prompt <草稿提示词> --filename yyyy-mm-dd-hh-mm-ss-draft.png --model flux-1-dev
  • - 迭代: 调整提示词,继续使用廉价模型尝试
  • - 最终版(高质量): 切换到 --model gpt-image 或 --model nano-banana-pro
bash uv run ~/.codex/skills/krea/scripts/generate_image.py --prompt <最终提示词> --filename yyyy-mm-dd-hh-mm-ss-final.png --model nano-banana-pro

可用模型

模型、CU 成本和接受的请求体字段均从 Krea API 的 OpenAPI 规范(/openapi.json)实时获取。运行 list_models.py 查看当前可用的内容:

bash
uv run ~/.codex/skills/krea/scripts/list_models.py # 所有模型及参数
uv run ~/.codex/skills/krea/scripts/list_models.py --type image # 仅图像模型
uv run ~/.codex/skills/krea/scripts/list_models.py --json # 机器可读格式

为方便使用,维护了简短别名(例如 flux 代表 flux-1-dev)。脚本通过规范自动解析这些别名。如果模型不在别名列表中,请传递完整的 OpenAPI 模型 ID 或端点路径。

模型选择指南

根据用户请求映射图像模型:

  • - 快速、迅速、廉价 → flux-1-dev 或 z-image
  • 高质量、最佳 → nano-banana-pro 或 gpt-image
  • 图像中的文字、排版 → ideogram-3
  • 照片级真实感 → seedream-4 或 nano-banana-pro
  • 无偏好 → nano-banana-2

根据用户请求映射视频模型:

  • - 快速 → hailuo-2.3
  • 电影感、高质量 → veo-3.1
  • 带声音、带音频 → veo-3 配合 --generate-audio
  • 无偏好 → veo-3.1-fast

增强器: topaz-standard-enhance(忠实放大,默认)、topaz-generative-enhance(创意增强)、topaz-bloom-enhance(添加创意细节)。

图像生成参数

参数描述默认值
--model模型 ID 或别名(运行 list_models.py)nano-banana-2
--prompt
文本描述(必填) | — | | --filename | 输出文件名(必填) | — | | --width | 宽度(像素,512-4096) | 1024 | | --height | 高度(像素,512-4096) | 1024 | | --aspect-ratio | 宽高比(1:1、16:9、9:16、4:3、3:2 等) | — | | --resolution | 1K、2K、4K(nano-banana 模型) | — | | --seed | 用于可复现性的随机种子 | — | | --image-url | 输入图像 URL 或本地文件路径(用于图生图) | — | | --style-id | 要应用的 LoRA 风格 ID | — | | --style-strength | LoRA 强度(-2 到 2) | 1.0 | | --batch-size | 图像数量(1-4) | 1 | | --steps | 推理步数,1-100(flux 模型) | 25 | | --guidance-scale | 引导尺度,0-24(flux 模型) | 3 | | --quality | low/medium/high/auto(gpt-image) | auto | | --output-dir | 输出目录 | cwd | | --api-key | Krea API 令牌 | — |

视频生成参数

参数描述默认值
--model模型 ID 或别名(运行 list_models.py)veo-3.1-fast
--prompt
文本描述(必填) | — | | --filename | 输出文件名(必填) | — | | --duration | 时长(秒) | 5 | | --aspect-ratio | 16:9、9:16、1:1 | 16:9 | | --start-image | 起始图像 URL 或本地文件路径(用于图生视频) | — | | --end-image | 结束帧 URL(仅 kling) | — | | --resolution | 720p、1080p(仅 veo) | 720p | | --mode | std、pro(仅 kling) | std | | --generate-audio | 生成音频(仅 veo-3) | false | | --output-dir | 输出目录 | cwd | | --api-key | Krea API 令牌 | — |

增强参数

参数描述默认值
--enhancer
增强器 ID(运行 list_models.py --type

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 krea-1775938455 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 krea-1775938455 技能

通过命令行安装

skillhub install krea-1775938455

下载

⬇ 下载 krea-ai v1.0.1(免费)

文件大小: 25.27 KB | 发布时间: 2026-4-12 10:22

v1.0.1 最新 2026-4-12 10:22
- Dynamic model/parameter resolution: All scripts now fetch available models, CU costs, and parameters live from the Krea API's OpenAPI spec. No more hardcoded model tables.
- New: Added LoRA style training script (`train_style.py`) for custom style creation.
- Expanded local file support for `--image-url`, `--start-image`, and related arguments (URLs and local paths accepted).
- Parameter defaults and model aliases updated to match current Krea API (e.g. `nano-banana-2`, `veo-3.1-fast`).
- Documentation fully revised for dynamic usage, improved workflow guidance, and current script options.
- Enhanced error guidance and model selection mapping based on live API data.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部