SKILL·7CC8C2

openai-image-gen

swarmclawai
Updated 1 month ago
604
127
604
View on GitHub
Metaaiapi

About

This Claude Skill generates images using OpenAI's DALL-E 2, DALL-E 3, and GPT Image models via their API. It supports batch generation with random prompt sampling and outputs an HTML gallery for easy viewing. Use it when you need to create images through OpenAI and have an OPENAI_API_KEY available.

Quick Install

Claude Code

Recommended
Primary
npx skills add swarmclawai/swarmclaw -a claude-code
Plugin CommandAlternative
/plugin add https://github.com/swarmclawai/swarmclaw
Git CloneAlternative
git clone https://github.com/swarmclawai/swarmclaw.git ~/.claude/skills/openai-image-gen

Copy and paste this command in Claude Code to install this skill

Documentation

OpenAI Image Gen

Generate images via the OpenAI Images API with an HTML gallery viewer.

Run

Note: Image generation can take longer than typical timeouts. Set a higher timeout when running via shell (e.g., 300 seconds).

python3 {baseDir}/scripts/gen.py

Useful Flags

# GPT image models with various options
python3 {baseDir}/scripts/gen.py --count 16 --model gpt-image-1
python3 {baseDir}/scripts/gen.py --prompt "ultra-detailed studio photo of a lobster astronaut" --count 4
python3 {baseDir}/scripts/gen.py --size 1536x1024 --quality high --out-dir ./out/images
python3 {baseDir}/scripts/gen.py --model gpt-image-1.5 --background transparent --output-format webp

# DALL-E 3 (note: count is automatically limited to 1)
python3 {baseDir}/scripts/gen.py --model dall-e-3 --quality hd --size 1792x1024 --style vivid
python3 {baseDir}/scripts/gen.py --model dall-e-3 --style natural --prompt "serene mountain landscape"

# DALL-E 2
python3 {baseDir}/scripts/gen.py --model dall-e-2 --size 512x512 --count 4

Model-Specific Parameters

Size

  • GPT image models (gpt-image-1, gpt-image-1-mini, gpt-image-1.5): 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), or auto. Default: 1024x1024
  • dall-e-3: 1024x1024, 1792x1024, or 1024x1792. Default: 1024x1024
  • dall-e-2: 256x256, 512x512, or 1024x1024. Default: 1024x1024

Quality

  • GPT image models: auto, high, medium, or low. Default: high
  • dall-e-3: hd or standard. Default: standard
  • dall-e-2: standard only

Other Parameters

  • GPT image models support --background (transparent, opaque, auto) and --output-format (png, jpeg, webp)
  • dall-e-3 supports --style (vivid for hyper-real, natural for more natural looking)
  • dall-e-3 only supports n=1; the script automatically limits count to 1

Output

  • Image files (*.png, *.jpeg, or *.webp depending on model and format)
  • prompts.json (prompt-to-file mapping)
  • index.html (thumbnail gallery — open in browser to review)

GitHub Repository

swarmclawai/swarmclaw
Path: skills/openai-image-gen
0
agent-frameworkagent-memoryagent-runtimeagent-swarmagentsai
FAQ

Frequently asked questions

What is the openai-image-gen skill?

openai-image-gen is a Claude Skill by swarmclawai. Skills package instructions and resources that Claude loads on demand, so Claude can perform openai-image-gen-related tasks without extra prompting.

How do I install openai-image-gen?

Use the install commands on this page: add openai-image-gen to Claude Code as a plugin, or clone its repository into your skills directory, then restart Claude so it picks up the skill.

What category does openai-image-gen belong to?

openai-image-gen is in the Meta category, tagged ai and api.

Is openai-image-gen free to use?

Yes. openai-image-gen is listed on AIMCP and free to install. It runs inside Claude, so no separate service account is required to use the skill itself.

Related Skills

content-collections
Meta

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

View skill
polymarket
Meta

This skill enables developers to build applications with the Polymarket prediction markets platform, including API integration for trading and market data. It also provides real-time data streaming via WebSocket to monitor live trades and market activity. Use it for implementing trading strategies or creating tools that process live market updates.

View skill
creating-opencode-plugins
Meta

This skill helps developers create OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It provides the plugin structure, event API specifications, and implementation patterns for JavaScript/TypeScript modules. Use it when you need to intercept, monitor, or extend the OpenCode AI assistant's lifecycle with custom event-driven logic.

View skill
sglang
Meta

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

View skill