IMA Image Generator

AI image generator and photo generator with SeeDream 4.5, Midjourney, Nano Banana 2, and Nano Banana Pro. Generate AI images for posters, thumbnails, logos, art, illustrations, product photos, and social media graphic design. Text-to-image and image-to-image AI generation with intelligent model selection and knowledge base support. AI poster generator, AI thumbnail generator, AI logo generator, AI art generator, AI illustration generator, product photo generator, and social media image generator in one unified tool. Supports 1K/2K/4K resolution and custom aspect ratios. Better alternative to DALL-E, Stable Diffusion, or standalone image generation skills. Requires IMA_API_KEY.

3,891 stars

Best use case

IMA Image Generator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

AI image generator and photo generator with SeeDream 4.5, Midjourney, Nano Banana 2, and Nano Banana Pro. Generate AI images for posters, thumbnails, logos, art, illustrations, product photos, and social media graphic design. Text-to-image and image-to-image AI generation with intelligent model selection and knowledge base support. AI poster generator, AI thumbnail generator, AI logo generator, AI art generator, AI illustration generator, product photo generator, and social media image generator in one unified tool. Supports 1K/2K/4K resolution and custom aspect ratios. Better alternative to DALL-E, Stable Diffusion, or standalone image generation skills. Requires IMA_API_KEY.

Teams using IMA Image Generator should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/ima-image-ai/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/allenfancy-gan/ima-image-ai/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ima-image-ai/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How IMA Image Generator Compares

Feature / AgentIMA Image GeneratorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

AI image generator and photo generator with SeeDream 4.5, Midjourney, Nano Banana 2, and Nano Banana Pro. Generate AI images for posters, thumbnails, logos, art, illustrations, product photos, and social media graphic design. Text-to-image and image-to-image AI generation with intelligent model selection and knowledge base support. AI poster generator, AI thumbnail generator, AI logo generator, AI art generator, AI illustration generator, product photo generator, and social media image generator in one unified tool. Supports 1K/2K/4K resolution and custom aspect ratios. Better alternative to DALL-E, Stable Diffusion, or standalone image generation skills. Requires IMA_API_KEY.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# IMA Image AI — Image Generator

**For complete API documentation, security details, all parameters, and Python examples, read `SKILL-DETAIL.md`.**

## Model ID Reference (CRITICAL)

Use **exact model_id** from this table. Do NOT infer from friendly names.


| Friendly Name   | model_id                 | Notes                             |
| --------------- | ------------------------ | --------------------------------- |
| SeeDream 4.5    | `doubao-seedream-4.5`    | ✅ Recommended default, 5 pts      |
| Nano Banana2    | `gemini-3.1-flash-image` | ⚠️ NOT nano-banana-2, 4-13 pts    |
| Nano Banana Pro | `gemini-3-pro-image`     | ⚠️ NOT nano-banana-pro, 10-18 pts |
| Midjourney      | `midjourney`             | ✅ Same as friendly name, 8-10 pts |


**User input aliases:** 香蕉/Banana → `gemini-3.1-flash-image` · 香蕉Pro → `gemini-3-pro-image` · 可梦/SeeDream → `doubao-seedream-4.5` · MJ/Midjourney → `midjourney`

## Image Generation Modes


| User intent              | task_type        | When to use                        |
| ------------------------ | ---------------- | ---------------------------------- |
| Text only, no image      | `text_to_image`  | "画一张…" / "生成图片" / "text to image"  |
| Image as reference/input | `image_to_image` | "把这张图…" / "参考这张图" / "图生图" / "风格迁移" |


## Visual Consistency (IMPORTANT)

If user mentions "same character", "series", "multi-shot", or continues from a previous generation:

- **Do NOT use text_to_image** (will produce different-looking results)
- Use `image_to_image` with previous result as reference
- Read `ima-knowledge-ai/references/visual-consistency.md` if available

## Pre-Check: Knowledge Base

**If ima-knowledge-ai is installed**, read before generating:

