"Generate AI images using Pollinations API. Use when user wants to generate images, create AI art, edit images, or needs visuals for docs/presentations. Triggers on 'generate image', 'create picture', 'make AI art', 'draw something'."
Generate high-quality AI images using Pollinations API with multiple model options.
Generate an image with a simple prompt:
python scripts/generate.py --prompt "a cat in space" --output cat.jpg
Configure your API key before using this skill. Keys are NEVER exposed in any output.
export POLLINATIONS_API_KEY="your_key_here"
python scripts/config_key.py --key "your_key_here"
# Creates ~/.pollinations/api_key with secure permissions (600)
Get your API key at: https://enter.pollinations.ai
| Model | Description | Cost |
|---|---|---|
flux |
Flux Schnell - Fast, high-quality | 0.001 pollen/img |
zimage |
Z-Image Turbo - 6B Flux + 2x upscale | 0.002 pollen/img |
kontext |
FLUX.1 Kontext - In-context editing | paid |
gptimage |
GPT Image Mini - OpenAI model | paid |
gptimage-large |
GPT Image 1.5 - Advanced | paid |
klein |
FLUX.2 Klein 4B - Editing support | paid |
Recommended: Use flux for speed, zimage for higher quality.
python scripts/generate.py --prompt "sunset over mountains" --model flux --output sunset.jpg
python scripts/generate.py --prompt "portrait of a warrior" --width 512 --height 768
python scripts/generate.py --prompt "cyberpunk city" --seed 42
python scripts/generate.py --prompt "forest landscape" --enhance
python scripts/generate.py --prompt "clean logo design" --negative-prompt "watermark, text, blurry"
python scripts/generate.py --prompt "add a hat" --image "https://example.com/photo.jpg" --model kontext
python scripts/generate.py --prompt "product photo" --quality hd --transparent --model gptimage
| Parameter | Default | Description |
|---|---|---|
--prompt |
required | Image description |
--output |
generated_image.jpg | Output filename |
--model |
flux | Model ID |
--width |
1024 | Width in pixels |
--height |
1024 | Height in pixels |
--seed |
0 | Seed (-1 for random) |
--enhance |
false | AI prompt enhancement |
--negative-prompt |
none | What to avoid |
--safe |
false | Safety filter |
--nologo |
false | Remove watermark |
--quality |
medium | low/medium/high/hd |
--transparent |
false | Transparent BG |
--image |
none | Reference image URL |
# List available models
python scripts/generate.py --models
# Check pollen balance
python scripts/generate.py --balance
# Configure API key
python scripts/config_key.py --show-methods
flux: 0.001 pollen per image (≈1000 images/pollen)zimage: 0.002 pollen per image (≈500 images/pollen)Common errors:
401: Invalid/missing API key → Run config_key.py402: Insufficient balance → Add pollen at enter.pollinations.ai403: Permission denied → Check key type (sk_ vs pk_)See references/api_reference.md for complete endpoint documentation.
API keys are protected at multiple levels:
Bearer ***KEY_HIDDEN***