Automate your entire print-on-demand workflow, from AI-driven image creation to uploads on leading platforms like Spreadshirt & Redbubble.
This software is provided “as is” without any warranty of reliability, functionality, or fitness for a specific purpose. Any use, especially in production environments, is at your own risk. Automated interactions may violate the terms of service of OpenAI, Spreadshirt, Redbubble, remove.bg, or bigjpg.com—always check them beforehand. This project is an unofficial tool, not affiliated with or endorsed by these platforms. The authors assume no liability for policy breaches, account suspensions, financial losses, legal consequences, or other damages. As interfaces and policies can change frequently, regular updates or patches may be required.
GenAI-PoD is a versatile command-line tool that streamlines image generation and webshop integration. By leveraging ChatGPT (via Selenium automation), it can programmatically create images, apply background removal, perform upscaling, and finally publish these designs on popular print-on-demand (POD) platforms such as Spreadshirt and Redbubble.
Key highlights of GenAI-PoD include:
-
Direct ChatGPT Integration Generate AI-driven designs or concept art using your OpenAI account via automated browser interactions.
-
One-Stop Workflow Automatically remove backgrounds (remove.bg) and upscale images (bigjpg.com) without leaving the command-line.
-
Seamless Uploads Eliminate manual steps: GenAI-PoD can log you in, navigate to forms, fill out metadata (titles, tags, descriptions), and publish your new designs directly to your connected Spreadshirt/Redbubble storefronts.
-
Automated Account Verification Manage user sessions and cookies to remain logged in across different services, reducing repetitive sign-ins.
-
Stable & Extensible Built with maintainability in mind, the codebase follows robust design patterns that simplify adding new providers, image processing steps, or customization.
-
Background Removal Automates background removal via Selenium on remove.bg.
-
Image Upscaling Upscales images via Selenium on bigjpg.com.
-
Automatic Upload Integrates with major POD sites:
-
AI Image Generation Generates images using the official ChatGPT website in a browser automation workflow.
-
Account Verification Streamlines verifying accounts and managing sessions so you can stay logged in for repeated tasks.
-
CLI-Centric Provides a powerful command-line interface for both experienced and casual CLI users.
python3 -m venv venv
source venv/bin/activate # Windows: .\venv\Scripts\activate
pip3 install genai-pod
# ... now you can use genai!
genai ...
- Python: Version 3.11 or later.
- ChatGPT Premium account
- Chrome Browser: Required for web automation tasks.
- Chrome WebDriver: Compatible with your installed Chrome version (used by Selenium).
- Verifying accounts: see under Commands/verifysites SITE
Run the tool using:
genai [OPTIONS] COMMAND
To display help information:
genai --help
-h
,--help
: Show help information and exit.--version
: Show the version and exit.
Verify account in Chrome for specific websites (e.g., OpenAI, Spreadshirt). Usage:
genai verifysite SITE
Options for SITE
:
capsolver
: profile to add CAPTCHA Solver extension to chrome browserChatGPT
: profile to log in to chat.openai.comSpreadshirt
: profile to log in to spreadshirt or Redbubble
after you have logged in in your account, you can type DONE in the console and the settings will be saved
Generate and save AI-generated images to disk. Usage:
genai generate [OPTIONS] SUBCOMMAND [ARGS]...
Options for generate
:
-o
,--output-directory TEXT
: The directory to save the images and metadata to (required).
Subcommands:
generategpt
: Generate images using GPT through selenium.
Upload images to web shops. Usage:
genai upload [OPTIONS] SUBCOMMAND [ARGS]...
Options for upload
:
--upload-path TEXT
: The directory containing sub-directories with images to upload (required). Subcommands:spreadshirt
: Upload images to Spreadshirt.redbubble
: Upload images to Redbubble.
- Verify Account
Start by verifying your Spreadshirt account using the command:
genai verifysite Spreadshirt
This will open a Chrome window for you to log in. Once done, type DONE
in the
console to save the session.
- Using Product Templates
- Create a product template directly on Spreadshirt if needed. The tool will automatically use the most recently created template for uploads.
- The template must contain at least 50 products
- Organizing Uploaded Files
- Successfully uploaded designs are moved to the
used_spreadshirt
folder. - Any designs with upload errors are moved to the
error_spreadshirt
folder for review.
- Verify Account
- Start by verifying your Redbubble account with the following command:
genai verifysite Spreadshirt
- Alternatively, for first-time use, initiate the upload command, which will prompt for a login:
genai upload --upload-path "./images" redbubble
Once logged in, your session credentials are saved for future uploads.
- Redbubble Account Settings
- Your Redbubble account must be set to
English
as the display language and use$ United States Dollar (USD)
as the currency. These can be adjusted in your Redbubble account settings at the bottom of the webpage.
- Setting up the scaling settings
- In the schling_adjustments.json the desired products can be switched on and off
- Organizing Uploaded Files
- Successfully uploaded designs are moved to the
used_redbubble
folder. - Any designs with upload errors are moved to the
error_redbubble
folder for review.
- Verify Account
- To use ChatGPT for generating images via web automation, first verify your account:
genai verifysite ChatGPT
- This will store your login session, enabling seamless automation with ChatGPT.
-
Generate images using GPT via web automation:
genai generate --output-directory ./images generategpt
-
Upload images from a directory to Spreadshirt:
genai upload --upload-path ./images spreadshirt
- Verify OpenAI account in Chrome:
genai verifysites capsolver
The generategpt
command typically takes around 11 minutes to complete. This
duration includes the time required for AI-driven image creation, background
removal, and upscaling processes.
Uploading images to Spreadshirt using the upload spreadshirt
command generally
takes about 1 minute per batch of images. This includes logging in, navigating
to the upload form, filling out metadata, and publishing the designs.
This project is licensed under the GPL-3.0-or-later.
- Selenium for web automation.
- Cloup for the command-line interface.
- Tor Project for anonymous connections.
- undetected-chromedriver for web automation.
- remove.bg for background removal services.
- bigjpg for image upscaling services.
This project is intended solely as an example of how web automation, automated image generation, and uploading processes can be implemented using tools like Selenium and various AI models. It is provided for educational and informational purposes to demonstrate the capabilities of these technologies.
Users must ensure that their use of this tool complies with the terms of service, policies, and guidelines of the websites and services it interacts with, including but not limited to Spreadshirt, Redbubble, OpenAI, and any other platforms involved. Automated interactions with these services may be restricted or prohibited, and users are solely responsible for adhering to all applicable rules and regulations.
The authors and contributors of this project do not endorse or support any activities that violate the terms of service of third-party websites or services. By using this tool, you agree that you are solely responsible for any actions taken and that the authors cannot be held liable for any misuse, damages, or legal consequences arising from its use.
Automated tools can place significant load on web services and may disrupt normal operations. Users should exercise caution and respect when using automation tools to interact with websites, ensuring that their actions do not negatively impact the functionality or availability of these platforms for others.
We encourage all users to consider the ethical implications of automating interactions with web services. Misuse of automation tools can lead to unintended consequences, including the spread of misinformation, unauthorized access to services, and potential harm to individuals or organizations.
The login function in from generate_gpt.py
is based on code from the
open-source project
ChatGPT-unofficial-api-selenium,
licensed under the MIT License. Special thanks to the project authors for making
their code available. Date of inclusion: May 15, 2024