Bulk Generate AI Images for Print on Demand: How Can You Do It?

Bulk generate AI images for print on demand with a Python script using GPT-4o and DALL-E 3. Step-by-step setup, costs, and filename tips to scale fast for POD.

Spread the love
Bikers rights gif via giphy
"bikers rights" portlandia gif via giphy

TL;DR

By connecting a small Python script to OpenAI’s API, you can generate designs in batches instead of doing prompts and downloads manually.

GPT-4o writes the creative image prompt first, then that prompt gets sent to DALL-E 3 to generate and save the image automatically.

At roughly 12–17 cents per image (depending on testing and quality), the economics beat manual design creation by a mile.

Saving each image with a descriptive filename (including the prompt) makes it easy to recreate winners and iterate quickly.

I was about to sit down and crank out AI designs for a print on demand store, one by one by one, like some kind of digital assembly line worker. 💡 Then it hit me, why am I doing this manually when I could just write a script and let it run? So I did. And honestly, it’s too good not to share. 🤙

I fired up a little Python, connected ChatGPT to DALL-E 3, and walked away while it pumped out 85 unique designs into a folder on my desktop. Total cost? About $14.
The whole thing is only 187 lines of code, and I’m going to walk you through exactly how it works so you can do the same thing, even if you’ve never touched a line of code in your life.

https://www.youtube.com/watch?v=

Learn how to automate your image creation with AI!

The Problem With Making AI Art One by One

If you’re running a print on demand store, you already know the bottleneck isn’t finding a niche or setting up your Shopify. It’s the designs. You need volume. You need variety.
And if you’re using AI tools like ChatGPT or Midjourney to create them, you’re probably sitting there typing prompts, waiting, downloading, renaming, typing another prompt, waiting again…

Eye-catching design of ai graphics tools
Learn how to automate your image creation with ai!

It doesn’t scale. It just doesn’t.

I was staring down that exact problem. I’m thinking of starting a POD store focused on skateboarding merchandise, t-shirts, mugs, hats, that kind of thing, and I needed dozens, maybe hundreds of designs.
The thought of generating them manually made me want to close my laptop and go outside.

So instead of doing the boring thing, I built a shortcut.

The Script: What It Actually Does

The core idea here is simpler than you’d think. The script does two things in a loop:

Step 1: It sends a message to GPT-4o (OpenAI’s text model) and basically says, “You’re a creative assistant specializing in generating unique prompts for image design, primarily focused on skateboarding merchandise like t-shirts, mugs, and hats.”
Then it asks GPT to write a detailed, creative image prompt, stuff like “a vintage-inspired t-shirt design with a 70s roller-rink style, limited to three colors: orange, blue, and black, with no background.”

Step 2: That prompt gets automatically sent to DALL-E 3, which generates the image and saves it to a folder.

That’s it. That’s the whole loop. I tell it that it’s a graphic designer and then I tell it to create a prompt and then that prompt is sent over to the image generator DALL-E 3.

The script runs through this cycle as many times as you tell it to. 10 images, 50 images, 200 images. You set it and walk away.

Info icon.

Worth knowing

The two-step prompting method (a language model writes the image prompt before sending it to the image model) tends to produce more creative and detailed results than writing DALL-E prompts yourself. It’s like having a creative director between you and the artist.

The Smart File Naming Trick

This is one of those small details that saves you massive headaches later. The script doesn’t just dump images into a folder with generic names like image_001.png.
Instead, it outputs the images into your downloads folder, inside of a folder called Images, and then it appends the name you gave it, the number, and then the prompt as the title, so you can always know what prompt created what in case you want to recreate it.

So a file might be named something like: skateboard_68_vintage-inspired-tshirt-design-70s-roller-rink-style.png

Why does this matter? Because when you’re scrolling through 85 designs trying to pick your winners for your store, you need to know what prompt made what.
And if you find a design style that sells well, you can feed that same prompt back in and generate variations. Without this naming convention, you’re just guessing.

What You Need to Set This Up

Alright, let’s talk about actually doing this. You need a few things, and none of them are complicated.

Requirements

  • Python 3.x installed on your computer (free download from python.org)
  • An OpenAI API key (sign up at platform.openai.com and add credits)
  • A few Python libraries: openai, requests, and optionally dotenv for keeping your API key secure
  • A text editor or IDE — I used PyCharm, but VS Code works fine too
  • About 10–15 minutes to get everything set up

