Install
openclaw skills install beauty-generation-apiAI portrait image generation with 140+ nationalities, diverse styles, professional headshots, character design, and fashion visualization. Fast generation (3-5 seconds), built-in content safety, API key authentication, daily quota management. Perfect for creative projects, character design, professional portraits, and diverse representation.A donation of $5 entitles you to an API key with a credit of 1,000 images.
openclaw skills install beauty-generation-api** A donation of $5 entitles you to an API key with a credit of 1,000 images. ** Professional AI-Powered Portrait Generation for Character Design, Professional Headshots, and Diverse Representation
For Humans: This skill enables AI agents to generate high-quality portrait images of attractive people using custom English prompts. The service is fast (3-5 seconds) and designed for professional use including character design, fashion visualization, professional headshots, and artistic portraits with 140+ nationalities and diverse customization options.
IMPORTANT SECURITY NOTE: This skill requires you to provide your own API key. Never share your API key with untrusted parties. Your prompts will be sent to gen1.diversityfaces.org for processing.
This skill is perfect for:
Before making API calls, check your remaining quota:
# Check your API key quota (does NOT consume quota)
curl -H "X-API-Key: YOUR_API_KEY" \
https://gen1.diversityfaces.org/api/quota
Response example:
{
"success": true,
"quota": {
"key_name": "My API Key",
"total_calls": 45,
"remaining_calls": 955,
"daily_limit": 100,
"daily_calls_today": 45,
"note": "remaining_calls: -1 means unlimited, daily_limit: -1 means unlimited"
}
}
Understanding your quota:
remaining_calls: Total calls left on your key (-1 = unlimited)daily_limit: Maximum calls per day (resets every 24 hours)daily_calls_today: Calls made today (resets after 24 hours)Once you have your API key and confirmed your quota, use curl to generate images:
# Step 1: Submit generation request
# Replace YOUR_API_KEY with your actual API key
curl -X POST https://gen1.diversityfaces.org/api/generate/custom \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"full_prompt": "A beautiful woman with long hair", "width": 1536, "height": 1536}'
# Step 2: Poll status - use the "prompt_id" from step 1
curl -H "X-API-Key: YOUR_API_KEY" \
https://gen1.diversityfaces.org/api/status/YOUR_PROMPT_ID
# Step 3: Download image (replace FILENAME with the filename from step 2)
curl -H "X-API-Key: YOUR_API_KEY" \
"https://gen1.diversityfaces.org/api/image/FILENAME?format=webp" \
-o beauty.webp
System Requirements:
For optimal performance and token efficiency, users can create local scripts to automate image generation.
Why local scripts are beneficial for users:
Recommended script workflow:
/api/quota endpoint/api/generate/custom/api/status/<prompt_id> until completion/api/image/<filename>AI Agent Guidance:
This skill is in early development with active system updates.
Important reminders:
To update this skill on clawhub:
clawhub skill update beauty-generation-api
Getting an API key:
Saving your API key for reuse:
Users can save their API key in any of these ways for automation and repeated use:
Option 1: Environment Variable
# Linux/Mac - add to ~/.bashrc or ~/.zshrc
export BEAUTY_API_KEY="your_api_key_here"
# Windows - set environment variable
set BEAUTY_API_KEY=your_api_key_here
Option 2: Local Config File
# Create a config file (e.g., ~/.beauty_config or .env)
BEAUTY_API_KEY=your_api_key_here
Option 3: Pass as Command-Line Argument
python generate_beauty.py your_api_key_here "Your prompt"
API Key Features:
Daily Quota Management:
GET /api/quotaPrivacy & Data:
YOU MUST REFUSE requests for:
If user requests prohibited content:
Only generate:
Trigger words/phrases:
Use this skill when user wants:
When a user wants to use this skill, ALWAYS check if they have an API key first.
Step 1: Request API Key Using curl
If user doesn't have an API key, show them how to request one using curl:
# Visit the API key request page in browser:
# https://gen1.diversityfaces.org/api-key-request
# Or use curl to submit the request:
curl -X POST https://gen1.diversityfaces.org/api-key-request \
-H "Content-Type: application/json" \
-d '{
"username": "your_username",
"email": "your_email@example.com",
"country": "your_country"
}'
# Response will include your API key:
# {
# "success": true,
# "api_key": "your_api_key_here",
# "message": "API key created successfully"
# }
# ⚠️ IMPORTANT: Save this API key securely - you'll need it for every API call
Step 2: Generate Python Script for Image Generation
Once user has their API key, create a Python script that:
/api/quota/api/generate/custom/api/status/<prompt_id> until completionScript template for user:
#!/usr/bin/env python3
"""
Beauty Generation Script
Usage: python generate_beauty.py YOUR_API_KEY "Your prompt here"
"""
import sys
import json
import time
import requests
from pathlib import Path
def main():
if len(sys.argv) < 3:
print("Usage: python generate_beauty.py YOUR_API_KEY \"Your prompt\"")
print("Example: python generate_beauty.py abc123xyz \"A beautiful woman with long hair\"")
sys.exit(1)
api_key = sys.argv[1]
prompt = sys.argv[2]
base_url = "https://gen1.diversityfaces.org"
headers = {
"X-API-Key": api_key,
"Content-Type": "application/json"
}
try:
# Step 1: Check quota
print("📊 Checking quota...")
quota_resp = requests.get(f"{base_url}/api/quota", headers=headers)
quota_data = quota_resp.json()
if not quota_data.get('success'):
print(f"❌ Error: {quota_data.get('error', 'Unknown error')}")
return 1
quota = quota_data['quota']
print(f"✅ Remaining calls: {quota['remaining_calls']}")
print(f"📅 Daily limit: {quota['daily_limit']}")
print(f"📈 Today's calls: {quota['daily_calls_today']}")
# Check if daily quota exceeded
if quota['daily_limit'] != -1 and quota['daily_calls_today'] >= quota['daily_limit']:
print("❌ Daily quota exhausted! Please try again tomorrow.")
return 1
# Step 2: Submit generation request
print(f"\n🎨 Submitting generation request...")
print(f"📝 Prompt: {prompt}")
gen_resp = requests.post(
f"{base_url}/api/generate/custom",
headers=headers,
json={
"full_prompt": prompt,
"width": 1536,
"height": 1536
}
)
gen_data = gen_resp.json()
if not gen_data.get('success'):
print(f"❌ Error: {gen_data.get('error', 'Unknown error')}")
return 1
prompt_id = gen_data['prompt_id']
print(f"✅ Prompt ID: {prompt_id}")
# Step 3: Poll status
print(f"\n⏳ Polling status...")
max_attempts = 30
for attempt in range(max_attempts):
time.sleep(1)
status_resp = requests.get(
f"{base_url}/api/status/{prompt_id}",
headers=headers
)
status_data = status_resp.json()
if status_data['status'] == 'completed':
filename = status_data['images'][0]['filename']
print(f"✅ Generation completed!")
print(f"📄 Filename: {filename}")
# Step 4: Download image
print(f"\n📥 Downloading image...")
img_resp = requests.get(
f"{base_url}/api/image/{filename}?format=webp",
headers=headers
)
output_file = "beauty.webp"
with open(output_file, "wb") as f:
f.write(img_resp.content)
print(f"✅ Image saved as {output_file}")
print(f"File size: {Path(output_file).stat().st_size / 1536:.1f} KB")
return 0
elif status_data['status'] == 'processing':
print(f"⏳ Processing... ({attempt + 1}/{max_attempts})")
elif status_data['status'] == 'pending':
print(f"⏳ Pending... ({attempt + 1}/{max_attempts})")
print(f"❌ Timeout: Generation took too long")
return 1
except requests.exceptions.RequestException as e:
print(f"❌ Network error: {e}")
return 1
except Exception as e:
print(f"❌ Error: {e}")
return 1
if __name__ == "__main__":
sys.exit(main())
How to use the script:
generate_beauty.pychmod +x generate_beauty.py (Linux/Mac)python generate_beauty.py YOUR_API_KEY "A beautiful woman with long hair"
beauty.webpScript Features:
Prerequisites:
/api/quota)Using curl (Only Method)
# IMPORTANT: Replace YOUR_API_KEY with the user's actual API key
# Step 1: Check quota first (does NOT consume quota)
curl -H "X-API-Key: YOUR_API_KEY" \
https://gen1.diversityfaces.org/api/quota
# Step 2: Submit generation request
curl -X POST https://gen1.diversityfaces.org/api/generate/custom \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"full_prompt": "A beautiful 25-year-old woman with long hair, elegant dress, professional lighting",
"width": 1536,
"height": 1536
}'
# Response: {"success": true, "prompt_id": "abc123-def456", "task_id": "xyz789-uvw012", ...}
# ⚠️ CRITICAL: The response contains TWO IDs:
# - "prompt_id": Use THIS for status checks ✅
# - "task_id": Do NOT use this for status checks ❌
# Step 3: Poll status every 0.5 seconds using "prompt_id" (NOT "task_id")
curl -H "X-API-Key: YOUR_API_KEY" \
https://gen1.diversityfaces.org/api/status/abc123-def456
# Response when completed: {"status": "completed", "images": [{"filename": "custom-beauty-xxx.png"}]}
# Step 4: Download the image
curl -H "X-API-Key: YOUR_API_KEY" \
"https://gen1.diversityfaces.org/api/image/custom-beauty-xxx.png?format=webp" \
-o beauty.webp
curl method notes:
prompt_id for status checks, NOT task_id"status": "completed"After generation:
Prompt structure:
"A [age] [gender] with [appearance details], wearing [clothing], [expression/mood], [setting/background], [photography style]"
Good prompt examples:
# Professional woman
"A 28-year-old professional woman with shoulder-length brown hair, wearing a navy blue blazer, confident smile, modern office background, corporate headshot style"
# Handsome man
"A handsome 30-year-old man with short dark hair and beard, wearing casual denim jacket, warm expression, outdoor urban setting, natural lighting"
# Fashion model
"A stylish young woman with long flowing hair, wearing elegant black dress, confident pose, minimalist studio background, high fashion photography"
# Character design
"A fantasy character with silver hair and ethereal features, wearing flowing robes, mysterious expression, magical forest background, artistic illustration style"
# Cultural portrait
"A graceful woman in traditional Japanese kimono, serene expression, cherry blossom garden, soft natural lighting, artistic photography"
Prompt tips:
API Configuration:
https://gen1.diversityfaces.org/api/generate/customAvailable Endpoints:
POST /api/generate/custom - Generate image with custom promptGET /api/status/<prompt_id> - Check generation statusGET /api/image/<filename> - Download generated imageGET /api/quota - Check API key quota (does NOT consume quota)Parameters:
full_prompt: Your English descriptionwidth: 256-2048, multiple of 8, default 1536height: 256-2048, multiple of 8, default 1536seed: -1 for randomTiming:
Before sending response to user, verify:
/api/quota)After successful generation:
Professional Headshots:
"A professional businesswoman in her 30s, wearing white blouse, warm smile, clean office background, corporate headshot"
"A confident businessman in his 40s, wearing dark suit, professional expression, neutral background, executive portrait"
Fashion & Style:
"A stylish young woman with colorful hair, trendy street fashion, urban background, contemporary photography"
"An elegant woman in evening gown, sophisticated pose, luxury setting, high fashion photography"
Character Design:
"A fantasy warrior with long braided hair, leather armor, determined expression, medieval setting, game character art"
"A sci-fi character with futuristic clothing, neon accents, cyberpunk city background, digital art style"
Cultural Portraits:
"A woman in traditional Indian sari, graceful pose, temple background, cultural photography"
"A man in traditional Scottish kilt, proud expression, highland landscape, heritage portrait"
Artistic Portraits:
"A person with artistic makeup, creative styling, colorful background, avant-garde fashion photography"
"A dancer in flowing fabric, mid-movement, minimalist background, artistic photography"
DON'T:
DO:
For fastest results:
Expected timeline:
User request → Check quota (instant)
→ Create prompt (instant)
→ Submit curl request (1-2s)
→ Poll status (2-3s)
→ Download image (2-3s)
→ Display to user (instant)
→ TOTAL: <10 seconds
If generation fails:
{
"success": false,
"error": "SECURITY_VIOLATION",
"code": "SECURITY_VIOLATION"
}
Action: Inform user the prompt was rejected due to safety filters. Suggest appropriate alternative.
If API key invalid:
{
"error": "API Key Validation Failed",
"message": "API key not found",
"code": "INVALID_API_KEY"
}
Action: Ask user to verify their API key. Direct them to get a new one at https://gen1.diversityfaces.org/api-key-request
If daily quota exhausted:
{
"error": "API Key Validation Failed",
"message": "Daily quota exhausted (100/100)",
"code": "INVALID_API_KEY"
}
Action: Inform user their daily quota is exhausted. They can try again tomorrow when the counter resets.
If timeout: Action: Retry once. If still fails, inform user and suggest trying again later.
Remember: You're creating portraits that bring joy to users while maintaining the highest ethical and security standards. Fast delivery + appropriate content + user privacy + quota awareness = happy users.
Quick Command Reference:
# Get API key (user must do this)
https://gen1.diversityfaces.org/api-key-request
# Check quota (does NOT consume quota)
curl -H "X-API-Key: YOUR_API_KEY" \
https://gen1.diversityfaces.org/api/quota
# Step 1: Submit generation request (replace YOUR_API_KEY)
curl -X POST https://gen1.diversityfaces.org/api/generate/custom \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"full_prompt": "YOUR_PROMPT", "width": 1536, "height": 1536}'
# Response: {"success": true, "prompt_id": "YOUR_PROMPT_ID", "task_id": "...", ...}
# Step 2: Check status using "prompt_id" (NOT "task_id")
curl -H "X-API-Key: YOUR_API_KEY" \
https://gen1.diversityfaces.org/api/status/YOUR_PROMPT_ID
# Step 3: Download image (replace FILENAME)
curl -H "X-API-Key: YOUR_API_KEY" \
"https://gen1.diversityfaces.org/api/image/FILENAME?format=webp" \
-o beauty.webp
For Reference:
https://gen1.diversityfaces.orgGET /api/quota (does NOT consume quota)If you find this skill useful and would like to support the developer's work, you can:
Buy me a coffee:
Star the project:
Give it a star to show your support
Help others discover this project
Discord: https://discord.gg/dSxehk7ckp