Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.
Design & media
ImaginePro AI Image Generation API
Try itGenerate AI images via ImaginePro API (Midjourney, Flux, Nano Banana, Lumi Girl, video)
What it does
Generate stunning AI images, videos, and edits using the ImaginePro API. This skill wraps the full ImaginePro backend and supports 5 generation models, image upscaling, background removal, prompt enhancement, and video generation.
The skill document
ImaginePro AI Image Generation API
Generate stunning AI images, videos, and edits using the ImaginePro API. This skill wraps the full ImaginePro backend and supports 5 generation models, image upscaling, background removal, prompt enhancement, and video generation.
Quick Start
# Set your API key (get one at https://platform.imaginepro.ai/dashboard/setup)
export IMAGINEPRO_API_KEY="your-api-key-here"
# Generate an image with Flux (fastest)
python3 imaginepro_api.py wait --prompt "a cyberpunk cityscape at sunset" --model flux
# Generate with Midjourney
python3 imaginepro_api.py wait --prompt "portrait of a warrior queen, cinematic lighting --ar 2:3"
# List available models and costs
python3 imaginepro_api.py models
Authentication
All requests require a Bearer token obtained from the ImaginePro Platform dashboard:
- Sign up at https://platform.imaginepro.ai
- Purchase credits from https://platform.imaginepro.ai/pricing
- Get your API key at https://platform.imaginepro.ai/dashboard/setup
- Set the environment variable:
export IMAGINEPRO_API_KEY="your-key"
Base URL: https://api.imaginepro.ai/api/v1
Header: Authorization: Bearer
Available Models
| Model | Endpoint | Credits | Best For |
|---|---|---|---|
| Midjourney (alpha v6) | /midjourney/imagine | 10 (fast) / 5 (relax) | Artistic, photorealistic images |
| Flux | /flux/imagine | 6 | Fast general-purpose generation |
| Nano Banana | /universal/imagine | 6 | Reference image + text (try-on, mockup, staging) |
| Lumi Girl | /universal/zimage | 6 | Character portraits, anime, stylized |
| MJ Video | /video/mj/generate | 10 | Video generation from start/end frames |
API Reference
Image Generation
POST /midjourney/imagine — Midjourney Generation
The flagship model. Supports Midjourney parameters in the prompt string (e.g., --ar 16:9, --style raw, --relax).
Request:
{
"prompt": "a majestic eagle soaring over mountains --ar 16:9",
"ref": "optional-tracking-id",
"webhookOverride": "https://your-server.com/webhook"
}
- Append
--relaxto the prompt for relax mode (5 credits instead of 10, slower). - Supports all standard Midjourney prompt parameters:
--ar,--style,--chaos,--no,--seed,--q, etc.
Response:
{
"success": true,
"messageId": "uuid-of-the-generation-task",
"createdAt": "2026-01-15T12:00:00+00:00"
}
Credits: 10 (fast mode) / 5 (relax mode)
POST /flux/imagine — Flux Generation
Fast, high-quality generation. Supports batch generation.
Request:
{
"prompt": "a cozy cabin in the woods, watercolor style",
"n": 1,
"ref": "optional-tracking-id",
"webhookOverride": "https://your-server.com/webhook"
}
n(optional, default 1): Number of images to generate (credits multiply by n).
Response:
{
"success": true,
"messageId": "uuid-of-the-generation-task",
"createdAt": "2026-01-15T12:00:00+00:00"
}
Credits: 6 per image
POST /universal/imagine — Nano Banana (Reference Image Generation)
Multi-modal generation using text + reference images. Ideal for virtual try-on, product mockups, interior staging, and style transfer.
Request:
{
"contents": [
{ "type": "text", "text": "Image creation: woman wearing this dress in a garden" },
{ "type": "image", "url": "https://example.com/dress.jpg" }
],
"model": "nano-banana-2",
"ref": "optional-tracking-id",
"webhookOverride": "https://your-server.com/webhook"
}
contents: Array of content items. First item should betype: "text"with the prompt prefixed by"Image creation: ". Subsequent items can betype: "image"with aurlfield for reference images.model: Must be"nano-banana-2".- Supports multiple reference images (e.g., a person photo + a garment photo for virtual try-on).
Response:
{
"success": true,
"messageId": "uuid-of-the-generation-task",
"createdAt": "2026-01-15T12:00:00+00:00"
}
Credits: 6
POST /universal/zimage — Lumi Girl
Specialized model for character portraits and stylized images. Supports aspect ratio via --ar in the prompt.
Request:
{
"prompt": "anime girl with silver hair in a moonlit forest --ar 3:4",
"steps": 4,
"width": 768,
"height": 1024,
"ref": "optional-tracking-id",
"webhookOverride": "https://your-server.com/webhook"
}
steps: Always 4 (fixed).width/height: Max 1024 per dimension, must be divisible by 8. If--ar W:His in the prompt, dimensions are auto-calculated from the ratio (max dimension = 1024).- Default: 1024x1024 if no aspect ratio specified.
Response:
{
"success": true,
"messageId": "uuid-of-the-generation-task",
"createdAt": "2026-01-15T12:00:00+00:00"
}
Credits: 6
POST /video/mj/generate — MJ Video
Generate a video from start and end frame images.
Request:
{
"prompt": "smooth camera pan with cinematic motion",
"startFrameUrl": "https://example.com/start.jpg",
"endFrameUrl": "https://example.com/end.jpg",
"timeout": 900,
"ref": "optional-tracking-id",
"webhookOverride": "https://your-server.com/webhook"
}
startFrameUrl(required): URL of the starting frame image.endFrameUrl(required): URL of the ending frame image.prompt(optional, default "smooth motion transition"): Motion description.timeout(optional, default 900): Max processing time in seconds.
Response:
{
"success": true,
"messageId": "uuid-of-the-generation-task",
"createdAt": "2026-01-15T12:00:00+00:00"
}
Credits: 10
Post-Processing
POST /midjourney/button — Midjourney Upscale / Variant
Upscale or create variants of Midjourney-generated images.
Request:
{
"messageId": "original-task-message-id",
"button": "U1",
"ref": "optional-tracking-id",
"webhookOverride": "https://your-server.com/webhook"
}
messageId: ThemessageId(task ID) from the original Midjourney generation.button: Action to perform.U1-U4for upscaling quadrants,V1-V4for variants.
Response:
{
"success": true,
"messageId": "uuid-of-the-upscale-task",
"createdAt": "2026-01-15T12:00:00+00:00"
}
Credits: 5
POST /flux/upscale — Flux Upscale
Upscale any image (not limited to Flux-generated).
Request:
{
"image": "https://example.com/image.jpg",
"scale": 2,
"ref": "optional-tracking-id",
"webhookOverride": "https://your-server.com/webhook"
}
image(required): URL of the image to upscale.scale(required): Upscale factor, must be between 2 and 4 (inclusive).
Response:
{
"success": true,
"messageId": "uuid-of-the-upscale-task",
"createdAt": "2026-01-15T12:00:00+00:00"
}
Credits: 2
POST /tools/remove-bg — Background Removal
Remove the background from an image.
Request:
{
"image": "https://example.com/photo.jpg",
"ref": "optional-tracking-id",
"webhookOverride": "https://your-server.com/webhook"
}
Response:
{
"success": true,
"messageId": "uuid-of-the-removebg-task",
"createdAt": "2026-01-15T12:00:00+00:00"
}
Credits: 5
POST /tools/prompt-extend — Prompt Enhancement (Free)
Expand a short prompt into a detailed, high-quality prompt.
Request:
{
"prompt": "a sunset"
}
Response:
{
"prompt": "a breathtaking sunset over the Pacific Ocean, golden hour light casting warm amber and coral tones across scattered cumulus clouds, silhouetted palm trees in the foreground..."
}
Credits: Free
Status & History
GET /midjourney/message/{messageId} — Check Generation Status
Poll this endpoint to check the progress of any generation task (works for all models, not just Midjourney).
Response (in progress):
{
"prompt": "a simple red circle on white background",
"status": "PROCESSING",
"progress": 0,
"messageId": "2346e0bc-c3c3-48ea-adec-3a21609fd288",
"createdAt": "2026-02-22T07:43:37+00:00",
"updatedAt": "2026-02-22T07:43:37+00:00"
}
Response (completed):
{
"prompt": "a simple red circle on white background",
"status": "DONE",
"images": ["https://cdn-new.imaginepro.ai/storage/v1/object/public/cdn/2346e0bc-c3c3-48ea-adec-3a21609fd288.png"],
"uri": "https://cdn-new.imaginepro.ai/storage/v1/object/public/cdn/2346e0bc-c3c3-48ea-adec-3a21609fd288.png",
"progress": 100,
"messageId": "2346e0bc-c3c3-48ea-adec-3a21609fd288",
"createdAt": "2026-02-22T07:43:37+00:00",
"updatedAt": "2026-02-22T07:43:49+00:00"
}
Response (failed):
{
"status": "FAIL",
"error": "Description of what went wrong"
}
Statuses: SUBMITTED → PROCESSING → DONE | FAIL
Credits: Free (polling is free)
Async Workflow
All generation endpoints are asynchronous. The workflow is:
- Submit a generation request → receive a
messageId - Poll
GET /midjourney/message/{messageId}every 3-5 seconds - Wait for
statusto beDONE(images ready) orFAIL(error) - Download the result from the
uriorimagesarray
The helper script's wait command automates this entire flow.
Credit Cost Summary
| Operation | Credits |
|---|---|
| Midjourney Imagine (fast) | 10 |
| Midjourney Imagine (relax) | 5 |
| Midjourney Upscale/Variant | 5 |
| Flux Imagine | 6 per image |
| Flux Upscale | 2 |
| Nano Banana Imagine | 6 |
| Lumi Girl Imagine | 6 |
| MJ Video | 10 |
| Background Removal | 5 |
| Prompt Enhancement | Free |
| Status Polling | Free |
Python Helper Script
The included imaginepro_api.py is a zero-dependency Python script (stdlib only) that wraps all API calls.
Commands
# Generate an image (async — returns messageId immediately)
python3 imaginepro_api.py imagine --prompt "a sunset over mountains" --model flux
# Generate and wait for result (blocking — polls until done)
python3 imaginepro_api.py wait --prompt "a sunset over mountains" --model flux
# Check status of a generation
python3 imaginepro_api.py status --id
# Upscale (Midjourney)
python3 imaginepro_api.py upscale --id --button U1
# Upscale (Flux)
python3 imaginepro_api.py upscale --image "https://example.com/img.jpg" --scale 2
# Remove background
python3 imaginepro_api.py removebg --image "https://example.com/photo.jpg"
# Enhance a prompt
python3 imaginepro_api.py enhance --prompt "a cat"
# List available models
python3 imaginepro_api.py models
Flags
--json— Output raw JSON (default is human-readable)--timeout— Max wait time forwaitcommand (default: 300)--interval— Polling interval forwaitcommand (default: 5)
curl Examples
# Generate with Flux
curl -X POST https://api.imaginepro.ai/api/v1/flux/imagine \
-H "Authorization: Bearer $IMAGINEPRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "a cyberpunk cityscape at sunset"}'
# Check status
curl https://api.imaginepro.ai/api/v1/midjourney/message/ \
-H "Authorization: Bearer $IMAGINEPRO_API_KEY"
# Enhance a prompt (free)
curl -X POST https://api.imaginepro.ai/api/v1/tools/prompt-extend \
-H "Authorization: Bearer $IMAGINEPRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "a cat"}'
Error Handling
API errors return JSON with message, error, and statusCode:
{
"message": "Prompt is required.",
"error": "Bad Request",
"statusCode": 400
}
Common error codes:
400— Missing required parameter or invalid value401— Invalid or missing API key / insufficient credits404— Message not found500— Internal server error (retry after a short delay)
Tips for AI Agents
- Always use the
waitcommand for simple generation tasks — it handles the submit + poll loop automatically. - Check credits on the dashboard at https://platform.imaginepro.ai/dashboard before large batches to avoid failures mid-way through. There is no API endpoint for checking credits.
- Use
enhanceon short prompts before generating — it's free and dramatically improves quality. - Midjourney supports prompt parameters like
--ar 16:9 --style raw --chaos 20directly in the prompt string. - For Nano Banana (virtual try-on, mockups), always provide reference image URLs in the
contentsarray. - Poll interval: 5 seconds is recommended. Don't poll faster than 3 seconds.
- Timeouts: Midjourney can take 30-120s. Video generation can take up to 15 minutes. Set timeouts accordingly.
Related skills
Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.
Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.
Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.
Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.
Write, debug, and tune Playwright specs with locator strategy, trace diagnosis, and CI-aware timeouts.
More from iamzifei
Browse all skillsAudit, create, and manage Google Ads and Meta Ads campaigns from your AI coding tool using 102 MCP tools.
AI KEY ——两套技能的总入口:做内容(选题/写稿/审核/复盘)+ 看生意(组合体检/营收归因/客户集中度/依赖风险/拿不准的决策)。三种模式:新手上路演示、任务前路由(按你的需求和丢进来的材料自动挑技能,把握大就直接开跑)、任务后导航。不知道用哪个就回这里。 触发方式:/aikey、/新手上路、/aikey 教程、「做条视频」「出个口播」「今天拍什么」「内容下一步怎么走」;新手教程:/aikey 新手指南、/aikey 新手、「这个怎么用」「第一次用,带我走一遍」「不知道能干嘛」 Single entry point for both skill sets — content (topic, script, review, retro) and business (portfolio, revenue, concentration, dependency, decisions). Three modes: guided onboarding demo, pre-task routing, post-task navigation. Trigger: /aikey, "make a short video", "what should I shoot today", "how do I use this" —— AI KEY · 不给公式,给判据。每条规则都标了实测代价。
AI KEY·口播稿写作 ——口播稿协作写作技能(知识付费口播为主形态)。三类脚本选型 + 从内容单元装配 + 逐段共创,不一键成稿。 触发方式:/aikey-script、/写口播、/写稿、/aikey-写稿、「写个口播稿」「帮我把这个题写出来」「知识付费口播」「写条视频文案」 Collaborative koubo (talking-head) script writing: script-type selection, unit assembly, section-by-section co-writing. Trigger: /aikey-script, "write a talking-head script", "turn this topic into a video script" —— AI KEY · 不给公式,给判据。每条规则都标了实测代价。
AI KEY·今天拍什么 ——短视频选题技能。先探寻现象、检验假设、比较解释,把问题转成观众在意的选择。交互式选题:供需判定 + 对标信号 + 本人真实数据佐证 + 配比检查,不一键生成选题清单。 触发方式:/aikey-topic、/拍什么、/选题、/aikey-选题、「今天拍什么」「帮我出选题」「这个题能不能做」「有个想法你帮我判断下」「这题只有一头」「这题没劲」「帮我把它讲出两头来」 Topic selection for short videos: supply-demand test, benchmark signals, real data evidence. Trigger: /aikey-topic, "what topic should I shoot", "is this topic worth making" —— AI KEY · 不给公式,给判据。每条规则都标了实测代价。
小白答疑:陪人把「空问题」问成真问题。「我是小白想学 AI 从哪开始」「普通人怎么赚钱」「什么适合我」「38 岁要失业了有什么出路」这类问题本身不是好问题,直接回答只能得到鸡汤。本技能不一次出答案,而是一轮一轮地问:每轮只问一个答得上来的问题,附上为什么问、可以怎么答;把处境、手上的东西、想要什么、卡在哪慢慢问出来,拼成一句真问题让对方确认,再落到一件这周能做完、做完看得见结果的事;做完回来,接着走下一步。两种用法:小白自己来问(技能直接陪你聊),或者博主把粉丝的评论私信贴进来(技能替你写每一轮的回复,每个粉丝一份记录)。第一次用说「新手指南」。 触发方式:/xiaobai-qa、/小白答疑、/回粉丝、「新手指南」「我是小白想问个问题」「我想用 AI 赚钱但不知道从哪开始」「这条评论怎么回」「粉丝私信问我……」「他回我了」「帮我回一下这些评论」「谁还没回」
AI KEY·短剧编剧 ——竖屏短剧编剧技能。给一个选题或一段初始内容,写出开头抓人、结尾留得住人的短剧剧本。两种产出:① 单集短剧(1–3 分钟,账号自己能拍);② 付费连续剧开发包(卖点 + 梗概 + 人物小传 + 标出付费卡点的分集大纲 + 前 3 集剧本)。冲突埋进设定,每集按「开场爆点 → 冲突 → 最大冲击 → 停在问题上」切;反转事先埋线。定稿后可选切分镜,写成 Seedance 视频提示词交给 chatcut-video-gen,先确认花费。不负责口播稿(→ aikey-script)。 触发方式:/aikey-drama、/短剧、/写短剧、「写个短剧」「帮我把这个写成短剧」「竖屏剧」「微短剧」「付费短剧怎么写」 Vertical short-drama screenwriting: a standalone 1–3 minute episode, or a paid-series pack (logline, synopsis, bios, outline with paywall points, first three episodes). Optional shot list and Seedance prompts after the cost is confirmed. Trigger: /aikey-drama, "write a short drama", "micro-drama script" —— AI KEY · 不给公式,给判据。每条规则都标了实测代价。