← 返回 Skills 市场
albertsalgueda

krea

作者 Albert Salgueda · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
128
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install krea
功能描述
Generate images, videos, upscale/enhance images, and train LoRA styles using the Krea.ai API. Supports 20+ image models (Flux, Imagen, GPT Image, Ideogram, S...
使用说明 (SKILL.md)

Krea AI — Image, Video & Enhancement Generation

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).

IMPORTANT: Do NOT invent model names. Run list_models.py to get the live list of models, CU costs, and accepted parameters from the Krea API's OpenAPI spec. All scripts resolve models dynamically from the spec — there are no hardcoded endpoint tables. Scripts also accept full endpoint paths from list_models.py --json output (e.g. --model /generate/image/google/imagen-4-ultra).

Usage

Scripts are in the scripts/ directory alongside this file. Run them with uv run from the user's working directory so output files are saved where the user expects.

Generate image:

uv run ~/.codex/skills/krea/scripts/generate_image.py --prompt "your description" --filename "output.png" [--model nano-banana-2] [--width 1024] [--height 1024] [--api-key KEY]

Generate video:

uv run ~/.codex/skills/krea/scripts/generate_video.py --prompt "your description" --filename "output.mp4" [--model veo-3.1-fast] [--duration 5] [--aspect-ratio 16:9] [--api-key KEY]

Enhance/upscale image:

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]

Train a LoRA style:

uv run ~/.codex/skills/krea/scripts/train_style.py --name "my-style" --urls-file images.txt [--model flux_dev] [--type Style] [--trigger-word "mystyle"] [--api-key KEY]

List available models:

uv run ~/.codex/skills/krea/scripts/list_models.py [--type image|video|enhance]

Run a multi-step pipeline:

uv run ~/.codex/skills/krea/scripts/pipeline.py --pipeline pipeline.json [--api-key KEY]

Check job status:

uv run ~/.codex/skills/krea/scripts/get_job.py --job-id "uuid" [--api-key KEY]

Important: Always run from the user's current working directory so files are saved where the user is working.

Default Workflow (draft → iterate → final)

Goal: fast iteration without burning CU on expensive models until the prompt is right.

  • Draft (cheap/fast): use --model z-image or --model flux-1-dev (3-5 CU, ~5s) for quick iteration

    uv run ~/.codex/skills/krea/scripts/generate_image.py --prompt "\x3Cdraft prompt>" --filename "yyyy-mm-dd-hh-mm-ss-draft.png" --model flux-1-dev
    
  • Iterate: adjust prompt, keep trying with cheap models

  • Final (high quality): switch to --model gpt-image or --model nano-banana-pro

    uv run ~/.codex/skills/krea/scripts/generate_image.py --prompt "\x3Cfinal prompt>" --filename "yyyy-mm-dd-hh-mm-ss-final.png" --model nano-banana-pro
    

Available Models

Models, CU costs, and accepted body fields are fetched live from the Krea API's OpenAPI spec (/openapi.json). Run list_models.py to see what's currently available:

uv run ~/.codex/skills/krea/scripts/list_models.py                     # all models with params
uv run ~/.codex/skills/krea/scripts/list_models.py --type image         # image models only
uv run ~/.codex/skills/krea/scripts/list_models.py --json               # machine-readable

Short aliases (e.g. flux for flux-1-dev) are maintained for convenience. The scripts resolve them automatically via the spec. If a model isn't in the alias list, pass the full OpenAPI model ID or endpoint path.

Model selection guidance

Map user requests for images:

  • "fast", "quick", "cheap" → flux-1-dev or z-image
  • "high quality", "best" → nano-banana-pro or gpt-image
  • "text in image", "typography" → ideogram-3
  • "photorealistic" → seedream-4 or nano-banana-pro
  • No preference → nano-banana-2

Map user requests for video:

  • "fast" → hailuo-2.3
  • "cinematic", "high quality" → veo-3.1
  • "with sound", "with audio" → veo-3 with --generate-audio
  • No preference → veo-3.1-fast