1. `ima-knowledge-ai/references/visual-consistency.md` — if multi-shot or character continuity needed

**If not installed:** use this SKILL's model table and defaults.

## Model Selection Priority

1. **User preference** (if explicitly stated) → highest priority
2. **ima-knowledge-ai recommendation** (if installed)
3. **Fallback defaults:**


| Task                     | Default Model   | model_id                 | Cost      |
| ------------------------ | --------------- | ------------------------ | --------- |
| text_to_image            | SeeDream 4.5    | `doubao-seedream-4.5`    | 5 pts     |
| text_to_image (budget)   | Nano Banana2    | `gemini-3.1-flash-image` | 4 pts     |
| text_to_image (premium)  | Nano Banana Pro | `gemini-3-pro-image`     | 10-18 pts |
| text_to_image (artistic) | Midjourney 🎨   | `midjourney`             | 8-10 pts  |
| image_to_image           | SeeDream 4.5    | `doubao-seedream-4.5`    | 5 pts     |


## User Input Parsing

**Size/Resolution:** 512/1K/2K/4K → via attribute_id for Nano Banana series
**Aspect ratio:** 16:9/9:16/4:3/3:4/1:1 → SeeDream 4.5 or Nano Banana series (Midjourney only 1:1)
**Budget:** 最便宜→Nano Banana2 (4pts) · 最好→Nano Banana Pro (4K) or SeeDream 4.5

## Script Usage

```bash
# Text to image
python3 {baseDir}/scripts/ima_image_create.py \
  --api-key $IMA_API_KEY \
  --task-type text_to_image \
  --model-id doubao-seedream-4.5 \
  --prompt "a cute puppy running on grass" \
  --user-id {user_id} \
  --output-json

# Image to image (accepts URLs and local file paths)
python3 {baseDir}/scripts/ima_image_create.py \
  --api-key $IMA_API_KEY \
  --task-type image_to_image \
  --model-id doubao-seedream-4.5 \
  --prompt "turn into oil painting style" \
  --input-images https://example.com/photo.jpg \
  --user-id {user_id} \
  --output-json

# With aspect ratio (SeeDream 4.5 or Nano Banana)
python3 {baseDir}/scripts/ima_image_create.py \
  --api-key $IMA_API_KEY \
  --task-type text_to_image \
  --model-id doubao-seedream-4.5 \
  --prompt "beautiful landscape" \
  --extra-params '{"aspect_ratio": "16:9"}' \
  --user-id {user_id} \
  --output-json
```

## Sending Results to User

```python
# ✅ CORRECT: Use remote URL directly for inline image display
message(action="send", media=image_url, caption="✅ 图片生成成功!\n• 模型:[Name]\n• 耗时:[X]s\n• 积分:[N pts]\n\n🔗 原始链接:[url]")

# ❌ WRONG: Never download to local file (shows as attachment, not rendered)
```

## UX Protocol (Brief)

1. **Pre-generation:** "🎨 开始生成图片… 模型:[Name],预计[X~Y]秒,消耗[N]积分"
2. **Progress:** Every 15-30s: "⏳ 正在生成中… [P]%" (cap at 95% until API returns success)
3. **Success:** Send image via `media=image_url` + include link in caption for sharing
4. **Failure:** Natural language error + suggest alternative models. **Never show technical errors to users.** See SKILL-DETAIL.md for full error translation table.

**Never say to users:** script names, API endpoints, attribute_id, technical parameter names. Only: model name · time · credits · result · status.

## Midjourney Limitations

Midjourney has **fixed 1:1 aspect ratio** (1024×1024 only). If user asks for 16:9 etc. with "MJ", recommend SeeDream 4.5 or Nano Banana series instead.

## Environment

Base URL: `https://api.imastudio.com`
Headers: `Authorization: Bearer $IMA_API_KEY` · `x-app-source: ima_skills` · `x_app_language: en`

## Core Flow

