← Back to Skills Marketplace
jon-xo

Kie Ai Skill

by Jon Newton · GitHub ↗ · v1.0.1
cross-platform ✓ Security Clean
635
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install kie-ai-skill
Description
Unified API access to multiple AI models via kie.ai - image generation (Nano Banana Pro, Flux, 4o-image) at 30-80% lower cost than official APIs. Includes lo...
README (SKILL.md)

kie.ai API Wrapper

Unified access to multiple AI models through kie.ai's API. Generate images, videos, and music at 30-80% lower cost than official APIs.

Features

  • 🎨 Image Generation: Nano Banana Pro (Gemini 3 Pro), Flux, 4o-image
  • 📤 Google Drive Upload: Optional automatic upload to Drive folder
  • 📊 Usage Tracking: Local task history and cost estimation
  • 💾 Local Storage: All files saved to images/ before optional upload
  • 🎬 Video Generation (coming soon): Veo 3.1, Runway Gen-4 Aleph
  • 🎵 Music Generation (coming soon): Suno V4/V4.5

Quick Start

# Generate an image
./kie-ai.sh generate-image "A serene Japanese garden at sunset"

# With custom options
./kie-ai.sh generate-image "Cyberpunk city" --resolution 2K --aspect 16:9

# Upload to Google Drive
./kie-ai.sh generate-image "Space nebula" --upload-drive

# Check usage
./kie-ai.sh balance

Installation

Prerequisites

  1. kie.ai API Key:

    • Sign up at https://kie.ai
    • Get API key from dashboard
    • Add to ~/.openclaw/openclaw.json:
      "env": {
        "vars": {
          "KIE_API_KEY": "your-key-here"
        }
      }
      
  2. (Optional) Maton API Key for Google Drive uploads:

Setup

# Clone to ~/src
cd ~/src
git clone https://github.com/jon-xo/kie-ai-skill.git
cd kie-ai-skill

