repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | --- |
| #2 | name: openai-image-gen |
| #3 | description: Batch-generate images via OpenAI Images API. Random prompt sampler + `index.html` gallery. |
| #4 | homepage: https://platform.openai.com/docs/api-reference/images |
| #5 | metadata: {"clawdbot":{"emoji":"🖼️","requires":{"bins":["python3"],"env":["OPENAI_API_KEY"]},"primaryEnv":"OPENAI_API_KEY","install":[{"id":"python-brew","kind":"brew","formula":"python","bins":["python3"],"label":"Install Python (brew)"}]}} |
| #6 | --- |
| #7 | |
| #8 | # OpenAI Image Gen |
| #9 | |
| #10 | Generate a handful of “random but structured” prompts and render them via the OpenAI Images API. |
| #11 | |
| #12 | ## Run |
| #13 | |
| #14 | ```bash |
| #15 | python3 {baseDir}/scripts/gen.py |
| #16 | open ~/Projects/tmp/openai-image-gen-*/index.html # if ~/Projects/tmp exists; else ./tmp/... |
| #17 | ``` |
| #18 | |
| #19 | Useful flags: |
| #20 | |
| #21 | ```bash |
| #22 | # GPT image models with various options |
| #23 | python3 {baseDir}/scripts/gen.py --count 16 --model gpt-image-1 |
| #24 | python3 {baseDir}/scripts/gen.py --prompt "ultra-detailed studio photo of a lobster astronaut" --count 4 |
| #25 | python3 {baseDir}/scripts/gen.py --size 1536x1024 --quality high --out-dir ./out/images |
| #26 | python3 {baseDir}/scripts/gen.py --model gpt-image-1.5 --background transparent --output-format webp |
| #27 | |
| #28 | # DALL-E 3 (note: count is automatically limited to 1) |
| #29 | python3 {baseDir}/scripts/gen.py --model dall-e-3 --quality hd --size 1792x1024 --style vivid |
| #30 | python3 {baseDir}/scripts/gen.py --model dall-e-3 --style natural --prompt "serene mountain landscape" |
| #31 | |
| #32 | # DALL-E 2 |
| #33 | python3 {baseDir}/scripts/gen.py --model dall-e-2 --size 512x512 --count 4 |
| #34 | ``` |
| #35 | |
| #36 | ## Model-Specific Parameters |
| #37 | |
| #38 | Different models support different parameter values. The script automatically selects appropriate defaults based on the model. |
| #39 | |
| #40 | ### Size |
| #41 | |
| #42 | - **GPT image models** (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`): `1024x1024`, `1536x1024` (landscape), `1024x1536` (portrait), or `auto` |
| #43 | - Default: `1024x1024` |
| #44 | - **dall-e-3**: `1024x1024`, `1792x1024`, or `1024x1792` |
| #45 | - Default: `1024x1024` |
| #46 | - **dall-e-2**: `256x256`, `512x512`, or `1024x1024` |
| #47 | - Default: `1024x1024` |
| #48 | |
| #49 | ### Quality |
| #50 | |
| #51 | - **GPT image models**: `auto`, `high`, `medium`, or `low` |
| #52 | - Default: `high` |
| #53 | - **dall-e-3**: `hd` or `standard` |
| #54 | - Default: `standard` |
| #55 | - **dall-e-2**: `standard` only |
| #56 | - Default: `standard` |
| #57 | |
| #58 | ### Other Notable Differences |
| #59 | |
| #60 | - **dall-e-3** only supports generating 1 image at a time (`n=1`). The script automatically limits count to 1 when using this model. |
| #61 | - **GPT image models** support additional parameters: |
| #62 | - `--background`: `transparent`, `opaque`, or `auto` (default) |
| #63 | - `--output-format`: `png` (default), `jpeg`, or `webp` |
| #64 | - Note: `stream` and `moderation` are available via API but not yet implemented in this script |
| #65 | - **dall-e-3** has a `--style` parameter: `vivid` (hyper-real, dramatic) or `natural` (more natural looking) |
| #66 | |
| #67 | ## Output |
| #68 | |
| #69 | - `*.png`, `*.jpeg`, or `*.webp` images (output format depends on model + `--output-format`) |
| #70 | - `prompts.json` (prompt → file mapping) |
| #71 | - `index.html` (thumbnail gallery) |
| #72 |