Loading...
Loading...
Supports text-to-image and image-to-image. Use when the user needs to create or generate images. Use cases: (1) Generate from text description, (2) Use reference images, (3) Customize model, aspect ratio, resolution. Triggers: generate image, draw, create image, AI art.
npx skill4agent add giggle-official/skills giggle-generation-imageGIGGLE_API_KEYNo inline Python: All commands must be executed via thetool. Never useexecor heredoc inline code.python3 << 'EOF'
No Retry on Error: If script execution encounters an error, do not retry. Report the error to the user directly and stop.
| Model | Description |
|---|---|
| seedream45 | Seedream, realistic and creative |
| midjourney | Midjourney style |
| nano-banana-2 | Nano Banana 2 |
| nano-banana-2-fast | Nano Banana 2 fast |
task_idImportant: Never passin exec'sGIGGLE_API_KEYparameter. API Key is read from system environment variable.env
# Text-to-image (default seedream45)
python3 scripts/generation_api.py \
--prompt "description" --aspect-ratio 16:9 \
--model seedream45 --resolution 2K \
--no-wait --json
# Text-to-image - Midjourney
python3 scripts/generation_api.py \
--prompt "description" --model midjourney \
--aspect-ratio 16:9 --resolution 2K \
--no-wait --json
# Image-to-image - Reference URL
python3 scripts/generation_api.py \
--prompt "Convert to oil painting style, keep composition" \
--reference-images "https://example.com/photo.jpg" \
--model nano-banana-2-fast \
--no-wait --json
# Batch generate multiple images
python3 scripts/generation_api.py \
--prompt "description" --generate-count 4 \
--no-wait --json{"status": "started", "task_id": "xxx"}addMemorygiggle-generation-image task_id: xxx (submitted: YYYY-MM-DD HH:mm)python3 scripts/generation_api.py --query --task-id <task_id>{"status": "...", "task_id": "xxx"}| Parameter | Default | Description |
|---|---|---|
| required | Image description prompt |
| seedream45 | seedream45, midjourney, nano-banana-2, nano-banana-2-fast |
| 16:9 | 16:9, 9:16, 1:1, 3:4, 4:3, 2:3, 3:2, 21:9 |
| 2K | Text-to-image: 1K, 2K, 4K (image-to-image partially supported) |
| 1 | Number of images to generate |
| - | Image-to-image reference; supports URL, base64, asset_id |
| false | Add watermark (image-to-image) |
reference_images{
"prompt": "A cute orange cat sitting on the windowsill in the sun, realistic style",
"reference_images": [
{
"url": "https://assets.giggle.pro/private/example/image.jpg?Policy=EXAMPLE_POLICY&Key-Pair-Id=EXAMPLE_KEY_PAIR_ID&Signature=EXAMPLE_SIGNATURE"
}
],
"generate_count": 1,
"model": "nano-banana-2-fast",
"aspect_ratio": "16:9",
"watermark": false
}{
"prompt": "A cute orange cat sitting on the windowsill in the sun, realistic style",
"reference_images": [
{
"base64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="
}
],
"generate_count": 1,
"model": "nano-banana-2-fast",
"aspect_ratio": "16:9",
"watermark": false
}Base64 format: Pass the raw Base64 string directly. Do not add theprefix.data:image/xxx;base64,
{
"prompt": "A cute orange cat sitting on the windowsill in the sun, realistic style",
"reference_images": [
{
"asset_id": "vvsdsfsdf"
}
],
"generate_count": 1,
"model": "nano-banana-2-fast",
"aspect_ratio": "16:9",
"watermark": false
}For multiple reference images, add more objects to thearray.reference_images
Question: "Which model would you like to use?"
Title: "Image Model"
Options:
- "seedream45 - Realistic & creative (recommended)"
- "midjourney - Artistic style"
- "nano-banana-2 - High quality"
- "nano-banana-2-fast - Fast generation"
multiSelect: falseQuestion: "What aspect ratio do you need?"
Title: "Aspect Ratio"
Options:
- "16:9 - Landscape (wallpaper/cover) (recommended)"
- "9:16 - Portrait (mobile)"
- "1:1 - Square"
- "Other ratios"
multiSelect: falseQuestion: "Do you need reference images?"
Title: "Generation Mode"
Options:
- "No - Text-to-image only"
- "Yes - Image-to-image (style transfer)"
multiSelect: falsehttps://assets.giggle.pro/...?Policy=...&Key-Pair-Id=...&Signature=...