Awesome-omni-skill imaginepro-api
Generate AI images via ImaginePro API (Midjourney, Flux, Nano Banana, Lumi Girl, video)
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/backend/imaginepro-api" ~/.claude/skills/diegosouzapw-awesome-omni-skill-imaginepro-api && rm -rf "$T"
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/backend/imaginepro-api" ~/.openclaw/skills/diegosouzapw-awesome-omni-skill-imaginepro-api && rm -rf "$T"
skills/backend/imaginepro-api/SKILL.md- makes HTTP requests (curl)
- references API keys
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 <IMAGINEPRO_API_KEY>
Available Models
| Model | Endpoint | Credits | Best For |
|---|---|---|---|
| Midjourney (alpha v6) | | 10 (fast) / 5 (relax) | Artistic, photorealistic images |
| Flux | | 6 | Fast general-purpose generation |
| Nano Banana | | 6 | Reference image + text (try-on, mockup, staging) |
| Lumi Girl | | 6 | Character portraits, anime, stylized |
| MJ Video | | 10 | Video generation from start/end frames |
API Reference
Image Generation
POST /midjourney/imagine
— Midjourney Generation
/midjourney/imagineThe 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
to the prompt for relax mode (5 credits instead of 10, slower).--relax - Supports all standard Midjourney prompt parameters:
,--ar
,--style
,--chaos
,--no
,--seed
, etc.--q
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
/flux/imagineFast, 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" }
(optional, default 1): Number of images to generate (credits multiply by n).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)
/universal/imagineMulti-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" }
: Array of content items. First item should becontents
with the prompt prefixed bytype: "text"
. Subsequent items can be"Image creation: "
with atype: "image"
field for reference images.url
: Must bemodel
."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
/universal/zimageSpecialized 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" }
: Always 4 (fixed).steps
/width
: Max 1024 per dimension, must be divisible by 8. Ifheight
is in the prompt, dimensions are auto-calculated from the ratio (max dimension = 1024).--ar W:H- 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
/video/mj/generateGenerate 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" }
(required): URL of the starting frame image.startFrameUrl
(required): URL of the ending frame image.endFrameUrl
(optional, default "smooth motion transition"): Motion description.prompt
(optional, default 900): Max processing time in seconds.timeout
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
/midjourney/buttonUpscale 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" }
: ThemessageId
(task ID) from the original Midjourney generation.messageId
: Action to perform.button
-U1
for upscaling quadrants,U4
-V1
for variants.V4
Response:
{ "success": true, "messageId": "uuid-of-the-upscale-task", "createdAt": "2026-01-15T12:00:00+00:00" }
Credits: 5
POST /flux/upscale
— Flux Upscale
/flux/upscaleUpscale 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" }
(required): URL of the image to upscale.image
(required): Upscale factor, must be between 2 and 4 (inclusive).scale
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
/tools/remove-bgRemove 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)
/tools/prompt-extendExpand 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
/midjourney/message/{messageId}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
every 3-5 secondsGET /midjourney/message/{messageId} - Wait for
to bestatus
(images ready) orDONE
(error)FAIL - Download the result from the
oruri
arrayimages
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 <messageId> # Upscale (Midjourney) python3 imaginepro_api.py upscale --id <messageId> --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
— Output raw JSON (default is human-readable)--json
— Max wait time for--timeout <seconds>
command (default: 300)wait
— Polling interval for--interval <seconds>
command (default: 5)wait
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/<messageId> \ -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:
— Missing required parameter or invalid value400
— Invalid or missing API key / insufficient credits401
— Message not found404
— Internal server error (retry after a short delay)500
Tips for AI Agents
- Always use the
command for simple generation tasks — it handles the submit + poll loop automatically.wait - 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
on short prompts before generating — it's free and dramatically improves quality.enhance - Midjourney supports prompt parameters like
directly in the prompt string.--ar 16:9 --style raw --chaos 20 - For Nano Banana (virtual try-on, mockups), always provide reference image URLs in the
array.contents - 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.