OpenAI Image Gen

Batch-generate images via OpenAI Images API (GPT Image, DALL-E 3, DALL-E 2). Random prompt sampler with HTML gallery output.

OpenAI Image Gen is OpenClaw's skill for batch-generating images via OpenAI's Images API. It supports the full model lineage — DALL-E 2, DALL-E 3, GPT Image 1, and GPT Image 1.5 — with a built-in random prompt sampler and HTML gallery output for browsing results. It's designed for volume: generate dozens of images from varied prompts and review them in a clean local gallery. The skill is Python-based and uses OpenAI's official API directly via curl or the Python SDK. It handles the differences between models: DALL-E 3's revision behavior (where it rewrites your prompt for better results), GPT Image 1's native multimodal generation (text + image in, image out), and GPT Image 1.5's faster processing with comparable quality. Pricing varies significantly by model and quality: DALL-E 3 at ~$0.04/image (standard), GPT Image 1 from $0.011 (low) to $0.170 (high) per image, and GPT Image 1.5 with similar pricing but ~4x faster generation. The skill includes cost awareness — it can estimate batch costs before generating and supports quality/size parameters to control spend. The random prompt sampler is a unique feature: it generates creative, varied prompts from a seed concept, producing diverse image sets rather than variations of the same thing. The HTML gallery makes it easy to review, compare, and select the best outputs without juggling individual files. Compared to Gemini's Nano Banana, OpenAI's models have more consistent quality and better fine-grained control, but cost more and have no free tier. DALL-E 3 remains strong for photorealistic and artistic images, while GPT Image 1/1.5 add editing and multimodal input capabilities. Best suited for: batch image generation for content creation, product photo variations, social media asset creation, developers prototyping visual content, anyone needing consistent high-quality AI images at scale.

Tags: image-generation, openai, dall-e, creative, ai

Category: AI

Use Cases

  • Batch generation of blog post header images
  • Product photo variations for A/B testing
  • Social media asset creation at scale
  • Concept exploration: generate 20 variations of a logo concept
  • Presentation visuals: generate custom illustrations for slides
  • Random creative prompt exploration for inspiration
  • Client deliverables: HTML gallery of options to choose from

Tips

  • Use GPT Image 1 at 'low' quality ($0.011) for prototyping, 'high' ($0.170) for final assets
  • GPT Image 1.5 is 4x faster with comparable quality — use for time-sensitive batch jobs
  • The random prompt sampler creates diverse variations — great for exploring a concept space
  • Set a budget cap before batch generation: calculate estimated cost = images x per-image price
  • Use DALL-E 3 for single high-quality artistic images — it's still excellent for that use case
  • Save the HTML gallery for client presentations — clean way to show AI-generated options
  • Combine with the canvas skill to display generated images on connected devices
  • For consistent style across a batch, include style keywords in every prompt

Known Issues & Gotchas

  • Requires OPENAI_API_KEY — no free tier available for image generation
  • DALL-E 3 rewrites your prompt by default — the actual prompt used may differ from what you sent
  • GPT Image 1 costs range from $0.011 to $0.170 per image depending on quality/size — costs add up fast in batch mode
  • Rate limits apply: check your OpenAI tier for images-per-minute limits
  • DALL-E 2 and DALL-E 3 are effectively legacy — GPT Image 1/1.5 are the current recommendation
  • Image editing (inpainting) requires a mask image — not just a text description
  • The skill generates a local HTML gallery — requires a browser to view results
  • Content policy is strict — images violating OpenAI's usage policies will be rejected

Alternatives

  • Nano Banana Pro (Gemini)
  • Stable Diffusion (local)
  • Midjourney
  • Flux (Black Forest Labs)
  • Ideogram

Community Feedback

Image outputs cost approximately $0.01 (low), $0.04 (medium), and $0.17 (high) for square images with GPT Image 1.

— OpenAI Pricing Page

OpenAI image generation API pricing now starts at $0.005 and reaches $0.20 per output image, depending on model, quality, and size. GPT Image 1.5 generates images up to four times faster.

— AI Free API Blog

Light use runs $5-25/month for personal projects at 100-500 images. Medium use for small teams: $25-100/month. DALL-E 3 remains available at $0.04 per standard image but is legacy at this point.

— CostGoat

OpenAI's GPT Image 1.5 represents the cutting edge of AI image generation. Built on the same multimodal architecture as GPT models, with generation times often under 10 seconds.

— WaveSpeed AI Blog

Configuration Examples

Setup

# Ensure Python 3 and API key
brew install python
export OPENAI_API_KEY="sk-your-key-here"

Generate a single image (curl)

curl -s https://api.openai.com/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{
    "model": "gpt-image-1",
    "prompt": "A minimalist coffee shop logo in warm earth tones",
    "n": 1,
    "size": "1024x1024",
    "quality": "low"
  }' | jq '.data[0].url'

Batch generation with gallery

# The skill's batch script generates multiple images and creates an HTML gallery
python3 generate_batch.py \
  --prompt-seed "futuristic city" \
  --count 10 \
  --model gpt-image-1 \
  --quality medium \
  --output ./gallery/

Installation

brew install python

Homepage: https://platform.openai.com/docs/api-reference/images

Source: bundled