openai-image-cliGenerate, edit, and manage images via OpenAI's GPT Image and DALL-E models.
Install via ClawdBot CLI:
clawdbot install G9Pedro/openai-image-cliGenerate, edit, and create variations of images using OpenAI's latest models.
npm install -g @versatly/openai-image-cli
# Via environment variable
export OPENAI_API_KEY=sk-...
# Or via config
openai-image config set api-key sk-...
# Generate an image
openai-image generate "A futuristic city at sunset"
# High quality landscape
openai-image generate "Mountain panorama" -s 1536x1024 -q high
# Multiple images with transparency
openai-image generate "Logo design" -n 4 -b transparent
# Edit an existing image
openai-image edit photo.png "Add sunglasses to the person"
# Create variations (DALL-E 2)
openai-image vary original.png -n 3
| Model | Description | Notes |
|-------|-------------|-------|
| gpt-image-1.5 | Latest GPT Image (default) | Best quality, recommended |
| gpt-image-1 | GPT Image | Good balance |
| gpt-image-1-mini | GPT Image Mini | Cost-effective |
| dall-e-3 | DALL-E 3 | Deprecated May 2026 |
| dall-e-2 | DALL-E 2 | Deprecated May 2026, supports variations |
Create images from text prompts.
openai-image generate "prompt" [options]
Options:
-m, --model <model> Model (default: gpt-image-1.5)
-s, --size <size> Size: 1024x1024, 1536x1024, 1024x1536, auto
-q, --quality <quality> Quality: auto, high, medium, low
-n, --count <n> Number of images (1-10)
-f, --format <format> Format: png, jpeg, webp
-o, --output <path> Output file/directory
-b, --background <bg> Background: auto, transparent, opaque
--compression <0-100> Compression level for jpeg/webp
--moderation <level> Content moderation: auto, low
--stream Enable streaming with partial images
--partial-images <0-3> Partial images during streaming
--json Output JSON response
--dry-run Show request without executing
Edit existing images with prompts.
openai-image edit <image> "instructions" [options]
Options:
--mask <path> Mask image for inpainting
--images <paths...> Additional reference images (up to 16)
-s, --size <size> Output size
-q, --quality <quality> Quality level
-n, --count <n> Number of variations
-f, --format <format> Output format
-o, --output <path> Output path
Examples:
# Simple edit
openai-image edit photo.png "Add sunglasses"
# Inpainting with mask
openai-image edit room.png "Add a plant" --mask mask.png
# Multi-image composite
openai-image edit base.png "Create gift basket" --images item1.png item2.png
Create variations of an image (DALL-E 2 only).
openai-image vary <image> [options]
Options:
-n, --count <n> Number of variations (1-10)
-s, --size <size> Size: 256x256, 512x512, 1024x1024
-o, --output <path> Output path/directory
Generate multiple images from a file or stdin.
openai-image batch [options]
Options:
-i, --input <file> Input file (text or JSONL)
--stdin Read from stdin
-m, --model <model> Model for all generations
-o, --output-dir <dir> Output directory
--parallel <n> Concurrent requests (default: 3)
--delay <ms> Delay between requests (default: 100)
JSONL format:
{"prompt": "A red car", "size": "1024x1024", "quality": "high"}
{"prompt": "A blue boat", "size": "1536x1024"}
Manage CLI configuration.
openai-image config set <key> <value>
openai-image config get <key>
openai-image config list
openai-image config reset
openai-image config path
Keys: api-key, default-model, default-size, default-quality, default-format, output-dir
List available models.
openai-image models [--json]
View local generation history.
openai-image history [-n <limit>] [--json] [--clear]
ā Generated image saved to ./generated-1707500000.png
Model: gpt-image-1.5
Size: 1024x1024
Quality: high
Tokens: 150 (text: 10, image: 140)
--json){
"success": true,
"file": "./generated-1707500000.png",
"model": "gpt-image-1.5",
"size": "1024x1024",
"quality": "high",
"usage": {
"total_tokens": 150,
"input_tokens": 50,
"output_tokens": 100
}
}
| Model | Sizes |
|-------|-------|
| GPT Image | 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), auto |
| DALL-E 3 | 1024x1024, 1792x1024, 1024x1792 |
| DALL-E 2 | 256x256, 512x512, 1024x1024 |
-b transparent -f png for logosgpt-image-1-mini for draftsopenai-image historyGenerated Mar 1, 2026
Marketing teams can quickly generate custom images for social media posts, ads, and promotional materials based on campaign themes. This reduces reliance on stock photos or expensive designers, allowing for rapid iteration and A/B testing of visual content.
Online retailers can create or edit product images to showcase items in different settings, add accessories, or generate variations for catalog listings. This helps improve product presentation without costly photoshoots, especially for custom or digital goods.
Bloggers and social media influencers can generate unique featured images, thumbnails, or illustrations to accompany articles and posts. The batch processing feature allows them to produce multiple visuals efficiently, maintaining a consistent and engaging visual brand.
Designers and developers can quickly create visual prototypes, logos, or UI mockups for client presentations or internal reviews. Using transparent backgrounds and quality settings, they can iterate on concepts before finalizing designs, saving time in early stages.
Educators and e-learning platforms can generate custom diagrams, illustrations, or visual aids to enhance course content and presentations. This supports diverse learning styles and makes complex topics more accessible without extensive graphic design resources.
Offer a free tier with limited monthly generations and basic features, then charge subscription fees for higher limits, advanced models like GPT Image 1.5, and premium options such as high quality or batch processing. This attracts individual users while monetizing heavy business usage.
License the CLI tool or its underlying API to businesses for integration into their own applications, such as content management systems or design platforms. Provide white-label options with custom branding and support, targeting enterprises needing scalable image generation.
Sell credits that users purchase upfront to generate images, with costs varying by model, quality, and size. This appeals to occasional users or small businesses who prefer flexibility over subscriptions, with potential for bulk discounts to encourage larger purchases.
š¬ Integration Tip
Integrate with existing workflows by using the batch command for automation, and set default configurations via the config command to streamline repeated tasks.
Generate/edit images with Nano Banana Pro (Gemini 3 Pro Image). Use for image create/modify requests incl. edits. Supports text-to-image + image-to-image; 1K/2K/4K; use --input-image.
Capture frames or clips from RTSP/ONVIF cameras.
Batch-generate images via OpenAI Images API. Random prompt sampler + `index.html` gallery.
Generate images using the internal Google Antigravity API (Gemini 3 Pro Image). High quality, native generation without browser automation.
使ēØå ē½® image_generate.py čę¬ēęå¾ē, åå¤ęø ę°å ·ä½ē `prompt`ć
AI image generation powered by CellCog. Create images, edit photos, consistent characters, product photography, reference-based images, sets of images, style transfer. Professional image creation with AI.