{"id":37514819,"url":"https://github.com/tsjdev-apps/ai-image-generation-console","last_synced_at":"2026-01-16T08:06:29.128Z","repository":{"id":329083325,"uuid":"1116361132","full_name":"tsjdev-apps/ai-image-generation-console","owner":"tsjdev-apps","description":"Interactive console app for AI image generation with Azure OpenAI \u0026 OpenAI. Supports DALL-E 3, gpt-image-1, and gpt-image-1-mini. Built with .NET 10 \u0026 Spectre.Console.","archived":false,"fork":false,"pushed_at":"2025-12-17T17:24:09.000Z","size":6692,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-20T20:49:06.982Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/tsjdev-apps.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"tsjdev-apps"}},"created_at":"2025-12-14T17:55:07.000Z","updated_at":"2025-12-17T17:24:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tsjdev-apps/ai-image-generation-console","commit_stats":null,"previous_names":["tsjdev-apps/ai-image-generation-console"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/tsjdev-apps/ai-image-generation-console","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjdev-apps%2Fai-image-generation-console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjdev-apps%2Fai-image-generation-console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjdev-apps%2Fai-image-generation-console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjdev-apps%2Fai-image-generation-console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsjdev-apps","download_url":"https://codeload.github.com/tsjdev-apps/ai-image-generation-console/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjdev-apps%2Fai-image-generation-console/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-16T08:06:28.049Z","updated_at":"2026-01-16T08:06:28.869Z","avatar_url":"https://github.com/tsjdev-apps.png","language":"C#","funding_links":["https://github.com/sponsors/tsjdev-apps"],"categories":[],"sub_categories":[],"readme":"# AI Image Generation Console\n\nA powerful and user-friendly console application for generating images using AI models from **Azure OpenAI** and **OpenAI**. Built with .NET 10 and featuring an elegant terminal UI powered by Spectre.Console.\n\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n![.NET](https://img.shields.io/badge/.NET-10.0-purple.svg)\n![C#](https://img.shields.io/badge/C%23-14.0-brightgreen.svg)\n\n## ✨ Features\n\n- 🌐 **Multi-Provider Support**: Seamlessly switch between Azure OpenAI and OpenAI\n- 🧠 **Multiple Model Support**: Generate images using DALL-E 3, GPT-Image-1, GPT-Image-1-Mini, and GPT-Image-1.5\n- ⚙️ **Customizable Settings**: Configure image size, quality, and style per model\n- 💾 **Automatic Saving**: Images are automatically saved to temporary files with timestamps\n- ⏱️ **Performance Tracking**: Real-time generation time tracking for each model\n- 🎨 **Beautiful UI**: Rich console interface with colors, animations, and clickable file links\n- 🔒 **Secure Input**: Masked API key input for security\n- 🛡️ **Robust Error Handling**: Graceful handling of API errors with detailed feedback\n- 📊 **Generation Summary**: Track success and failure counts across multiple models\n\n## 🖼️ Screenshots\n\n### Main Menu\n\n![console-01](docs/01-console.png)\n\n### Azure OpenAI Configuration\n\n![console-02](docs/02-console.png)\n\n### Model Selection (OpenAI)\n\n![console-03](docs/03-console.png)\n\n### Image Generation Progress\n\n![console-04](docs/04-console.png)\n\n### Generation Results\n\n![console-05-1](docs/05-console-1.png)\n\n**DALL-E 3**\n\n![console-05-2](docs/05-console-2.png)\n\n**GPT-Image-1.5**\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) or higher\n- An API key from either:\n  - [Azure OpenAI Service](https://azure.microsoft.com/en-us/products/ai-foundry/models/openai/)\n  - [OpenAI Platform](https://platform.openai.com/)\n\n### Installation\n\n1. **Clone the repository**\n\n   ```bash\n   git clone https://github.com/tsjdev-apps/ai-image-generation-console.git\n   cd ImageGenerationConsole\n   ```\n\n1. **Build the project**\n\n   ```bash\n   dotnet build\n   ```\n\n1. **Run the application**\n\n   ```bash\n   dotnet run\n   ```\n\n## 🧭 Usage\n\n### Azure OpenAI\n\n1. Select **Azure OpenAI** as your provider\n2. Enter your Azure OpenAI endpoint (e.g., `https://your-resource.openai.azure.com/`)\n3. Enter your Azure OpenAI API key (input will be masked)\n4. Specify your deployments in the format: `deploymentName:modelType`\n   - Example: `myDallE:dall-e-3,myGptImage:gpt-image-1`\n   - Supported model types:\n     - `dall-e-3`\n     - `gpt-image-1`\n     - `gpt-image-1-mini`\n     - `gpt-image-1.5`\n5. Enter your image generation prompt\n6. Wait for the images to be generated and saved\n\n### OpenAI\n\n1. Select **OpenAI** as your provider\n2. Enter your OpenAI API key (input will be masked)\n3. Select one or more models using the multi-select menu:\n   - Use `Space` to toggle selection\n   - Use `Enter` to confirm\n4. Enter your image generation prompt\n5. Wait for the images to be generated and saved\n\n### Output\n\nGenerated images are saved to your system's temporary directory with the following naming convention:\n\n```plaintext\n{modelName}_{timestamp}.png\n```\n\nExample: `dall-e-3_20240115_143052.png`\n\nThe console will display clickable file paths for easy access to the generated images.\n\n## 🧩 Model Configuration\n\n### DALL-E 3\n\n- **Size**: 1792x1024\n- **Quality**: Standard\n- **Style**: Vivid\n- **Format**: URL\n\n### GPT-Image-1\n\n- **Size**: 1536x1024\n- **Quality**: High (Azure) / Default (OpenAI)\n- **Format**: Bytes (Azure) / Default (OpenAI)\n\n### GPT-Image-1-Mini\n\n- **Size**: 1536x1024\n- **Quality**: Medium\n- **Format**: Bytes (Azure) / Default (OpenAI)\n\n### GPT-Image-1.5\n\n- **Size**: 1536x1024\n- **Quality**: Default\n- **Format**: Bytes (Azure) / Default (OpenAI)\n\n## 🏗️ Architecture\n\nThe application is structured into three main components:\n\n```plaintext\nImageGenerationConsole/\n📄 Program.cs              # Main application logic and orchestration\n📂 Helpers/\n   📄 ConsoleHelper.cs    # UI utilities using Spectre.Console\n📂 Utils/\n   📄 Statics.cs          # Centralized string constants and messages\n```\n\n### Key Design Principles\n\n- 🎯 **Separation of Concerns**: UI, business logic, and constants are well separated\n- 🛡️ **Error Resilience**: Comprehensive error handling at every level\n- 😊 **User Experience**: Clear prompts, validation, and feedback\n- 🧰 **Maintainability**: Centralized strings for easy localization\n- 🚀 **Extensibility**: Easy to add new models or providers\n\n## 🧰 Dependencies\n\n- **[Azure.AI.OpenAI](https://www.nuget.org/packages/Azure.AI.OpenAI)**: Azure OpenAI SDK\n- **[OpenAI](https://www.nuget.org/packages/OpenAI)**: OpenAI SDK\n- **[Spectre.Console](https://www.nuget.org/packages/Spectre.Console)**: Rich console UI framework\n\n## 🩹 Error Handling\n\nThe application handles various error scenarios gracefully:\n\n- 🚫 **401 Unauthorized**: Invalid API key\n- ⏳ **429 Too Many Requests**: Rate limit exceeded\n- 🔎 **404 Not Found**: Model or deployment not found\n- 🌐 **Network Errors**: Connection issues during image download\n- 🗂️ **File System Errors**: Permission or I/O issues when saving files\n\n## ✍️ Blog Post\nIf you are more interested into details, please see the following posts on [medium.com](https://medium.com/@tsjdevapps) or in my [personal blog](https://www.tsjdev-apps.de):\n\n- [Building a Multi-Model Image Generation Console App with Azure OpenAI and OpenAI](https://medium.com/medialesson/building-a-multi-model-image-generation-console-app-with-azure-openai-and-openai-fa5b9b790e7e)\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\n1. Fork the project\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## 📜 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsjdev-apps%2Fai-image-generation-console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsjdev-apps%2Fai-image-generation-console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsjdev-apps%2Fai-image-generation-console/lists"}