ai-image-gen · AI Image Generation

General-purpose AI image generation: text-to-image, image-to-image, and image variations.
Describe the picture in natural language and get a high-resolution image back; or rework an existing image (swap backgrounds, change styles, add or remove elements), or batch-generate variants. Built for everyday visual needs — article illustrations, social covers, product concepts, poster backgrounds.
Works with any OpenAI-compatible endpoint and the apimart async API. Bring your own API key.
Example invocation: "Generate a flat-illustration Shiba Inu on a bright contrasting background, 1024×1024."
Full brief
Positioning
ai-image-gen is the library's general-purpose image generation entry point: any subject, pure AI generation. It does not do layout and does not do e-commerce-specific visuals — it solves one problem: "generate an image from a description."
Core capabilities
- Text-to-image: natural-language prompt → high-resolution image. A five-element prompt structure (subject, style, composition, lighting, quality) keeps output controllable.
- Image-to-image: existing image + edit instruction → targeted rework: background swaps, style changes, element additions or removals.
- Variations: multiple variants from a single image for layout-time selection.
- Dual-mode access: auto-detects OpenAI-compatible (sync) vs. apimart (async polling); manual override available.
Workflow
- Run the config check (
check): verifies all three settings before any paid request is made; stops with fill-in guidance if anything is missing - Write the request as a structured image prompt (subject + style + composition + lighting + quality)
- Execute; outputs land in the
outputs/directory
Inputs & outputs
| Input | Notes |
|---|---|
| Image description | Required, natural language |
| Size / count | Optional, e.g. 1024×1024, n images per run |
| Source image | Required for image-to-image / variation tasks |
Output: PNG/JPG files under the designated outputs/ directory.
Boundaries with adjacent skills
| Skill | Lane |
|---|---|
| ai-image-gen (this) | General AI generation, any subject |
| ecom-details-image | E-commerce specialist: product hero shots, detail-page visual plans (25 scene templates) |
| card-quote / card-xiaohongshu / poster series | Deterministically rendered text cards/posters via HTML+CSS — pixel-precise typography, not AI-painted |
| image-editing | Deterministic processing of existing images (resize, crop, watermark, compress); generates nothing new |
Fit
- Blog/newsletter illustrations, social covers, slide graphics
- Product concept art, campaign poster backgrounds, social visual assets
- Concept phases where multiple visual directions are needed fast for comparison
Before you start
- Three settings in the project-root
.env:IMG_BASE_URL(API root),IMG_MODEL(model name),IMG_API_KEY(key; multiple alias names supported). - Keys live only in the local
.env; the skill never requests, echoes, uploads, or commits any real key. - Metered billing: run
checkfirst, trial a small batch, confirm the style, then scale.
ai-image-gen is part of the Aiglade Skill library. Invoke it from the Aiglade chat box in plain language.