Now here’s the thing. Because of AI, you really don’t need to know how to code anything anymore. And I mostly agree with that, but I want to be honest with you.
You do need the basics: install Python, run a script from the command line, and paste in your API key. That’s not really “coding” though, that’s more like following instructions. If you can set up a Shopify store, you can handle this.

Warning callout icon.

Heads up

The claim that you don’t need to know any code is mostly true, but you still need a working Python environment on your machine. If you’ve never installed Python before, budget an extra 20–30 minutes to follow a setup tutorial. It’s a one-time thing.

You can literally ask ChatGPT to write the entire script for you. Tell it what you want: “write me a Python script that uses GPT-4o to generate creative image prompts for skateboarding merchandise, sends those prompts to the DALL-E 3 API, and saves the resulting images to a folder with descriptive filenames.”
It’ll give you something pretty close to working code. You might need to tweak a few things, but the heavy lifting is done.

The Real Cost Breakdown

This is the part everyone wants to know about, so let me just lay it out.

ExpenseCostNotes
DALL-E 3 image generation$8.58~85 images at standard quality
GPT-4o text prompts~$2.00API calls for generating design prompts
Other API overhead$0.02Minimal additional usage
Total~$10.60For 85 unique designs
Actual OpenAI API costs from generating 85 skateboarding merchandise designs. The speaker estimated roughly $14, which likely includes earlier test runs or rounding.

I generated about 85 images and that cost me probably 12 bucks, $14. That breaks down to roughly 12–17 cents per image. Compare that to hiring a designer at $25–50 per design, or even spending 5–10 minutes per image doing it manually. The math is absurd.

Warning callout icon.

One thing to note

Your costs will vary depending on image quality settings. DALL-E 3 offers standard and HD quality, and you can generate at different resolutions (1024×1024, 1024×1792, and 1792×1024). At the time of writing, standard 1024×1024 costs $0.040 per image, standard larger sizes cost $0.080, HD 1024×1024 costs $0.080, and HD larger sizes cost $0.120 per image.
OpenAI updates pricing periodically, so always check their pricing page before you load up your account.

And the API credits are pre-paid, so there’s no surprise bill at the end of the month. You add $20 or $50 to your account and you can literally watch the balance tick down in the OpenAI dashboard as the script runs.
I had the cost dashboard open the whole time I was generating, which is a good habit to get into.

What To Do With 85 AI Designs

So now you’ve got a folder full of images. What next?

You’re not going to use all of them. That’s the point. You’re generating volume so you can cherry-pick the best ones. I went through all 85 and pulled out maybe 15–20 that I actually liked enough to put on merchandise.
Some of them had text issues because AI still struggles with lettering sometimes, but those can often be fixed in Photoshop.

I’m going to go ahead and choose from these and pick out the best ones and then kind of edit them a little bit. If there are any typos I can try to fix that in Photoshop.

The beauty of this approach is that you’re not precious about any single design. If a design is 80% there but has a weird misspelling, you can either fix it or just skip it because you’ve got 84 others to choose from.
That abundance mindset changes how you approach the whole print on demand game.

The goal isn’t to generate 85 perfect designs. The goal is to generate 85 designs so you can find the 15 great ones you’d never have thought of on your own.

Why This Beats Other Approaches

You might be wondering why you wouldn’t just use Midjourney or the ChatGPT interface directly. Those tools are great for one-off designs. But they’re interactive. You type, you wait, you review, you type again. There’s no “set it and forget it.”

With the API approach, the entire process is hands-off. You run the script, go make coffee, come back to a full folder. And because you’re using GPT-4o as your creative director, each prompt is unique. You’re not just running the same prompt 85 times with a different seed.

The other big win is repeatability. Because every filename contains the exact prompt that generated it, you’ve essentially built a database of what works.
Find a design that sells on your store? Pull the prompt from the filename, modify it slightly, run 20 variations. That’s how you turn print on demand from a hobby into a system.

Do you ever feel overwhelmed by designing every product individually; or wonder if there's a faster way? 🤔
Do you ever feel overwhelmed by designing every product individually; or wonder if there’s a faster way? 🤔

Frequently Asked Questions

Not directly with this script, since Midjourney doesn’t offer an official public API in the same way OpenAI does. You’d need workarounds like Discord bots or third-party automation tools, which add complexity. DALL-E 3’s API is purpose-built for automation, which is why it’s the more straightforward choice here.

