Skip to main content
Built by Best ROI Media · First-Party IntegrationMITWave 4 · LiveBestRoiMedia/bestroi-game-tools

ImageGen

OpenAI image generation and moodboard CLI with pre-call spend ledgers and hard budget caps.

Drop-in CLI for OpenAI image generation and reference-based edits (/v1/images/generations and /v1/images/edits) plus JSON-driven moodboard matrices, enforcing pre-dispatch JSONL ledgers and strict call budgets.

View on GitHub ↗
Quick clonegit clone https://github.com/BestRoiMedia/bestroi-game-tools.git
GitHub repositoryBestRoiMedia/bestroi-game-tools
Module path_tools/imagegen/
LicenseMIT
Release waveWave 4
LanguagesPython

Why we built it

Unbounded image-generation loops during agentic exploration can quickly burn API budgets. ImageGen logs every call before sending and halts automatically once a budget cap is reached.

Architecture & how it works

Defaults to medium quality and single-image calls, appends a pending record to a local JSONL call ledger before issuing the HTTP request, enforces --budget / $GEN_IMAGE_BUDGET caps, and supports dry-run payload inspection and mocked-HTTP selftests.

Key capabilities

  • Text-to-image generation and multi-reference image edits (--ref, --mask, --transparent)
  • Pre-dispatch JSONL spend ledger and hard --budget call limits
  • Usage reporting command (usage) summarizing paid calls
  • Declarative style-by-shot moodboard matrix runner (moodboards.py) skipping existing outputs
  • Offline dry-run and mocked-HTTP selftest modes

Usage example

Generate concept art with a budget cap or run a moodboard dry-runPython
python3 imagegen/gen_image.py ./key_art.png "stylized forest shrine, crisp silhouettes" --size 1536x1024 --budget 6
python3 imagegen/gen_image.py usage
python3 imagegen/moodboards.py run ./moodboard_spec.json --max-calls 4
Reads OPENAI_API_KEY from environment; never logs or prints secrets.