Loading...
Loading...
(project - Skill) Generate AI images using Volcengine Jimeng API 4.0. Use when users request image generation from text prompts, image-to-image editing, or batch image creation. Triggers include "generate image", "create picture", "AI image", "Jimeng", "Seedream", or any request involving AI-powered image creation from descriptions.
npx skill4agent add wvlvik/toy-skills jimeng-api-image-gen
**Generation Info:**
- Prompt: [User's original prompt]
- Size: [Image dimensions]
- Save Path: [Local file path, if applicable]
**Generation Info:**
- Prompt: Shiba Inu under cherry blossom tree, warm sunlight, healing art style
- Size: 2304 × 1728
- Save Path: /generated_images/shiba_sakura.png# Text-to-image
scripts/generate_image.py "A white Siamese cat sitting on a windowsill, sunlight streaming in"
# With specific size
scripts/generate_image.py "Mountain sunset landscape" --size 2K
# Image-to-image editing
scripts/generate_image.py "Change to watercolor style" --images https://example.com/input.jpg
# Save to file
scripts/generate_image.py "Serene lake at sunset" --output /generated_images/lake.png| Parameter | Value | Description |
|---|---|---|
| Endpoint | | API base URL |
| Submit Action | | Submit async generation task |
| Query Action | | Query task result |
| Version | | API version |
| Service | | Service name for signing |
| Region | | Region for signing |
| req_key | | Jimeng AI 4.0 model identifier |
| Preset | Resolution | Pixels |
|---|---|---|
| 1K | 1024×1024 | 1,048,576 |
| 2K | 2048×2048 | 4,194,304 (default) |
| 4K | 4096×4096 | 16,777,216 |
--width--heightscripts/generate_image.py "prompt" --width 2560 --height 1440scripts/generate_image.py PROMPT [OPTIONS]
Arguments:
PROMPT Text prompt for image generation (required, max 800 chars)
Options:
--size SIZE Image size: 1K, 2K, 4K or WxH (default: 2K)
--width WIDTH Exact width (requires --height)
--height HEIGHT Exact height (requires --width)
--images URL [...] Input image URLs for image-to-image (max 10)
--watermark Add "AI Generated" watermark
--scale FLOAT Text influence 0-1 (default: 0.5)
--force-single Force single image output
--output PATH Download image to file
--json Output raw JSON response
Environment Variables:
VOLC_ACCESSKEY Access Key ID (required)
VOLC_SECRETKEY Secret Access Key (required)
JIMENG_API_URL API endpoint (default: https://visual.volcengineapi.com)
JIMENG_API_TIMEOUT Request timeout seconds (default: 120)
JIMENG_POLL_INTERVAL Polling interval seconds (default: 2)
JIMENG_MAX_POLL_ATTEMPTS Max polling attempts (default: 60)content-type;host;x-content-sha256;x-dateAuthorization| Code | Message | Description |
|---|---|---|
| 10000 | Success | Request successful |
| 50411 | Pre Img Risk Not Pass | Input image failed content check |
| 50511 | Post Img Risk Not Pass | Output image failed content check |
| 50412 | Text Risk Not Pass | Input text failed content check |
| 50413 | Post Text Risk Not Pass | Input text contains sensitive words |
| 50429 | Request Has Reached API Limit | Rate limit exceeded, retry later |
| 50500 | Internal Error | Server error |
| timeout | Request timeout | Increase JIMENG_API_TIMEOUT |