Enhancers: topaz-standard-enhance (faithful upscaling, default), topaz-generative-enhance (creative enhancement), topaz-bloom-enhance (adding creative details).

Image Generation Parameters

Param Description Default
--model Model ID or alias (run list_models.py) nano-banana-2
--prompt Text description (required)
--filename Output filename (required)
--width Width in pixels (512-4096) 1024
--height Height in pixels (512-4096) 1024
--aspect-ratio Aspect ratio (1:1, 16:9, 9:16, 4:3, 3:2, etc.)
--resolution 1K, 2K, 4K (nano-banana models)
--seed Seed for reproducibility
--image-url Input image URL or local file path for image-to-image
--style-id LoRA style ID to apply
--style-strength LoRA strength (-2 to 2) 1.0
--batch-size Number of images (1-4) 1
--steps Inference steps, 1-100 (flux models) 25
--guidance-scale Guidance scale, 0-24 (flux models) 3
--quality low/medium/high/auto (gpt-image) auto
--output-dir Output directory cwd
--api-key Krea API token

Video Generation Parameters

Param Description Default
--model Model ID or alias (run list_models.py) veo-3.1-fast
--prompt Text description (required)
--filename Output filename (required)
--duration Duration in seconds 5
--aspect-ratio 16:9, 9:16, 1:1 16:9
--start-image URL or local file path for image-to-video
--end-image End frame URL (kling only)
--resolution 720p, 1080p (veo only) 720p
--mode std, pro (kling only) std
--generate-audio Generate audio (veo-3 only) false
--output-dir Output directory cwd
--api-key Krea API token

Enhancement Parameters

Param Description Default
--enhancer Enhancer ID (run list_models.py --type enhance) topaz-standard-enhance
--image-url Source image URL or local file path (required)
--filename Output filename (required)
--width Target width (required)
--height Target height (required)
--enhancer-model Sub-model variant Standard V2
--creativity 1-6 (generative) or 1-9 (bloom)
--face-enhancement Enable face enhancement false
--sharpen Sharpening 0-1
--denoise Denoising 0-1
--scaling-factor Upscaling factor 1-32
--output-format png, jpg, webp png
--output-dir Output directory cwd
--api-key Krea API token

LoRA Training Parameters

Param Description Default
--name Style name (required)
--model Base model: flux_dev, flux_schnell, wan, qwen, z-image flux_dev
--type LoRA type: Style, Object, Character, Default Style
--urls Training image URLs (space-separated)
--urls-file Text file with one URL per line
--trigger-word Trigger word to activate the LoRA in prompts
--learning-rate Learning rate 0.0001
--max-train-steps Max training steps 1000
--batch-size Training batch size 1
--timeout Polling timeout in seconds 3600
--skip-validation Skip URL HEAD-check validation false
--output-dir Directory to save training manifest
--api-key Krea API token

Training requires 3-2000 images. The script validates all URLs before submitting. Training takes 15-45 minutes. On completion, the style ID is printed to stdout and a training-manifest.json is saved if --output-dir is set.

Use the style ID with --style-id in generate_image.py:

uv run ~/.codex/skills/krea/scripts/generate_image.py --prompt "mystyle product on white background" --style-id "style_abc123" --model flux-1-dev --filename "branded.png"

API Key

Scripts check for API key in this order:

  1. --api-key argument (use if user provided key in chat)
  2. KREA_API_TOKEN environment variable

If neither is available, the script exits with an error message.

Preflight + Common Failures

Preflight:

  • command -v uv (must exist)
  • test -n "$KREA_API_TOKEN" (or pass --api-key)

Common failures:

  • Error: No API key → set KREA_API_TOKEN or pass --api-key
  • 402 Insufficient credits → top up compute units at https://krea.ai/settings/billing
  • 402 This model requires a higher plan → model needs a paid plan upgrade at https://krea.ai/settings/billing
  • 429 Too many requests → concurrent job limit reached; scripts auto-retry up to 3 times with backoff
  • Job failed → check prompt for content moderation issues, try different wording

Filename Generation

