{"id":28510856,"url":"https://github.com/davutbayik/ai-product-image-generator","last_synced_at":"2026-05-09T19:36:24.681Z","repository":{"id":296932855,"uuid":"994846457","full_name":"davutbayik/ai-product-image-generator","owner":"davutbayik","description":"Automatically generate commercial-quality product mockup images using OpenAI and Google Workspace integrations (Sheets + Drive).","archived":false,"fork":false,"pushed_at":"2025-06-02T22:48:44.000Z","size":32356,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-03T11:42:43.247Z","etag":null,"topics":["agents","ai","google-cloud-platform","google-drive-api","google-sheets-api","gpt-4","gpt-image-1","image-generation-ai","image-generator-using-openai-api","openai","product-generator","python","text-to-image"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davutbayik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-02T15:12:16.000Z","updated_at":"2025-06-02T22:48:48.000Z","dependencies_parsed_at":"2025-06-03T12:42:30.565Z","dependency_job_id":"ac58c955-114a-44da-a331-3189129b2609","html_url":"https://github.com/davutbayik/ai-product-image-generator","commit_stats":null,"previous_names":["davutbayik/ai-product-image-generator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davutbayik/ai-product-image-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davutbayik%2Fai-product-image-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davutbayik%2Fai-product-image-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davutbayik%2Fai-product-image-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davutbayik%2Fai-product-image-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davutbayik","download_url":"https://codeload.github.com/davutbayik/ai-product-image-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davutbayik%2Fai-product-image-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32833373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agents","ai","google-cloud-platform","google-drive-api","google-sheets-api","gpt-4","gpt-image-1","image-generation-ai","image-generator-using-openai-api","openai","product-generator","python","text-to-image"],"created_at":"2025-06-08T23:06:20.980Z","updated_at":"2026-05-09T19:36:24.673Z","avatar_url":"https://github.com/davutbayik.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛍️ AI-Powered Product Mockup Generator\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n![Python](https://img.shields.io/badge/python-3.11+-blue)\n![OpenAI](https://img.shields.io/badge/OpenAI-GPT--4.0-green)\n\nAutomatically generate commercial-quality product mockup images using OpenAI and Google Workspace integrations (Sheets + Drive).\n\n---\n\n## ✨ Features\n\n* 🔎 Reads product data from a Google Sheet\n* 🧠 Uses GPT-4 to generate visual mockup prompts\n* 🎨 Generates product images using OpenAI image API\n* 💾 Saves generated mockups to a local folder\n* ☁️ Uploads images to a specific Google Drive folder\n* ✅ Updates the status of each processed product in the original Google Sheet\n* 📜 Logs all processing steps and errors\n\n## 📁 Folder Structure\n\n```\nproject/\n├── output/                      # Saved mockup images\n├── .env                         # Environment file with OpenAI API key\n├── YOUR-GOOGLE-CLOUD-SERVICE-AUTH-JSON\n├── process_logs.log             # Log file\n├── main.py                      # Main script (provided above)\n```\n\n## 🎥 Example Demo\n\n\nhttps://github.com/user-attachments/assets/54a42888-9920-4340-a46d-ebe20cf9f960\n\n\n## 🛠️ Installation\n\n1. Clone the repository:\n   \n   ```bash\n   git clone https://github.com/davutbayik/ai-product-image-generator.git\n   cd ai-product-image-generator\n\n2. Create and activate a virtual environment (Optional-Recommended):\n   \n   ```bash\n   python -m venv .venv\n   source .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n\n3. Install the required packages:\n   \n   ```bash\n   pip install -r requirements.txt\n\n4. Set Up `.env`:\n   \n   Create a `.env` file with your OpenAI API key:\n   \n   ```ini\n   OPENAI_API_KEY=sk-xxxxxxx\n   ```\n\n5. Set Up Google Cloud Credentials:\n     \n     * Go to [Google Cloud Console](https://console.cloud.google.com/)\n     * Enable **Google Sheets API** and **Google Drive API**\n     * Create a service account and download the JSON key\n     * Share your **Google Sheet** and **Google Drive Folder** with the service account email\n\n6. Add Folder and Sheet IDs:\n \n     Update this part in your code:\n     \n     ```python\n     DRIVE_FOLDER_ID = \"your-google-drive-folder-id\"\n     GOOGLE_SHEETS_ID = \"your-google-sheets-id\"\n     ```\n\n7. Run the Script:\n\n     ```bash\n     python main.py\n     ```\n\n## 🧪 Example Sheet Structure\n\n| ID   | Description                                | Category      | Color       | Material            | Additional Notes           | Status  |\n| ---- | ------------------------------------------ | ------------- | ----------- | ------------------- | -------------------------- | ------- |\n| 1001 | Silicone baby feeding set with bowl, spoon | Baby Products | Pastel Blue | Food-grade silicone | Suction base, toddler safe | Pending |\n\n\u003e The script will only process rows with `Status = Pending`\n\n## 🛠️ Prompt Logic (GPT System Prompt)\n\n* Understands fields like `Description`, `Category`, `Color`, `Material`, and `Additional Notes`\n* Generates clean, realistic mockup prompts for DALL·E / OpenAI Image API or other image generation APIs\n\n## 🔐 Security\n\n* Do not upload your `.env` or service account JSON to any public repository\n\n## 💡 Future Improvements\n\n* Add UI with Streamlit for manual input or preview\n* Enable batch download of all generated images\n* Add error reporting via email or Slack\n\n## 📄 License\n\nThis project is licensed under the terms of the [MIT License](LICENSE).  \nYou are free to use, modify, and distribute this software as long as you include the original license.\n\n## 📬 Contact\n\nMade with ❤️ by [Davut Bayık](https://github.com/davutbayik) — feel free to reach out via GitHub for questions, feedback, or collaboration ideas.\n\n---\n\n⭐ If you found this project helpful, consider giving it a star!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavutbayik%2Fai-product-image-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavutbayik%2Fai-product-image-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavutbayik%2Fai-product-image-generator/lists"}