Image Generation
Generate AI images from text prompts with optional reference images, choosing the pro or flash model and any supported aspect ratio.
Generate AI images from text descriptions. Choose between a higher-quality pro model and a
faster, cheaper flash model, pick a resolution and aspect ratio, and optionally pass reference
images for style guidance. Images are returned as local files or displayed inline.
Trigger
Invoke this skill with /image-gen, or use any of these phrases:
| Phrase | Language |
|---|---|
generate an image / generate image | English |
draw / visualize / create picture | English |
生成图片 / 画一张 | Chinese |
AI图 / 配图 | Chinese |
Requires ListenHub Skills to be installed — see Getting Started.
Quick Example
Generate an image: cyberpunk city at night, 16:9, 2KThe AI collects your preferences one question at a time, summarizes them for confirmation, and then generates the image.
Parameters
| Parameter | Options | Default |
|---|---|---|
| Model | 🍌 pro (gemini-3-pro-image, higher quality, recommended), ⚡️ flash (gemini-3.1-flash-image, faster and cheaper, unlocks extreme ratios) | — |
| Resolution | 1K, 2K (recommended), 4K | — |
| Aspect ratio | 16:9, 1:1, 9:16, 2:3, 3:2, 3:4, 4:3, 21:9; flash also supports 1:4, 4:1, 1:8, 8:1 | — |
| Reference images | Up to 5, via local file or image URL | None |
Choosing a Model
Both models are Google Gemini image models. Pick based on quality versus speed and which aspect ratios you need.
| Model | Model ID | Use it when |
|---|---|---|
🍌 pro | gemini-3-pro-image | You want the highest quality and most detail. Recommended default. |
⚡️ flash | gemini-3.1-flash-image | You want faster, cheaper generation, or you need an extreme aspect ratio (1:4, 4:1, 1:8, 8:1). |
The four extreme ratios — 1:4 (narrow portrait), 4:1 (wide landscape), 1:8 (extreme portrait),
and 8:1 (panoramic) — are available only on the flash model. The eight standard ratios work
on both models.
Don't hardcode credit costs — they depend on model, resolution, and account. To see the cost before
generating, check the estimate-credits endpoint.
Writing Good Prompts
A good prompt covers these elements:
- Subject — what is in the image
- Style — art style or visual treatment
- Composition — how elements are arranged
- Lighting/Mood — atmosphere and time of day
- Quality — detail level and rendering quality
Examples
Basic:
a cat sitting on a windowsillBetter:
a fluffy orange tabby cat sitting on a sunny windowsill, warm afternoon light, cozy interior, highly detailed, photorealisticStyle Keywords
| Style | Keywords |
|---|---|
| Photorealistic | photorealistic, highly detailed, 8K, professional photography |
| Cyberpunk | neon lights, futuristic, dystopian, rain-slicked streets |
| Ink painting | Chinese ink painting, traditional art style, brush strokes |
| Watercolor | watercolor painting, soft edges, flowing colors |
| Anime | anime style, Japanese animation, cel shading |
| Minimalist | minimalist, clean lines, simple composition, white space |
Always write prompts in English — the image model is trained on English descriptions. If you describe in Chinese, the AI translates automatically.
Prompt Enrichment
The AI passes your prompt through unchanged by default. It only offers to enrich the prompt when:
- The prompt is very short (a few words), and
- You haven't asked for verbatim generation.
When you accept enrichment, the AI adds style, lighting, and composition detail, then shows you the expanded prompt before submitting. For example, "cyberpunk" becomes "neon lights, futuristic, dystopian, rain-slicked streets."
The AI never rewrites a prompt that is already long, detailed, or structured — it treats you as experienced. It also leaves the prompt exactly as written when you say something like "use this prompt exactly."
Reference Images
Reference images guide the AI on style, not content. Your prompt still controls what appears in the image. You can supply up to 5 references, mixing local files and URLs in one request.
Supported formats: jpg, png, webp, gif. Max 10 MB per file.
Using Local Files
The skill accepts local file paths directly. Provide the path (for example ./sketch.png) when the
AI asks about references — it uploads the file for you. No image hosting needed.
Using Image URLs
- Upload your reference to an image hosting service (imgbb.com, sm.ms, postimages.org)
- Copy the direct image URL (ending in
.jpg,.png,.webp, or.gif) - Provide the URL when the AI asks about references
You can mix local files and URLs in the same request — for example one local sketch plus one hosted photo.
Using Base64 Inline Data (API)
When calling the Image Generation API directly,
you can also provide reference images as base64-encoded data via the inlineData field — no image
hosting required. This is useful for programmatic workflows where you already have the image in
memory.
Each reference image must use exactly one of fileData (URL) or inlineData (base64), not both. See
the API reference for request format and code
examples.
Output
Output behavior follows the outputMode set during config:
inline(default) — the image is displayed directly in the conversationdownload— saved to.listenhub/image-gen/YYYY-MM-DD-{id}/in the current projectboth— displayed inline and saved locally
The output mode can be changed at any time by saying "reconfigure" when the AI shows your current config.
API Reference
See the Image Generation API reference for endpoint details, request parameters, the provider/model matrix, and code examples.