Cover Image Generation Workflow
This interactive flowchart shows the decision tree for generating book cover images using the generate-cover.sh script. The workflow adapts based on your available resources: OpenAI API billing, ChatGPT Pro subscription, and operating system.
Overview
The cover image generation script supports three modes of operation:
- Full Auto Mode - Requires OpenAI API with active billing
- Local Prompt + Browser Mode - Requires ChatGPT Pro and macOS
- Local Prompt + Manual Mode - Requires ChatGPT Pro (any OS)
Decision Points
HAS_OPENAI_API_KEY
Checks if the OPENAI_API_KEY environment variable is set. This is required for any API-based operations.
1 | |
API Billing Active
Even with a valid API key, your OpenAI account must have active billing enabled. The script tests this by making a simple API call.
- If billing is active: Use full auto mode for seamless image generation
- If billing is not active: Fall back to ChatGPT Pro workflow
HAS_CHATGPT_PRO
ChatGPT Pro/Plus subscription ($20/month) allows you to generate images through the ChatGPT interface. This is separate from API billing.
ON_MACOS
The --open-browser flag uses AppleScript to automate browser interaction, which only works on macOS.
Usage Commands
Full Auto Mode (API billing required)
1 | |
Local Prompt with Browser Automation (macOS + ChatGPT Pro)
1 | |
Local Prompt Only (ChatGPT Pro, any OS)
1 | |
Output
All modes produce a cover image saved to:
1 | |
Specifications: - Size: 1200x630 pixels - Aspect Ratio: 1.91:1 (Open Graph standard) - Format: PNG