Nope. The ChatGPT Plus subscription ($20/month) and the OpenAI API are separate billing systems. You can use the API without a Plus subscription by loading prepaid credits and paying per usage.

DALL-E 3 supports 1024×1024, 1024×1792, and 1792×1024. For t-shirt designs, the vertical 1024×1792 option works well. For mugs or hats, square 1024×1024 is usually your best bet.
These may need upscaling for print (many POD platforms recommend 300 DPI), so you may want to run images through an AI upscaler before uploading.

The designs you create through the DALL-E API are yours to use commercially, per OpenAI’s current usage policies. Each POD platform has its own content policies, and some are stricter about AI-generated content.
Merch by Amazon, for example, has been known to reject or remove listings that appear to be mass-produced or low-quality, so check each platform’s terms before uploading.

DALL-E 3 doesn’t natively output transparent PNGs. The usual trick is to prompt for designs “with no background” or “on a solid white background,” then use a background removal tool like remove.bg or Photoshop to strip out the white.
You can even add a background-removal step into your Python script if you want full automation.

Final Thoughts

I was going to do them through using AI one by one by one, but I thought, well, why don’t I just write a script and it’ll completely create the images for me and save them.
That one thought turned a tedious afternoon into a $14 experiment that produced 85 unique designs. And the script itself? 187 lines. That’s it.

If you’re doing print on demand and you’re still generating designs manually, this is the move. Get Python installed, grab an OpenAI API key, have ChatGPT write you a bulk generation script, and start building your design library at scale.
The hardest part is the initial setup, and after that you’re just pressing run and picking your favorites. The tools are all there, they’re cheap, and honestly the whole process is pretty cool.

Leave a Comment

Frequently asked questions (FAQ)

LiaisonLabs is your local partner for SEO & digital marketing services in Mount Vernon, Washington. Here are some answers to the most frequently asked questions about our SEO services.

SEO (Search Engine Optimization) is the process of improving your website's visibility in search engines like Google. When potential customers in Mount Vernon or Skagit County search for your products or services, SEO helps your business appear at the top of search results. This drives more qualified traffic to your website—people who are actively looking for what you offer. For local businesses, effective SEO means more phone calls, more foot traffic, and more revenue without paying for every click like traditional advertising.

A local SEO partner understands the unique market dynamics of Skagit Valley and the Pacific Northwest. We know the seasonal patterns that affect local businesses, from tulip festival tourism to agricultural cycles. Local expertise means we understand which keywords your neighbors are searching, which directories matter for your industry, and how to position your business against local competitors. Plus, we're available for in-person meetings and truly invested in the success of our Mount Vernon business community.

SEO is a long-term investment, and most businesses begin seeing meaningful results within 3 to 6 months. Some quick wins—like optimizing your Google Business Profile or fixing technical issues—can show improvements within weeks. However, building sustainable rankings that drive consistent traffic takes time. The good news? Unlike paid advertising that stops the moment you stop paying, SEO results compound over time. The work we do today continues delivering value for months and years to come.

SEO pricing varies based on your goals, competition, and current website health. Local SEO packages for small businesses typically range from $500 to $2,500 per month, while more comprehensive campaigns for competitive industries may require a larger investment. We offer customized proposals based on a thorough audit of your website and competitive landscape. During your free consultation, we'll discuss your budget and create a strategy that delivers measurable ROI—because effective SEO should pay for itself through increased revenue.

Both aim to improve search visibility, but the focus differs significantly. Local SEO targets customers in a specific geographic area—like Mount Vernon, Burlington, Anacortes, or greater Skagit County. It emphasizes Google Business Profile optimization, local citations, reviews, and location-based keywords. Traditional SEO focuses on broader, often national rankings and prioritizes content marketing, backlink building, and technical optimization. Most Mount Vernon businesses benefit from a local-first strategy, though many of our clients combine both approaches to capture customers at every stage of their search journey.

Absolutely! SEO and paid advertising work best as complementary strategies. Google Ads deliver immediate visibility and are great for testing keywords and driving quick traffic. SEO builds sustainable, long-term visibility that doesn't require ongoing ad spend. Together, they create a powerful combination—ads capture immediate demand while SEO builds your organic presence over time. Many of our Mount Vernon clients find that strong SEO actually improves their ad performance by increasing Quality Scores and reducing cost-per-click, ultimately lowering their total marketing costs while increasing results.