image2 AI Image Generation Skill for Openclaw

An advanced generative AI skill for creating high-quality images and posters via asynchronous text-to-image and image-to-image workflows.

runninghcm
v1.0.0
Apr 28, 2026
0
801
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install image2

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install image2 using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is image2 AI Image Generation Skill?

The image2 skill provides a robust interface for AI agents to generate visual content using the kexiangai.com infrastructure. By integrating this capability into Openclaw Skills, developers can enable their agents to produce professional-grade posters, product shots, and social media covers directly through API calls. The skill is designed to handle the complexities of asynchronous task management, ensuring that the agent remains focused on the workflow while the generation process runs in the background. It effectively bridge the gap between prompt engineering and final asset delivery by supporting precise aspect ratios and reference-based image creation.

Built for reliability, image2 emphasizes security and efficiency. It manages API keys through environment variables or local configuration files, ensuring credentials are never exposed in logs. This skill is a core component for those looking to expand the creative capabilities of their developer environment using Openclaw Skills, offering a seamless way to transform textual descriptions into vivid digital imagery.

image2 AI Image Generation Skill Use Cases

  • Creating marketing posters and social media covers using text-to-image prompts.
  • Generating image variations and design iterations using the image-to-image reference mode.
  • Automating the production of high-fidelity visual assets with specific aspect ratios like 16:9 or 9:16.
  • Empowering AI agents within Openclaw Skills to provide visual responses to complex user creative requests.

How image2 AI Image Generation Skill Works

  1. The skill captures and validates user parameters, including the prompt, model type (text2img/img2img), and desired aspect ratio.
  2. It authenticates with the backend service using a secure X_API_KEY retrieved from the environment or local configuration.
  3. An asynchronous task is initiated via the create endpoint, providing a unique task ID.
  4. The skill automatically enters a polling loop, checking the task status every 5 to 10 seconds.
  5. Upon task completion, the skill extracts the final image URLs and returns them to the user or calling agent.

image2 AI Image Generation Skill Setup

To begin using these Openclaw Skills, ensure you have curl and python3 installed, then configure your access credentials.

# Create the local configuration directory
mkdir -p ~/.config/image2

# Save your API key to the environment file
cat > ~/.config/image2/.env << 'EOF'
X_API_KEY=your_kexiangai_key_here
EOF

# Secure the configuration file
chmod 600 ~/.config/image2/.env

# Alternatively, set a session-level environment variable
export X_API_KEY='your_kexiangai_key_here'

image2 AI Image Generation Skill Data Schema & Taxonomy

The image2 skill utilizes a structured data approach within Openclaw Skills to ensure consistent API communication and metadata handling.

Parameter Source Description
x-api-key Header Required authentication token from kexiangai.com
modelType user_input Defines generation mode: text2img or img2img
prompt user_input The descriptive text used for image generation
size user_input Aspect ratio selection (e.g., 1:1, 16:9, 3:4, etc.)
urls user_input Array of up to 8 reference image URLs (required for img2img)
task_id Response Unique identifier for tracking asynchronous progress

image2 AI Image Generation Skill Advanced Features

  • Asynchronous lifecycle management that polls for task success or failure automatically.
  • Extensive aspect ratio support covering 14 different formats for various platform requirements.
  • Secure credential handling with priority for session-based environment variables over local files.
  • Intelligent duplicate submission prevention to protect user credits within Openclaw Skills.
  • Multi-reference image support allowing up to 8 source URLs for complex image-to-image synthesis.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*