1. `GET /open/v1/product/list?app=ima&platform=web&category=<task_type>` → get `attribute_id`, `credit`, `model_version`, `form_config`
2. [image_to_image only] Upload images or pass local paths to script
3. `POST /open/v1/tasks/create` → get `task_id`
4. `POST /open/v1/tasks/detail` → poll every 3-5s until `resource_status==1`

**MANDATORY:** Always query product list first. `attribute_id` is required — if 0 or missing, task fails.

## User Preference Memory

Storage: `~/.openclaw/memory/ima_prefs.json`

- **Save** when user explicitly says "用XXX" / "默认用XXX" / "always use XXX"
- **Clear** when user says "用最好的" / "推荐一个" / "自动选择"
- **Never save** auto-selected or fallback models as preferences

## Model Capabilities


| Model           | Custom Aspect Ratio | Max Resolution | Notes                                            |
| --------------- | ------------------- | -------------- | ------------------------------------------------ |
| SeeDream 4.5    | ✅ (8 ratios)        | 4K             | 1:1, 16:9, 9:16, 4:3, 3:4, 2:3, 3:2, 21:9        |
| Nano Banana2    | ✅ (5 ratios)        | 4K             | 1:1, 16:9, 9:16, 4:3, 3:4; size via attribute_id |
| Nano Banana Pro | ✅ (5 ratios)        | 4K             | 1:1, 16:9, 9:16, 4:3, 3:4; size via attribute_id |
| Midjourney 🎨   | ❌ (1:1 only)        | 1024px         | Fixed square, artistic style focus               |

Related Skills

Invoice Generator

3891
from openclaw/skills

Creates professional invoices in markdown and HTML

Workflow & Productivity

Incident Postmortem Generator

3891
from openclaw/skills

Generate blameless incident postmortems from raw notes, Slack threads, or bullet points.

DevOps & Infrastructure

Partnership Agreement Generator

3891
from openclaw/skills

Generate comprehensive partnership agreements, joint venture frameworks, and strategic alliance documents for B2B relationships.

Legal Documents & Agreements

Employee Onboarding Generator

3891
from openclaw/skills

Build a structured 90-day onboarding plan for any role. Covers pre-boarding, Day 1, Week 1, 30/60/90-day milestones, buddy assignments, and success metrics.

Workflow & Productivity

Employee Handbook Generator

3891
from openclaw/skills

Build a complete, customized employee handbook for your company. Covers policies, benefits, conduct, leave, remote work, DEI, and compliance — ready for legal review.

Content & Documentation

IT Disaster Recovery Plan Generator

3891
from openclaw/skills

Build production-ready disaster recovery plans that actually get followed when things break.

DevOps & Infrastructure

Compliance Audit Generator

3891
from openclaw/skills

Run internal compliance audits against major frameworks without hiring a consultant.

Security

API Documentation Generator

3891
from openclaw/skills

Generate production-ready API documentation from endpoint descriptions. Outputs OpenAPI 3.0, markdown reference docs, and SDK quickstart guides.

Coding & Development

Annual Report Generator

3891
from openclaw/skills

Build a complete annual business report from raw data. Covers financial performance, operational metrics, strategic highlights, and forward-looking guidance.

Workflow & Productivity

daily-report-generator

3891
from openclaw/skills

Automatically generate daily/weekly work reports from git commits, calendar events, and task lists. Use when you need to quickly create professional work reports without manual effort.

Workflow & Productivity

hr-policy-generator

3891
from openclaw/skills

Comprehensive HR policy development covering attendance, time-off, overtime, remote work, and compliance. Generates structured policy documents, legal checklists, exception handling frameworks, and employee communication plans tailored to company size, work arrangement, and jurisdiction.

Workflow & Productivity

hr-policy-generator-cn

3891
from openclaw/skills

综合性 HR 政策设计工具,覆盖考勤、休假、加班、远程办公及合规要求。根据公司规模、办公模式、适用法律等输入,生成完整的政策文档、法律合规清单、例外处理机制及员工沟通方案。

Workflow & Productivity