# Make executable
chmod +x kie-ai.sh lib/*.py

# Create symlink for OpenClaw
ln -s ~/src/kie-ai-skill ~/.openclaw/workspace/skills/kie-ai-skill

# Test it
./kie-ai.sh generate-image "test image"

Configuration

Google Drive Upload (Optional)

# View/edit config
./kie-ai.sh config

# Edit config.json
{
  "drive": {
    "enabled": true,
    "folder_id": "YOUR_GOOGLE_DRIVE_FOLDER_ID"
  }
}

Get your folder ID from the Google Drive URL:

https://drive.google.com/drive/folders/1abc...xyz
                                          ^^^^ this part

Commands

generate-image

Generate images with various models.

./kie-ai.sh generate-image \x3Cprompt> [options]

Options:
  --model \x3Cname>         Model: nano-banana-pro (default), google/nano-banana, flux-kontext, 4o-image
  --resolution \x3Cres>     Resolution: 1K (default), 2K, 4K
  --aspect \x3Cratio>       Aspect ratio: 1:1 (default), 16:9, 9:16, 4:3, etc.
  --upload-drive         Upload to Google Drive after generation (requires config)

Examples:

# Basic generation
./kie-ai.sh generate-image "A red apple on a wooden table"

# High resolution
./kie-ai.sh generate-image "Mountain landscape" --resolution 4K

# Widescreen
./kie-ai.sh generate-image "Cinematic scene" --resolution 2K --aspect 16:9

# 16-bit pixel art
./kie-ai.sh generate-image "Cyberpunk lobster, 16-bit pixel art, no text" --aspect 16:9

# Generate and upload
./kie-ai.sh generate-image "Abstract art" --upload-drive

balance

Check credit usage and remaining balance.

./kie-ai.sh balance

Shows:

  • Link to web UI for actual balance
  • Local task history
  • Estimated credit consumption
  • USD equivalent

status

Show active/pending tasks.

./kie-ai.sh status

models

List available models and pricing.

./kie-ai.sh models

config

View/configure Google Drive upload settings.

./kie-ai.sh config

Pricing

Approximate costs (kie.ai vs official):

Model kie.ai Official Savings
Nano Banana Pro ~18-24 credits ($0.09-$0.12) $0.15 20-40%
Veo 3.1 Variable N/A
Flux Kontext ~50 credits ($0.25) $0.30 ~17%
Suno V4 Variable $0.10/track Comparable

Credit pricing: ~$0.005 per credit (1,000 credits = $5)

Check exact costs at: https://docs.kie.ai/pricing

File Storage

Generated files are saved to the images/ directory (gitignored):

~/src/kie-ai-skill/images/
  2026-02-11-12-05-01-1.png
  2026-02-11-12-09-56-1.png
  ...

Format: YYYY-MM-DD-HH-MM-SS-{index}.png

Retention:

  • Local: Forever (or until you delete)
  • kie.ai CDN: 14 days
  • Google Drive: Forever (if uploaded)

Task State

Tasks are tracked in:

~/src/kie-ai-skill/.task-state.json

Used for:

  • Resume interrupted tasks
  • Usage tracking
  • Preventing duplicate submissions

Available Models

Image Generation

  • nano-banana-pro - Gemini 3 Pro Image (1K/2K/4K)
  • google/nano-banana - Gemini 2.5 Flash Image (cheaper)
  • flux-kontext - Flux by Black Forest Labs
  • 4o-image - OpenAI GPT-4o Image

Video Generation (coming soon)

  • veo-3.1 - Google Veo 3.1 (cinematic)
  • veo-3.1-fast - Veo 3.1 Fast (cheaper)
  • runway-aleph - Runway Gen-4 Aleph

Music Generation (coming soon)

  • suno-v4 - Suno V4 (up to 8min)
  • suno-v4.5 - Suno V4.5 Plus

See https://docs.kie.ai for full list.

Troubleshooting

"KIE_API_KEY not set"

Add to ~/.openclaw/openclaw.json:

"env": {
  "vars": {
    "KIE_API_KEY": "your-key-here"
  }
}

"Credits insufficient"

Top up at: https://kie.ai/billing

"MATON_API_KEY not set" (Drive upload)

  1. Sign up at https://maton.ai
  2. Add MATON_API_KEY to openclaw.json
  3. Create Google Drive connection at https://ctrl.maton.ai

"Drive upload failed"

  1. Check MATON_API_KEY is set
  2. Verify Google Drive connection is active at https://ctrl.maton.ai
  3. Ensure folder_id in config.json is correct
  4. Try generating without --upload-drive first

Integration with OpenClaw

Use via exec or directly in OpenClaw agent conversations:

# From OpenClaw chat
Generate a cyberpunk city image with kie.ai

# The agent will run:
cd ~/src/kie-ai-skill && ./kie-ai.sh generate-image "cyberpunk city"

Security

Environment Variables

Variable Required Purpose
KIE_API_KEY Yes Authenticates all requests to api.kie.ai
MATON_API_KEY No Authenticates Google Drive uploads via gateway.maton.ai

External Endpoints

Endpoint Method Data Sent Used By
https://api.kie.ai/api/v1/jobs/createTask POST prompt, model, resolution, aspect ratio generate-image.py
https://api.kie.ai/api/v1/jobs/recordInfo GET task ID generate-image.py, watch_task.py
https://api.kie.ai/api/v1/chat/credit GET — (auth header only) balance.py
https://gateway.maton.ai/google-drive/upload/... POST image file bytes, filename upload-drive.py (optional)

Data Leaving This Machine

  • Prompt text is sent to api.kie.ai to generate images.
  • Generated image files are sent to gateway.maton.ai only when --upload-drive is explicitly passed.
  • API keys are transmitted as Authorization: Bearer headers and are never logged or written to disk by this skill.
  • No telemetry, analytics, or usage data is collected by this skill itself.

Trust Statement

This skill sends data to two third-party services: kie.ai for AI generation and maton.ai as an OAuth gateway for Google Drive. Review their respective privacy policies before use. Drive upload is strictly opt-in via --upload-drive.

Autonomous Invocation

This skill can be invoked autonomously by an OpenClaw agent when asked to generate images. It does not execute autonomously on its own — it must be called explicitly. To prevent autonomous invocation, remove the skill symlink from your OpenClaw workspace.

Links

License

MIT

Support

Issues: https://github.com/jon-xo/kie-ai-skill/issues

Usage Guidance
This skill appears to do what it says: it requires your KIE_API_KEY to call kie.ai and will save generated images and a local task state file under the skill folder. Drive uploads are optional but require a MATON_API_KEY (the documentation mentions this but the skill metadata doesn't list it as a required env var). Before installing: (1) confirm you trust the GitHub repo (https://github.com/jon-xo/kie-ai-skill) and the external services (kie.ai, maton.ai); (2) be aware generated images and .task-state.json are stored locally in the skill directory (delete if desired); (3) only enable Drive uploads if you trust the Maton gateway and create a token you can revoke; (4) store KIE_API_KEY in a place you accept (the docs suggest ~/.openclaw/openclaw.json or exporting the env var). If you need higher assurance, review the repo source locally and verify network endpoints and file writes before using.
Capability Analysis
Type: OpenClaw Skill Name: kie-ai-skill Version: 1.0.1 The OpenClaw skill bundle provides a wrapper for the kie.ai API, enabling image generation and optional Google Drive uploads. All network calls to `api.kie.ai` and `gateway.maton.ai` are explicitly declared in `SKILL.md` and are consistent with the stated purpose. The Python scripts (`lib/*.py`) use `urllib.request` for secure HTTPS communication and `argparse` for robust command-line argument handling. Local file operations are confined to the skill's directory (`images/`, `.task-state.json`, `config.json`). The `SKILL.md` is transparent about data handling and external dependencies, and there is no evidence of prompt injection attempts, credential theft, undeclared data exfiltration, persistence mechanisms, or obfuscation. The subprocess call to `upload-drive.py` is controlled and not a shell injection vulnerability.
Capability Assessment
Purpose & Capability
Name/description (kie.ai image/video/music wrapper) match the included files and runtime behavior. Required binary (python3) and primary env var (KIE_API_KEY) are appropriate for the stated functionality.
Instruction Scope
Runtime instructions and code operate within the skill's scope: creating tasks via kie.ai, polling status, downloading generated media to a local images/ folder, tracking tasks in .task-state.json, and optionally uploading to Google Drive. The SKILL.md instructs storing KIE_API_KEY in OpenClaw config and cloning the repo; those are expected. Note: Google Drive upload depends on MATON_API_KEY and making requests to gateway.maton.ai — this is described as optional in the docs, but it does result in uploading local files when enabled.
Install Mechanism
There is no bundled install script; the README/SKILL.md recommends cloning the GitHub repo and making scripts executable. No remote arbitrary downloads or obscure URLs are used by the code itself (network calls go to kie.ai and gateway.maton.ai).
Credentials
Primary required credential is KIE_API_KEY (expected). Google Drive integration requires MATON_API_KEY, but MATON_API_KEY is not listed in the skill's declared required env vars (it is documented as optional in SKILL.md). This is a minor inconsistency: MATON_API_KEY is only needed when Drive uploads are enabled.
Persistence & Privilege
The skill does not request forced/always-enabled presence and does not modify other skills or system-wide settings. It writes files only under the skill's working directory (images/ and .task-state.json) and creates/reads a local config.json for Drive settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install kie-ai-skill
  3. After installation, invoke the skill by name or use /kie-ai-skill
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
Fix metadata mismatch: MATON_API_KEY is optional (Drive upload only), removed from requires.env
v1.0.0
Initial release
Metadata
Slug kie-ai-skill
Version 1.0.1
License
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is Kie Ai Skill?

Unified API access to multiple AI models via kie.ai - image generation (Nano Banana Pro, Flux, 4o-image) at 30-80% lower cost than official APIs. Includes lo... It is an AI Agent Skill for Claude Code / OpenClaw, with 635 downloads so far.

How do I install Kie Ai Skill?

Run "/install kie-ai-skill" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Kie Ai Skill free?

Yes, Kie Ai Skill is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Kie Ai Skill support?

Kie Ai Skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Kie Ai Skill?

It is built and maintained by Jon Newton (@jon-xo); the current version is v1.0.1.

💬 Comments