# Send Krea.ai API to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "krea-api",
    "name": "Krea.ai API",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/FossilizedCarlos/krea-api",
    "canonicalUrl": "https://clawhub.ai/FossilizedCarlos/krea-api",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/krea-api",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=krea-api",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "krea_api.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "krea-api",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-04T19:18:19.628Z",
      "expiresAt": "2026-05-11T19:18:19.628Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=krea-api",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=krea-api",
        "contentDisposition": "attachment; filename=\"krea-api-0.2.4.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "krea-api"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/krea-api"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/krea-api",
    "downloadUrl": "https://openagent3.xyz/downloads/krea-api",
    "agentUrl": "https://openagent3.xyz/skills/krea-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/krea-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/krea-api/agent.md"
  }
}
```
## Documentation

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

CLI arguments: --key-id and --secret (for one-off use)
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

Get your Krea.ai API credentials from https://docs.krea.ai/developers/api-keys-and-billing
Create the credentials file:

mkdir -p ~/.openclaw/credentials

Add your credentials:

echo '{"apiKey": "YOUR_KEY_ID:YOUR_SECRET"}' > ~/.openclaw/credentials/krea.json

Set secure permissions:

chmod 600 ~/.openclaw/credentials/krea.json

### 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 = api.generate_and_wait(
    prompt="A serene Japanese garden",
    model="flux",
    width=1024,
    height=1024
)
print(urls)

### Parameters

ParameterTypeDefaultDescriptionpromptstrrequiredImage description (max 1800 chars)modelstr"flux"Model name from table belowwidthint1024Image width (512-2368)heightint1024Image height (512-2368)stepsint25Generation steps (1-100)guidance_scalefloat3.0Guidance scale (0-24)seedstrNoneRandom seed for reproducibility

### Available Models

ModelBest ForfluxGeneral purpose, high qualityimagen-4Latest Google modelideogram-3.0Text in imagesseedream-4Fast generationsnano-bananaQuick previews

Run python3 krea_api.py --list-models for full list.

### Check Usage

Krea.ai doesn't provide a public usage API. Check your usage at:

https://www.krea.ai/settings/usage-statistics

Or list recent jobs:

python3 krea_api.py --jobs 10

### File Locations

PurposePathCredentials~/.openclaw/credentials/krea.jsonScript{skill}/krea_api.pySkill docs{skill}/SKILL.md

### "API credentials required"

Check credentials file exists:

ls -la ~/.openclaw/credentials/krea.json
# Should show: -rw-------

Verify format (must have colon):

{"apiKey": "KEY_ID:SECRET"}

⚠️ Security: Do NOT use cat to view the credentials file — it contains secrets.

### Model not found

Run python3 krea_api.py --list-models to see available models.

### Credits

Thanks to Claude Opus 4.5 for researching the correct API structure. The docs incorrectly suggest /v1/images/flux but the working endpoint is /generate/image/bfl/flux-1-dev.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: FossilizedCarlos
- Version: 0.2.4
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-04T19:18:19.628Z
- Expires at: 2026-05-11T19:18:19.628Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/krea-api)
- [Send to Agent page](https://openagent3.xyz/skills/krea-api/agent)
- [JSON manifest](https://openagent3.xyz/skills/krea-api/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/krea-api/agent.md)
- [Download page](https://openagent3.xyz/downloads/krea-api)