🧠 What This Workflow Does
This n8n workflow allows you to upload a T-shirt mockup design (even if it's rough or outdated), and automatically turns it into a refined, print-ready artwork using the power of AI.
It starts with an image of a T-shirt design, analyzes it using OpenAI's vision model, and then generates a cleaner, upgraded prompt to be used with OpenAI’s image generation API (gpt-image-1). The final output is a new T-shirt graphic optimized for printing on solid black background, with no visible shirt or mockup framing.
⚙️ How It Works
User Sends a T-shirt Mockup Image Link
The workflow begins when the user drops an image link (T-shirt mockup) into a chat interface or input trigger.
AI Analyzes the Image (OpenAI Vision)
Using OpenAI’s GPT-4 vision capabilities, the workflow extracts the key design elements from the image:
Text Escaping for API Compatibility
A JavaScript function node escapes the prompt (quotes, slashes, line breaks) to make it safe for use in downstream JSON requests.
Image Generation via GPT-Image-1 API
The final prompt is sent to OpenAI’s gpt-image-1 to generate a brand-new artwork — ideal for direct printing on a black T-shirt.
⚠️ Cost Notice for gpt-image-1 Usage
This workflow uses OpenAI's gpt-image-1 model to generate high-quality T-shirt artwork from refined prompts. Please note that this model is a paid service, and each image generation request may cost approximately $0.25 per design, depending on resolution and usage.
We strongly recommend users to review their OpenAI API usage plan and be mindful of costs when running this workflow, especially if generating in bulk or integrating into larger automation flows.
You can monitor your usage at: https://platform.openai.com/docs/models/gpt-image-1
🚀 How to Use