Generate filenames with the pattern: yyyy-mm-dd-hh-mm-ss-name.ext

  • Timestamp: current date/time in yyyy-mm-dd-hh-mm-ss (24h format)
  • Name: descriptive lowercase text with hyphens (1-5 words)
  • Extension: .png for images, .mp4 for videos

Examples:

  • Prompt "A cyberpunk cat" → 2026-03-31-14-23-05-cyberpunk-cat.png
  • Prompt "waves on a beach" → 2026-03-31-15-30-12-beach-waves.mp4

Prompt Handling

For generation: Pass user's description as-is to --prompt. Only rework if clearly insufficient.

For image-to-image: Use --image-url with the source image and describe the desired transformation in --prompt.

For video from image: Use --start-image with the source image and describe the desired motion/action in --prompt.

Preserve user's creative intent in all cases.

Output

  • Scripts download the result and save it to the current directory (or --output-dir)
  • Script outputs the full path to the generated file
  • Do not read the image/video back — just inform the user of the saved path
  • If --batch-size > 1, files are saved as name-1.png, name-2.png, etc.

Examples

Quick draft image:

uv run ~/.codex/skills/krea/scripts/generate_image.py --prompt "A serene Japanese garden with cherry blossoms" --filename "2026-03-31-14-23-05-japanese-garden.png"

High quality final:

uv run ~/.codex/skills/krea/scripts/generate_image.py --prompt "A serene Japanese garden with cherry blossoms, golden hour lighting" --filename "2026-03-31-14-25-30-japanese-garden-final.png" --model nano-banana-pro --resolution 4K

Image-to-image edit:

uv run ~/.codex/skills/krea/scripts/generate_image.py --prompt "transform to watercolor painting style" --filename "2026-03-31-14-30-00-watercolor.png" --image-url "https://example.com/photo.jpg" --model nano-banana-pro

Generate video:

uv run ~/.codex/skills/krea/scripts/generate_video.py --prompt "A majestic eagle soaring over snow-capped mountains at sunrise" --filename "2026-03-31-15-00-00-eagle-mountains.mp4" --model veo-3 --duration 8 --generate-audio

Upscale image to 4K:

uv run ~/.codex/skills/krea/scripts/enhance_image.py --image-url "https://example.com/photo.jpg" --filename "2026-03-31-15-10-00-upscaled.png" --width 4096 --height 4096 --enhancer topaz

Train a LoRA style:

uv run ~/.codex/skills/krea/scripts/train_style.py --name "acme-brand" --model flux_dev --type Style --trigger-word "acmestyle" --urls-file brand-images.txt --output-dir output/acme-brand

List models:

uv run ~/.codex/skills/krea/scripts/list_models.py --type image

Pipelines (Multi-Step Workflows)

For multi-step workflows (generate → enhance → animate, fan_out branching, template variables, parallel execution, resume, dry-run), see PIPELINES.md.

Quick example:

uv run ~/.codex/skills/krea/scripts/pipeline.py --pipeline '{"steps":[{"action":"generate_image","prompt":"a cat astronaut","filename":"cat"},{"action":"enhance","use_previous":true,"enhancer":"topaz-standard-enhance","width":4096,"height":4096,"filename":"cat-4k"}]}'
安全使用建议
This skill is broadly coherent with its description (it wraps the Krea.ai API) but has a few things to check before you install or run it: 1) The code expects a Krea API token (KREA_API_TOKEN or --api-key) even though the registry metadata doesn't declare it — do not supply your global secrets without verifying. Prefer passing --api-key for single runs instead of setting a long-lived env var if you have concerns. 2) The scripts can upload local files (ensure_image_url), perform HTTP HEAD checks on arbitrary URLs (train_style validation), download results, and cache the OpenAPI spec in ~/.cache/krea — review the ensure_image_url, check_for_updates, and send_notification helpers (their implementations are in krea_helpers.py) to confirm they don't contact unexpected endpoints or leak data. 3) Run list_models.py first (without your API key) to see what endpoints look like; inspect krea_helpers.py fully (the file is long and partially truncated in the listing) to confirm update/notification behavior. 4) If you want to reduce risk, run these scripts in an isolated environment (throwaway VM/container) and avoid uploading sensitive local files. If you can't review the helper functions, treat the skill as untrusted and avoid supplying high-privilege credentials.
功能分析
Type: OpenClaw Skill Name: krea Version: 1.0.1 The krea skill bundle is a well-structured toolset for interacting with the Krea.ai API to generate and manipulate media. It includes scripts for image/video generation, upscaling, and LoRA training, supported by a helper module (krea_helpers.py) that manages API authentication, job polling, and dynamic model discovery via the Krea OpenAPI spec. While the bundle has the capability to read local files and upload them to the Krea API (required for image-to-image and training tasks), and uses subprocess.run for desktop notifications, these behaviors are strictly aligned with the stated purpose and implemented safely. No evidence of malicious intent, data exfiltration to unauthorized domains, or harmful prompt injection was found.
能力标签
cryptocan-make-purchases
能力评估
Purpose & Capability
Name/description match what the code does: scripts call the Krea.ai API to list models, generate images/videos, enhance/upscale, and train LoRA styles. There are no unrelated credentials requested. However, the scripts require a KREA API token at runtime (via --api-key or KREA_API_TOKEN), but the registry metadata declared no required env vars/primary credential — this is an inconsistency.
Instruction Scope
Runtime instructions direct the agent/user to run Python scripts that: (a) fetch the Krea OpenAPI spec from https://api.krea.ai/openapi.json, (b) make POST/GET calls to the Krea API, (c) perform HEAD checks on arbitrary training-image URLs, (d) accept local file paths and resolve/upload them via ensure_image_url, and (e) download result URLs. These are expected for the stated purpose, but they also mean the skill will: access arbitrary external URLs supplied by the user, upload local files (possible PII/IP leakage), and make network requests beyond a single fixed endpoint. The SKILL.md does not call out all of these privacy/network implications explicitly.
Install Mechanism
No install spec is provided (instruction-only installer), which keeps risk lower. Scripts declare dependency on Python >=3.10 and the 'requests' library (via header comments). No archived downloads or external installers are used. Code writes caches and manifests to standard user locations (~/.cache/krea, .pipeline-state.json, output-dir).
Credentials
The code requires an API key (KREA_API_TOKEN environment variable or --api-key) via get_api_key(), but the skill metadata lists no required environment variables or primary credential. Asking for an API key is appropriate given the purpose, but failing to declare it in registry metadata is an incoherence that can mislead users about secrets the skill will need or persist.
Persistence & Privilege
always:false (good). The scripts create a per-user cache (~/.cache/krea/openapi_models.json), pipeline manifest files (.pipeline-state.json) and may write training manifests to an output-dir. This is expected for a CLI wrapper; nothing indicates the skill tries to modify other skills or escalate privileges. However, helper functions referenced (check_for_updates, send_notification, ensure_image_url) are invoked and their exact network/side-effect behavior is not shown in the truncated code — these should be reviewed because they can enlarge the network footprint (e.g., contacting GitHub or external notification endpoints).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install krea
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /krea 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- 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.
v1.0.0
Krea AI skill initial release — streamlined image and video generation, enhancement, and model management via Krea.ai API. - Supports 20+ image models, 7 video models, and 3 upscalers for flexible creative workflows. - Includes scripts for image/video generation, enhancement, LoRA training, model listing, job status checks, and pipeline execution. - Emphasizes accurate model selection: always query live model list before generating. - Recommends fast/cheap vs. high-quality model workflows for cost efficiency and iteration. - Comprehensive CLI usage instructions and parameter documentation provided. - Handles API key management and common failure scenarios to ensure smooth operation.
元数据
Slug krea
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

krea 是什么?

Generate images, videos, upscale/enhance images, and train LoRA styles using the Krea.ai API. Supports 20+ image models (Flux, Imagen, GPT Image, Ideogram, S... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 128 次。

如何安装 krea?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install krea」即可一键安装,无需额外配置。

krea 是免费的吗?

是的,krea 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

krea 支持哪些平台?

krea 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 krea?

由 Albert Salgueda(@albertsalgueda)开发并维护,当前版本 v1.0.1。

💬 留言讨论