搜索

PythonReactSEOPDF
OpenClaw

Krea Api

Krea.ai Image Generation Skill

fossilizedcarlos0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install fossilizedcarlos/krea-api

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

Krea.ai Image Generation Skill

Generate images using Krea.ai's API with support for multiple models including Flux, Imagen 4, Ideogram 3.0, and more.

Features

  • ✅ Async job-based generation (POST → poll → result)
  • ✅ Support for multiple image models
  • ✅ Configurable parameters (width, height, steps, guidance, seed)
  • ✅ Stdlib-only dependencies (no requests required)
  • ✅ Secure credential handling with file permissions

Security

This skill prioritizes security:

  • No webhook support - Removed to prevent SSRF risks
  • Stdlib dependencies - Minimal attack surface (uses urllib only)
  • File-based credentials - Primary credential source with secure permissions
  • Input validation - All parameters validated before API calls
Credential Sources (in order of precedence)
  1. CLI arguments: --key-id and --secret (for one-off use)
  2. File: ~/.openclaw/credentials/krea.json
Note on Subprocess

The --usage flag uses webbrowser.open() (stdlib) to open the usage dashboard in a browser. No subprocess calls.

Setup

  1. Get your Krea.ai API credentials from https://docs.krea.ai/developers/api-keys-and-billing
  2. Create the credentials file:
mkdir -p ~/.openclaw/credentials
  1. Add your credentials:
echo '{"apiKey": "YOUR_KEY_ID:YOUR_SECRET"}' > ~/.openclaw/credentials/krea.json
  1. Set secure permissions:
chmod 600 ~/.openclaw/credentials/krea.json

Usage

Command Line
# Generate an image
python3 krea_api.py --prompt "A sunset over the ocean"

# With specific model
python3 krea_api.py --prompt "Cyberpunk city" --model imagen-4

# Custom size
python3 krea_api.py --prompt "Portrait" --width 1024 --height 1280

# List available models
python3 krea_api.py --list-models

# Check recent jobs
python3 krea_api.py --jobs 10
Python Script
from krea_api import KreaAPI

api = KreaAPI()  # Reads from ~/.openclaw/credentials/krea.json

# Generate and wait
urls =...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/fossilizedcarlos/krea-api
Version
—
Commit
6ca83503d7658a4dfbf20ba82eff6395ca58f4f7
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

Krea.ai API Skill

See SKILL.md for full documentation.

Quick Start

# Generate an image (uses credentials from ~/.openclaw/credentials/krea.json)
python3 krea_api.py --prompt "A cute crab at a desk" --model flux

# List available models
python3 krea_api.py --list-models

Configure Credentials

Create the credentials file:

mkdir -p ~/.openclaw/credentials
echo '{"apiKey": "YOUR_KEY_ID:YOUR_SECRET"}' > ~/.openclaw/credentials/krea.json
chmod 600 ~/.openclaw/credentials/krea.json

Or pass directly via CLI:

python3 krea_api.py --prompt "..." --key-id YOUR_KEY_ID --secret YOUR_SECRET

Publish to ClawHub

# Login once
clawdhub login

# Publish this skill folder
clawdhub publish . --slug krea-api --name "Krea.ai API"

Requirements

  • Python 3.7+
  • No external dependencies (uses stdlib)

来源内容

SKILL.md
# Krea.ai Image Generation Skill

Generate images using Krea.ai's API with support for multiple models including Flux, Imagen 4, Ideogram 3.0, and more.

## Features

- ✅ Async job-based generation (POST → poll → result)
- ✅ Support for multiple image models
- ✅ Configurable parameters (width, height, steps, guidance, seed)
- ✅ Stdlib-only dependencies (no `requests` required)
- ✅ Secure credential handling with file permissions

## Security

This skill prioritizes security:

- **No webhook support** - Removed to prevent SSRF risks
- **Stdlib dependencies** - Minimal attack surface (uses `urllib` only)
- **File-based credentials** - Primary credential source with secure permissions
- **Input validation** - All parameters validated before API calls

### Credential Sources (in order of precedence)

1. **CLI arguments**: `--key-id` and `--secret` (for one-off use)
2. **File**: `~/.openclaw/credentials/krea.json`

### Note on Subprocess

The `--usage` flag uses `webbrowser.open()` (stdlib) to open the usage dashboard in a browser. No subprocess calls.

## Setup

1. Get your Krea.ai API credentials from https://docs.krea.ai/developers/api-keys-and-billing
2. Create the credentials file:
```bash
mkdir -p ~/.openclaw/credentials
```

3. Add your credentials:
```bash
echo '{"apiKey": "YOUR_KEY_ID:YOUR_SECRET"}' > ~/.openclaw/credentials/krea.json
```

4. Set secure permissions:
```bash
chmod 600 ~/.openclaw/credentials/krea.json
```

## Usage

### Command Line

```bash
# Generate an image
python3 krea_api.py --prompt "A sunset over the ocean"

# With specific model
python3 krea_api.py --prompt "Cyberpunk city" --model imagen-4

# Custom size
python3 krea_api.py --prompt "Portrait" --width 1024 --height 1280

# List available models
python3 krea_api.py --list-models

# Check recent jobs
python3 krea_api.py --jobs 10
```

### Python Script

```python
from krea_api import KreaAPI

api = KreaAPI()  # Reads from ~/.openclaw/credentials/krea.json

# Generate and wait
urls =...
README
# Krea.ai API Skill

See [SKILL.md](./SKILL.md) for full documentation.

## Quick Start

```bash
# Generate an image (uses credentials from ~/.openclaw/credentials/krea.json)
python3 krea_api.py --prompt "A cute crab at a desk" --model flux

# List available models
python3 krea_api.py --list-models
```

## Configure Credentials

Create the credentials file:
```bash
mkdir -p ~/.openclaw/credentials
echo '{"apiKey": "YOUR_KEY_ID:YOUR_SECRET"}' > ~/.openclaw/credentials/krea.json
chmod 600 ~/.openclaw/credentials/krea.json
```

Or pass directly via CLI:
```bash
python3 krea_api.py --prompt "..." --key-id YOUR_KEY_ID --secret YOUR_SECRET
```

## Publish to ClawHub

```bash
# Login once
clawdhub login

# Publish this skill folder
clawdhub publish . --slug krea-api --name "Krea.ai API"
```

## Requirements

- Python 3.7+
- No external dependencies (uses stdlib)

相关技能

OpenClaw

dojo.md

edholofy

University for AI agents. 92 courses, 4400+ scenarios, any model via OpenRouter. Auto-training loops generate per-model SKILL.md documents. Works with Claude Code, OpenClaw, Cursor, Windsurf. No fine-tuning req...

OpenClaw

humanpages

human-pages-ai

Search and hire real humans for tasks — photography, delivery, research, and more

OpenClaw

openclaw-skills

zseven-w

Reusable skill templates for OpenClaw AI agents. Templates for API integration, data processing, web scraping, CLI tools, and file processing.

OpenClaw

wps-macos-helper

lethehades

macOS WPS Office workflow helper skill for safer document preparation, conversion, export, and compatibility guidance